[PATCH] drm/amdgpu: handle gang submit before VMID
Timur Kristóf
timur.kristof at gmail.com
Mon Nov 21 16:36:58 UTC 2022
The patch did not make it into rc6 after all.
Can you please make sure it goes into rc7?
Thanks,
Timur
On Fri, 2022-11-18 at 17:53 +0100, Christian König wrote:
> Pushed to drm-misc-fixes, should be picked up for the next rc.
>
> Let me know if you run into any more problems with that.
>
> Thanks,
> Christian.
>
> Am 18.11.22 um 16:36 schrieb Timur Kristóf:
> > Can you guys please push this into the next 6.1 RC? This solves a
> > significant issue with gang submit.
> >
> > On Fri, 2022-11-18 at 16:30 +0100, Christian König wrote:
> > > Otherwise it can happen that not all gang members can get a VMID
> > > assigned and we deadlock.
> > >
> > > Signed-off-by: Christian König <christian.koenig at amd.com>
> > > Tested-by: Timur Kristóf <timur.kristof at gmail.com>
> > > Acked-by: Timur Kristóf <timur.kristof at gmail.com>
> > > Fixes: 68ce8b242242 ("drm/amdgpu: add gang submit backend v2")
> > > ---
> > > drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 6 +++---
> > > 1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
> > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
> > > index cd968e781077..abb99cff8b4b 100644
> > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
> > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
> > > @@ -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;
> > > }
> > >
>
More information about the amd-gfx
mailing list