Commit ed21f6c3 authored by Christian König's avatar Christian König

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: default avatarChristian König <christian.koenig@amd.com>
Fixes: 1728baa7 ("drm/amdgpu: use scheduler dependencies for CS")
Tested-by: default avatarMike Lothian <mike@fireburn.co.uk>
Tested-by: default avatarBert Karwatzki <spasswolf@web.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230105111703.52695-1-christian.koenig@amd.comReviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarLuben Tuikov <luben.tuikov@amd.com>
parent 83e79ae3
...@@ -1254,10 +1254,13 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, ...@@ -1254,10 +1254,13 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
continue; continue;
fence = &p->jobs[i]->base.s_fence->scheduled; fence = &p->jobs[i]->base.s_fence->scheduled;
dma_fence_get(fence);
r = drm_sched_job_add_dependency(&leader->base, fence); r = drm_sched_job_add_dependency(&leader->base, fence);
if (r) if (r) {
dma_fence_put(fence);
goto error_cleanup; goto error_cleanup;
} }
}
if (p->gang_size > 1) { if (p->gang_size > 1) {
for (i = 0; i < p->gang_size; ++i) for (i = 0; i < p->gang_size; ++i)
......
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