Skip to content

Commit b96fb1e

Browse files
ArvindYadavAMDChristianKoenigAMD
authored andcommitted
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>
1 parent d62c43a commit b96fb1e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/dma-buf/dma-fence.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,8 @@ dma_fence_wait_timeout(struct dma_fence *fence, bool intr, signed long timeout)
508508

509509
__dma_fence_might_wait();
510510

511+
dma_fence_enable_sw_signaling(fence);
512+
511513
trace_dma_fence_wait_start(fence);
512514
if (fence->ops->wait)
513515
ret = fence->ops->wait(fence, intr, timeout);
@@ -771,9 +773,6 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
771773
goto out;
772774
}
773775

774-
if (!__dma_fence_enable_signaling(fence))
775-
goto out;
776-
777776
if (!timeout) {
778777
ret = 0;
779778
goto out;

0 commit comments

Comments
 (0)