提交 b09d6acb 编写于 作者: C Christian König

drm/amdgpu: handle gang submit before VMID

Otherwise it can happen that not all gang members can get a VMID
assigned and we deadlock.
Signed-off-by: NChristian König <christian.koenig@amd.com>
Tested-by: NTimur Kristóf <timur.kristof@gmail.com>
Acked-by: NTimur Kristóf <timur.kristof@gmail.com>
Fixes: 68ce8b24 ("drm/amdgpu: add gang submit backend v2")
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221118153023.312582-1-christian.koenig@amd.com
上级 5954acba
......@@ -254,6 +254,9 @@ static struct dma_fence *amdgpu_job_dependency(struct drm_sched_job *sched_job,
DRM_ERROR("Error adding fence (%d)\n", r);
}
if (!fence && job->gang_submit)
fence = amdgpu_device_switch_gang(ring->adev, job->gang_submit);
while (fence == NULL && vm && !job->vmid) {
r = amdgpu_vmid_grab(vm, ring, &job->sync,
&job->base.s_fence->finished,
......@@ -264,9 +267,6 @@ static struct dma_fence *amdgpu_job_dependency(struct drm_sched_job *sched_job,
fence = amdgpu_sync_get_fence(&job->sync);
}
if (!fence && job->gang_submit)
fence = amdgpu_device_switch_gang(ring->adev, job->gang_submit);
return fence;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册