summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-04-26 00:21:47 +0100
committerDave Airlie <airlied@redhat.com>2017-06-14 02:59:37 +0100
commit3ae374deaf43c6bc80de8ad42c145ce061d9729b (patch)
treedba6aa6160f15c729590b8a26c091f1a80b0ef4d
parent1f7169025c3127dbcb42eb2134f106c41e08b739 (diff)
Dma-fence hack timeoutdrm-syncobj
-rw-r--r--drivers/dma-buf/dma-fence.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
index 0918d3f003d6..58659025bb9a 100644
--- a/drivers/dma-buf/dma-fence.c
+++ b/drivers/dma-buf/dma-fence.c
@@ -380,6 +380,9 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
return ret;
+ if (timeout == 0)
+ return 0;
+
spin_lock_irqsave(fence->lock, flags);
if (intr && signal_pending(current)) {