[PATCH 3/3] drm/amdgpu: skip put fence if signal fails
jiadong.zhu at amd.com
jiadong.zhu at amd.com
Fri Jul 15 08:43:56 UTC 2022
From: "Jiadong.Zhu" <Jiadong.Zhu at amd.com>
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.
Signed-off-by: Jiadong.Zhu <Jiadong.Zhu at amd.com>
---
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);
}
}
--
2.25.1
More information about the amd-gfx
mailing list