Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0)"

This reverts commit ecebca79f6976ddaddfd054d699272515869ea28.

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 <chris@chris-wilson.co.uk>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479457603-30758-1-git-send-email-gustavo@padovan.org

authored by

Gustavo Padovan and committed by
Daniel Vetter
069cad6d 4ada6f22

+1 -2
+1 -2
drivers/dma-buf/sync_file.c
··· 308 308 309 309 poll_wait(file, &sync_file->wq, wait); 310 310 311 - if (!poll_does_not_wait(wait) && 312 - !test_and_set_bit(POLL_ENABLED, &sync_file->fence->flags)) { 311 + if (!test_and_set_bit(POLL_ENABLED, &sync_file->fence->flags)) { 313 312 if (dma_fence_add_callback(sync_file->fence, &sync_file->cb, 314 313 fence_check_cb_func) < 0) 315 314 wake_up_all(&sync_file->wq);