* [PATCH] drm/amdgpu: handle gang submit before VMID
@ 2022-11-18 15:30 Christian König
2022-11-18 15:36 ` Timur Kristóf
2022-11-18 15:59 ` Alex Deucher
0 siblings, 2 replies; 6+ messages in thread
From: Christian König @ 2022-11-18 15:30 UTC (permalink / raw)
To: amd-gfx; +Cc: Alexander.Deucher, Christian König, Timur Kristóf
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@amd.com>
Tested-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Timur Kristóf <timur.kristof@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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amdgpu: handle gang submit before VMID
2022-11-18 15:30 [PATCH] drm/amdgpu: handle gang submit before VMID Christian König
@ 2022-11-18 15:36 ` Timur Kristóf
2022-11-18 16:53 ` Christian König
2022-11-18 15:59 ` Alex Deucher
1 sibling, 1 reply; 6+ messages in thread
From: Timur Kristóf @ 2022-11-18 15:36 UTC (permalink / raw)
To: Christian König, amd-gfx; +Cc: Alexander.Deucher, Christian König
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@amd.com>
> Tested-by: Timur Kristóf <timur.kristof@gmail.com>
> Acked-by: Timur Kristóf <timur.kristof@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;
> }
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amdgpu: handle gang submit before VMID
2022-11-18 15:30 [PATCH] drm/amdgpu: handle gang submit before VMID Christian König
2022-11-18 15:36 ` Timur Kristóf
@ 2022-11-18 15:59 ` Alex Deucher
1 sibling, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2022-11-18 15:59 UTC (permalink / raw)
To: Christian König
Cc: Alexander.Deucher, Christian König, amd-gfx, Timur Kristóf
On Fri, Nov 18, 2022 at 10:30 AM Christian König
<ckoenig.leichtzumerken@gmail.com> 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@amd.com>
> Tested-by: Timur Kristóf <timur.kristof@gmail.com>
> Acked-by: Timur Kristóf <timur.kristof@gmail.com>
> Fixes: 68ce8b242242 ("drm/amdgpu: add gang submit backend v2")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> 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;
> }
>
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amdgpu: handle gang submit before VMID
2022-11-18 15:36 ` Timur Kristóf
@ 2022-11-18 16:53 ` Christian König
2022-11-21 16:36 ` Timur Kristóf
0 siblings, 1 reply; 6+ messages in thread
From: Christian König @ 2022-11-18 16:53 UTC (permalink / raw)
To: Timur Kristóf, amd-gfx; +Cc: Alexander.Deucher, Christian König
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@amd.com>
>> Tested-by: Timur Kristóf <timur.kristof@gmail.com>
>> Acked-by: Timur Kristóf <timur.kristof@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;
>> }
>>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amdgpu: handle gang submit before VMID
2022-11-18 16:53 ` Christian König
@ 2022-11-21 16:36 ` Timur Kristóf
2022-11-21 16:43 ` Deucher, Alexander
0 siblings, 1 reply; 6+ messages in thread
From: Timur Kristóf @ 2022-11-21 16:36 UTC (permalink / raw)
To: Christian König, amd-gfx; +Cc: Alexander.Deucher, Christian König
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@amd.com>
> > > Tested-by: Timur Kristóf <timur.kristof@gmail.com>
> > > Acked-by: Timur Kristóf <timur.kristof@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;
> > > }
> > >
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amdgpu: handle gang submit before VMID
2022-11-21 16:36 ` Timur Kristóf
@ 2022-11-21 16:43 ` Deucher, Alexander
0 siblings, 0 replies; 6+ messages in thread
From: Deucher, Alexander @ 2022-11-21 16:43 UTC (permalink / raw)
To: Timur Kristóf, Christian König, amd-gfx; +Cc: Koenig, Christian
[-- Attachment #1: Type: text/plain, Size: 2937 bytes --]
[AMD Official Use Only - General]
Yes, it has already landed in drm-misc-fixes:
https://cgit.freedesktop.org/drm/drm-misc/commit/?h=drm-misc-fixes&id=b09d6acba1d9a23963fedf96b4191502a4fec25d
Alex
________________________________
From: Timur Kristóf <timur.kristof@gmail.com>
Sent: Monday, November 21, 2022 11:36 AM
To: Christian König <ckoenig.leichtzumerken@gmail.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>
Subject: Re: [PATCH] drm/amdgpu: handle gang submit before VMID
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@amd.com>
> > > Tested-by: Timur Kristóf <timur.kristof@gmail.com>
> > > Acked-by: Timur Kristóf <timur.kristof@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;
> > > }
> > >
>
[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 21579 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-11-21 17:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18 15:30 [PATCH] drm/amdgpu: handle gang submit before VMID Christian König
2022-11-18 15:36 ` Timur Kristóf
2022-11-18 16:53 ` Christian König
2022-11-21 16:36 ` Timur Kristóf
2022-11-21 16:43 ` Deucher, Alexander
2022-11-18 15:59 ` Alex Deucher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.