Skip to content

Commit c85d00d

Browse files
ArvindYadavAMDChristianKoenigAMD
authored andcommitted
dma-buf: set signaling bit for the stub fence
Here's setting software signaling bit for the stub fence which is always signaled. If this fence signaling bit is not set then the AMD GPU scheduler will cause a GPU reset due to a GPU scheduler cleanup activity timeout. Signed-off-by: Arvind Yadav <Arvind.Yadav@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220914164321.2156-3-Arvind.Yadav@amd.com Signed-off-by: Christian König <christian.koenig@amd.com>
1 parent 6ad9aa4 commit c85d00d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/dma-buf/dma-fence.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ struct dma_fence *dma_fence_get_stub(void)
136136
&dma_fence_stub_ops,
137137
&dma_fence_stub_lock,
138138
0, 0);
139+
140+
set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
141+
&dma_fence_stub.flags);
142+
139143
dma_fence_signal_locked(&dma_fence_stub);
140144
}
141145
spin_unlock(&dma_fence_stub_lock);
@@ -161,6 +165,10 @@ struct dma_fence *dma_fence_allocate_private_stub(void)
161165
&dma_fence_stub_ops,
162166
&dma_fence_stub_lock,
163167
0, 0);
168+
169+
set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
170+
&dma_fence_stub.flags);
171+
164172
dma_fence_signal(fence);
165173

166174
return fence;

0 commit comments

Comments
 (0)