All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: grab extra fence reference for drm_sched_job_add_dependency
@ 2022-12-19 10:47 Christian König
  2022-12-19 14:00 ` Borislav Petkov
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Christian König @ 2022-12-19 10:47 UTC (permalink / raw)
  To: bp, mikhail.v.gavrilov, michel, amd-gfx

That function consumes the reference.

Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: aab9cf7b6954 ("drm/amdgpu: use scheduler dependencies for VM updates")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
index 59cf64216fbb..535cd6569bcc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
@@ -238,8 +238,10 @@ static int amdgpu_vm_sdma_update(struct amdgpu_vm_update_params *p,
 	/* Wait for PD/PT moves to be completed */
 	dma_resv_iter_begin(&cursor, bo->tbo.base.resv, DMA_RESV_USAGE_KERNEL);
 	dma_resv_for_each_fence_unlocked(&cursor, fence) {
+		dma_fence_get(fence);
 		r = drm_sched_job_add_dependency(&p->job->base, fence);
 		if (r) {
+			dma_fence_put(fence);
 			dma_resv_iter_end(&cursor);
 			return r;
 		}
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-01-12 12:05 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-19 10:47 [PATCH] drm/amdgpu: grab extra fence reference for drm_sched_job_add_dependency Christian König
2022-12-19 14:00 ` Borislav Petkov
2022-12-21 21:10   ` Alex Deucher
2023-01-03  8:34     ` Christian König
2023-01-03 14:26       ` Alex Deucher
2023-01-03 14:28         ` Michel Dänzer
2023-01-05  1:44         ` Mikhail Gavrilov
2023-01-05 10:03           ` Christian König
2023-01-06 12:59             ` Mikhail Gavrilov
2023-01-06 14:24               ` Alex Deucher
2023-01-06 15:27                 ` Christian König
2023-01-09 13:13                   ` Mikhail Gavrilov
2023-01-09 13:40                     ` Christian König
2023-01-10 18:21                       ` Mikhail Gavrilov
2023-01-12 12:05                         ` Christian König
2022-12-19 15:08 ` Luben Tuikov
2022-12-23 10:00 ` Michal Kubecek
2022-12-23 22:55 ` Mikhail Gavrilov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.