Commit c1c4a8b2 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: grab extra fence reference for drm_sched_job_add_dependency

That function consumes the reference.
Reviewed-by: default avatarLuben Tuikov <luben.tuikov@amd.com>
Reported-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Tested-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Fixes: aab9cf7b ("drm/amdgpu: use scheduler dependencies for VM updates")
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e1d900df
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment