Skip to content

Commit

Permalink
drm/amdgpu: fix another missing fence reference in the CS code
Browse files Browse the repository at this point in the history
drm_sched_job_add_dependency() consumes the references of the gang
members. Only triggered by mesh shaders.

Signed-off-by: Christian König <[email protected]>
Fixes: 1728baa ("drm/amdgpu: use scheduler dependencies for CS")
Tested-by: Mike Lothian <[email protected]>
Tested-by: Bert Karwatzki <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Alex Deucher <[email protected]>
Reviewed-by: Luben Tuikov <[email protected]>
  • Loading branch information
ChristianKoenigAMD committed Jan 5, 2023
1 parent 83e79ae commit ed21f6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1254,9 +1254,12 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
continue;

fence = &p->jobs[i]->base.s_fence->scheduled;
dma_fence_get(fence);
r = drm_sched_job_add_dependency(&leader->base, fence);
if (r)
if (r) {
dma_fence_put(fence);
goto error_cleanup;
}
}

if (p->gang_size > 1) {
Expand Down

0 comments on commit ed21f6c

Please sign in to comment.