From: Gustavo Padovan Date: Fri, 18 Nov 2016 08:26:43 +0000 (+0900) Subject: Revert "dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0)" X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=069cad6d02fef7924fb942b37a6c17dd02a79f7f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Gustavo Padovan Acked-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1479457603-30758-1-git-send-email-gustavo@padovan.org --- diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c index 69d8ef98d34c..6d802f2d2881 100644 --- a/drivers/dma-buf/sync_file.c +++ b/drivers/dma-buf/sync_file.c @@ -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);