Skip to content

Commit ed21f6c

Browse files
drm/amdgpu: fix another missing fence reference in the CS code
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]>
1 parent 83e79ae commit ed21f6c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,9 +1254,12 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
12541254
continue;
12551255

12561256
fence = &p->jobs[i]->base.s_fence->scheduled;
1257+
dma_fence_get(fence);
12571258
r = drm_sched_job_add_dependency(&leader->base, fence);
1258-
if (r)
1259+
if (r) {
1260+
dma_fence_put(fence);
12591261
goto error_cleanup;
1262+
}
12601263
}
12611264

12621265
if (p->gang_size > 1) {

0 commit comments

Comments
 (0)