aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2016-11-07 16:16:14 -0500
committerSumit Semwal <sumit.semwal@linaro.org>2016-11-08 14:15:33 -0500
commit698c0f7ff21674ec08a4c6e99dd6da62fe5a344d (patch)
treee406e8bba438bc4716815d77bcabcbf7c92ff566
parentbcc004b629d22ae202988e4c5424564e0b4f1217 (diff)
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 <alexander.deucher@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> [sumits: reword commit msg for checkpatch warnings] Link: http://patchwork.freedesktop.org/patch/msgid/1478553376-18575-2-git-send-email-alexander.deucher@amd.com
-rw-r--r--drivers/dma-buf/dma-fence.c3
1 files changed, 0 insertions, 3 deletions
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)
161 if (WARN_ON(timeout < 0)) 161 if (WARN_ON(timeout < 0))
162 return -EINVAL; 162 return -EINVAL;
163 163
164 if (timeout == 0)
165 return dma_fence_is_signaled(fence);
166
167 trace_dma_fence_wait_start(fence); 164 trace_dma_fence_wait_start(fence);
168 ret = fence->ops->wait(fence, intr, timeout); 165 ret = fence->ops->wait(fence, intr, timeout);
169 trace_dma_fence_wait_end(fence); 166 trace_dma_fence_wait_end(fence);