* [PATCH 2/2] drm/amdgpu/gfx12: adjust KGQ reset sequence
2026-01-29 4:39 [PATCH 1/2] drm/amdgpu/gfx11: adjust KGQ reset sequence Alex Deucher
@ 2026-01-29 4:39 ` Alex Deucher
2026-01-29 8:56 ` [PATCH 1/2] drm/amdgpu/gfx11: " Zhang, Jesse(Jie)
2026-01-29 9:35 ` Timur Kristóf
2 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2026-01-29 4:39 UTC (permalink / raw)
To: amd-gfx; +Cc: Alex Deucher
Kernel gfx queues do not need to be reinitialized or
remapped after a reset. Align with other gfx11.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
index d8ab93c82366d..c87f5040d25a1 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
@@ -5318,18 +5318,6 @@ static int gfx_v12_0_reset_kgq(struct amdgpu_ring *ring,
return r;
}
- r = gfx_v12_0_kgq_init_queue(ring, true);
- if (r) {
- dev_err(adev->dev, "failed to init kgq\n");
- return r;
- }
-
- r = amdgpu_mes_map_legacy_queue(adev, ring, 0);
- if (r) {
- dev_err(adev->dev, "failed to remap kgq\n");
- return r;
- }
-
return amdgpu_ring_reset_helper_end(ring, timedout_fence);
}
--
2.52.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* RE: [PATCH 1/2] drm/amdgpu/gfx11: adjust KGQ reset sequence
2026-01-29 4:39 [PATCH 1/2] drm/amdgpu/gfx11: adjust KGQ reset sequence Alex Deucher
2026-01-29 4:39 ` [PATCH 2/2] drm/amdgpu/gfx12: " Alex Deucher
@ 2026-01-29 8:56 ` Zhang, Jesse(Jie)
2026-01-29 9:35 ` Timur Kristóf
2 siblings, 0 replies; 5+ messages in thread
From: Zhang, Jesse(Jie) @ 2026-01-29 8:56 UTC (permalink / raw)
To: Deucher, Alexander, amd-gfx@lists.freedesktop.org; +Cc: Deucher, Alexander
[AMD Official Use Only - AMD Internal Distribution Only]
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex
> Deucher
> Sent: Thursday, January 29, 2026 12:40 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
> Subject: [PATCH 1/2] drm/amdgpu/gfx11: adjust KGQ reset sequence
>
> Kernel gfx queues do not need to be reinitialized or remapped after a reset. This
> fixes queue reset failures on APUs.
>
> Fixes: b3e9bfd86658 ("drm/amdgpu/gfx11: add ring reset callbacks")
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4789
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 12 ------------
> 1 file changed, 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> index b5a2d09fc3469..489edf517f91c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> @@ -6854,18 +6854,6 @@ static int gfx_v11_0_reset_kgq(struct amdgpu_ring
> *ring,
> return r;
> }
>
> - r = gfx_v11_0_kgq_init_queue(ring, true);
> - if (r) {
> - dev_err(adev->dev, "failed to init kgq\n");
> - return r;
> - }
> -
> - r = amdgpu_mes_map_legacy_queue(adev, ring, 0);
> - if (r) {
> - dev_err(adev->dev, "failed to remap kgq\n");
> - return r;
> - }
> -
> return amdgpu_ring_reset_helper_end(ring, timedout_fence); }
>
If it's reset by mmio, we might need to keep it.
So, how about adding a check like this:
static int gfx_v11_0_reset_kgq(struct amdgpu_ring *ring,
struct amdgpu_fence *timedout_fence)
{
struct amdgpu_device *adev = ring->adev;
+ bool use_mmio = false;
int r;
amdgpu_ring_reset_helper_begin(ring, timedout_fence);
- r = amdgpu_mes_reset_legacy_queue(ring->adev, ring, vmid, false, 0);
+ r = amdgpu_mes_reset_legacy_queue(ring->adev, ring, vmid, user_mmio, 0);
if (r) {
dev_warn(adev->dev, "reset via MES failed and try pipe reset %d\n", r);
@@ -6874,16 +6875,18 @@ static int gfx_v11_0_reset_kgq(struct amdgpu_ring *ring,
return r;
}
- r = gfx_v11_0_kgq_init_queue(ring, true);
- if (r) {
- dev_err(adev->dev, "failed to init kgq\n");
- return r;
- }
+ if (use_mmio) {
+ r = gfx_v11_0_kgq_init_queue(ring, true);
+ if (r) {
+ dev_err(adev->dev, "failed to init kgq\n");
+ return r;
+ }
...
}
> --
> 2.52.0
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 1/2] drm/amdgpu/gfx11: adjust KGQ reset sequence
2026-01-29 4:39 [PATCH 1/2] drm/amdgpu/gfx11: adjust KGQ reset sequence Alex Deucher
2026-01-29 4:39 ` [PATCH 2/2] drm/amdgpu/gfx12: " Alex Deucher
2026-01-29 8:56 ` [PATCH 1/2] drm/amdgpu/gfx11: " Zhang, Jesse(Jie)
@ 2026-01-29 9:35 ` Timur Kristóf
2026-01-29 16:53 ` Alex Deucher
2 siblings, 1 reply; 5+ messages in thread
From: Timur Kristóf @ 2026-01-29 9:35 UTC (permalink / raw)
To: amd-gfx; +Cc: Alex Deucher, Alex Deucher
On Thursday, January 29, 2026 5:39:35 AM Central European Standard Time Alex
Deucher wrote:
> Kernel gfx queues do not need to be reinitialized or
> remapped after a reset. This fixes queue reset failures
> on APUs.
>
> Fixes: b3e9bfd86658 ("drm/amdgpu/gfx11: add ring reset callbacks")
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4789
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
The series is:
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
(including with Jesse's suggestion if you choose to implement that).
I notice that gfx_v10_0_reset_kgq() also calls gfx_v10_0_kgq_init_queue(),
should that call be removed as well or made conditional?
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 12 ------------
> 1 file changed, 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c index b5a2d09fc3469..489edf517f91c
> 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> @@ -6854,18 +6854,6 @@ static int gfx_v11_0_reset_kgq(struct amdgpu_ring
> *ring, return r;
> }
>
> - r = gfx_v11_0_kgq_init_queue(ring, true);
> - if (r) {
> - dev_err(adev->dev, "failed to init kgq\n");
> - return r;
> - }
> -
> - r = amdgpu_mes_map_legacy_queue(adev, ring, 0);
> - if (r) {
> - dev_err(adev->dev, "failed to remap kgq\n");
> - return r;
> - }
> -
> return amdgpu_ring_reset_helper_end(ring, timedout_fence);
> }
^ permalink raw reply [flat|nested] 5+ messages in thread