Am 15.07.22 um 10:43 schrieb jiadong.zhu@xxxxxxx:
From: "Jiadong.Zhu" <Jiadong.Zhu@xxxxxxx> Dma_fence_signal returning non-zero indicates that the fence is signaled and put somewhere else. Skip dma_fence_put to make the fence refcount correct.
Well quite a big NAK on this. Reference counting should be completely independent where a fence signals. Andrey can you take a look at this as well? Thanks, Christian.
Signed-off-by: Jiadong.Zhu <Jiadong.Zhu@xxxxxxx> --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c index f4ed0785d523..93c1a5e83835 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c @@ -1500,8 +1500,8 @@ static void amdgpu_ib_preempt_signal_fences(struct dma_fence **fences, fence = fences[i]; if (!fence) continue; - dma_fence_signal(fence); - dma_fence_put(fence); + if (!dma_fence_signal(fence)) + dma_fence_put(fence); } }