[PATCH 04/28] drm/amdgpu/gfx9: re-emit unprocessed state on kcq reset
Zhang, Jesse(Jie)
Jesse.Zhang at amd.com
Wed Jul 2 02:55:30 UTC 2025
[AMD Official Use Only - AMD Internal Distribution Only]
[PATCH 04/28] drm/amdgpu/gfx9: re-emit unprocessed state on kcq reset
[PATCH 06/28] drm/amdgpu/gfx10: re-emit unprocessed state on ring reset
[PATCH 07/28] drm/amdgpu/gfx11: re-emit unprocessed state on ring reset
[PATCH 08/28] drm/amdgpu/gfx12: re-emit unprocessed state on ring reset
[PATCH 09/28] drm/amdgpu/sdma5: re-emit unprocessed state on ring reset
[PATCH 11/28] drm/amdgpu/sdma6: re-emit unprocessed state on ring reset
[PATCH 10/28] drm/amdgpu/sdma5.2: re-emit unprocessed state on ring reset
these patches are Reviewed-by: Jesse Zhang <Jesse.Zhang at amd.com>
-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Wednesday, July 2, 2025 2:44 AM
To: amd-gfx at lists.freedesktop.org; Koenig, Christian <Christian.Koenig at amd.com>; Sundararaju, Sathishkumar <Sathishkumar.Sundararaju at amd.com>
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
Subject: [PATCH 04/28] drm/amdgpu/gfx9: re-emit unprocessed state on kcq reset
Re-emit the unprocessed state after resetting the queue.
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 76ba664efecb3..30f6b04cf82e4 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -7187,7 +7187,7 @@ static int gfx_v9_0_reset_kcq(struct amdgpu_ring *ring,
if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)
return -EINVAL;
- drm_sched_wqueue_stop(&ring->sched);
+ amdgpu_ring_reset_helper_begin(ring, timedout_fence);
spin_lock_irqsave(&kiq->ring_lock, flags);
@@ -7238,19 +7238,13 @@ static int gfx_v9_0_reset_kcq(struct amdgpu_ring *ring,
}
kiq->pmf->kiq_map_queues(kiq_ring, ring);
amdgpu_ring_commit(kiq_ring);
- spin_unlock_irqrestore(&kiq->ring_lock, flags);
r = amdgpu_ring_test_ring(kiq_ring);
+ spin_unlock_irqrestore(&kiq->ring_lock, flags);
if (r) {
DRM_ERROR("fail to remap queue\n");
return r;
}
-
- r = amdgpu_ring_test_ring(ring);
- if (r)
- return r;
- amdgpu_fence_driver_force_completion(ring);
- drm_sched_wqueue_start(&ring->sched);
- return 0;
+ return amdgpu_ring_reset_helper_end(ring, timedout_fence);
}
static void gfx_v9_ip_print(struct amdgpu_ip_block *ip_block, struct drm_printer *p)
--
2.50.0
More information about the amd-gfx
mailing list