summaryrefslogtreecommitdiff
path: root/drivers/dma-buf
diff options
context:
space:
mode:
authorArvind Yadav <Arvind.Yadav@amd.com>2022-09-14 22:13:19 +0530
committerChristian König <christian.koenig@amd.com>2022-09-16 15:53:25 +0200
commitb96fb1e724ae6839d5bffcf42dd3503db7cc7df5 (patch)
treeda1bb834c4067c9276bf06d2e2306766664c7402 /drivers/dma-buf
parentd62c43a953ce02d54521ec06217d0c2ed6d489af (diff)
dma-buf: dma_fence_wait must enable signaling
dma_fence_wait() should always enable signaling even when the fence is already signaled. Signed-off-by: Arvind Yadav <Arvind.Yadav@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220914164321.2156-5-Arvind.Yadav@amd.com Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/dma-buf')
-rw-r--r--drivers/dma-buf/dma-fence.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
index 645c158b7e01..a5fbf1c1e0ea 100644
--- a/drivers/dma-buf/dma-fence.c
+++ b/drivers/dma-buf/dma-fence.c
@@ -508,6 +508,8 @@ dma_fence_wait_timeout(struct dma_fence *fence, bool intr, signed long timeout)
__dma_fence_might_wait();
+ dma_fence_enable_sw_signaling(fence);
+
trace_dma_fence_wait_start(fence);
if (fence->ops->wait)
ret = fence->ops->wait(fence, intr, timeout);
@@ -771,9 +773,6 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
goto out;
}
- if (!__dma_fence_enable_signaling(fence))
- goto out;
-
if (!timeout) {
ret = 0;
goto out;