Skip to content

Commit c1c4a8b

Browse files
Christian Königalexdeucher
authored andcommitted
drm/amdgpu: grab extra fence reference for drm_sched_job_add_dependency
That function consumes the reference. Reviewed-by: Luben Tuikov <[email protected]> Reported-by: Borislav Petkov (AMD) <[email protected]> Tested-by: Borislav Petkov (AMD) <[email protected]> Signed-off-by: Christian König <[email protected]> Fixes: aab9cf7 ("drm/amdgpu: use scheduler dependencies for VM updates") Signed-off-by: Alex Deucher <[email protected]>
1 parent e1d900d commit c1c4a8b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,10 @@ static int amdgpu_vm_sdma_update(struct amdgpu_vm_update_params *p,
238238
/* Wait for PD/PT moves to be completed */
239239
dma_resv_iter_begin(&cursor, bo->tbo.base.resv, DMA_RESV_USAGE_KERNEL);
240240
dma_resv_for_each_fence_unlocked(&cursor, fence) {
241+
dma_fence_get(fence);
241242
r = drm_sched_job_add_dependency(&p->job->base, fence);
242243
if (r) {
244+
dma_fence_put(fence);
243245
dma_resv_iter_end(&cursor);
244246
return r;
245247
}

0 commit comments

Comments
 (0)