Skip to content

Commit

Permalink
Revert "dma-buf/sync-file: Avoid enable fence signaling if poll(.time…
Browse files Browse the repository at this point in the history
…out=0)"

This reverts commit ecebca7.

Do not enable fence callback on poll() when using fence_array causes the
fence_array to not signal.

For now we will revert the change and enable signaling everytime time
poll is called with timeout=0 as well.

Cc: Chris Wilson <[email protected]>
Signed-off-by: Gustavo Padovan <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
Gustavo Padovan authored and danvet committed Nov 18, 2016
1 parent 4ada6f2 commit 069cad6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/dma-buf/sync_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,7 @@ static unsigned int sync_file_poll(struct file *file, poll_table *wait)

poll_wait(file, &sync_file->wq, wait);

if (!poll_does_not_wait(wait) &&
!test_and_set_bit(POLL_ENABLED, &sync_file->fence->flags)) {
if (!test_and_set_bit(POLL_ENABLED, &sync_file->fence->flags)) {
if (dma_fence_add_callback(sync_file->fence, &sync_file->cb,
fence_check_cb_func) < 0)
wake_up_all(&sync_file->wq);
Expand Down

0 comments on commit 069cad6

Please sign in to comment.