From: Alex Deucher Date: Mon, 7 Nov 2016 21:16:14 +0000 (-0500) Subject: dma-buf/fence: revert "don't wait when specified timeout is zero" (v2) X-Git-Tag: v4.10-rc1~154^2~36^2~12 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=698c0f7ff21674ec08a4c6e99dd6da62fe5a344d;p=linux.git dma-buf/fence: revert "don't wait when specified timeout is zero" (v2) Reverts commit 847b19a39e4c ("dma-buf/fence: don't wait when specified timeout is zero") When we don't call the wait function software signaling might never be activated. This can cause infinite polling loops with unreliable interrupt driven hardware. v2: rebase on drm-next Reviewed-by: Alex Deucher Signed-off-by: Christian König Reviewed-by: Chunming Zhou Reviewed-by: Gustavo Padovan Signed-off-by: Alex Deucher Signed-off-by: Sumit Semwal [sumits: reword commit msg for checkpatch warnings] Link: http://patchwork.freedesktop.org/patch/msgid/1478553376-18575-2-git-send-email-alexander.deucher@amd.com --- diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c index 70f4fcc0bc03..0212af7997d9 100644 --- a/drivers/dma-buf/dma-fence.c +++ b/drivers/dma-buf/dma-fence.c @@ -161,9 +161,6 @@ dma_fence_wait_timeout(struct dma_fence *fence, bool intr, signed long timeout) if (WARN_ON(timeout < 0)) return -EINVAL; - if (timeout == 0) - return dma_fence_is_signaled(fence); - trace_dma_fence_wait_start(fence); ret = fence->ops->wait(fence, intr, timeout); trace_dma_fence_wait_end(fence);