[PATCH 02/27] drm/amdgpu/sdma: handle paging queues in amdgpu_sdma_reset_engine()

Zhang, Jesse(Jie) Jesse.Zhang at amd.com
Sat Jun 14 12:31:50 UTC 2025


[AMD Official Use Only - AMD Internal Distribution Only]

This patch is 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: Saturday, June 14, 2025 5:47 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 02/27] drm/amdgpu/sdma: handle paging queues in amdgpu_sdma_reset_engine()

Need to properly start and stop paging queues if they are present.

This is not an issue today since we don't support a paging queue on any chips with queue reset.

Fixes: ffe43cc82a04 ("drm/amdgpu: switch amdgpu_sdma_reset_engine to use the new sdma function pointers")
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
index a1e54bcef495c..cf5733d5d26dd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
@@ -571,8 +571,11 @@ int amdgpu_sdma_reset_engine(struct amdgpu_device *adev, uint32_t instance_id)
                page_sched_stopped = true;
        }

-       if (sdma_instance->funcs->stop_kernel_queue)
+       if (sdma_instance->funcs->stop_kernel_queue) {
                sdma_instance->funcs->stop_kernel_queue(gfx_ring);
+               if (adev->sdma.has_page_queue)
+                       sdma_instance->funcs->stop_kernel_queue(page_ring);
+       }

        /* Perform the SDMA reset for the specified instance */
        ret = amdgpu_sdma_soft_reset(adev, instance_id); @@ -581,8 +584,11 @@ int amdgpu_sdma_reset_engine(struct amdgpu_device *adev, uint32_t instance_id)
                goto exit;
        }

-       if (sdma_instance->funcs->start_kernel_queue)
+       if (sdma_instance->funcs->start_kernel_queue) {
                sdma_instance->funcs->start_kernel_queue(gfx_ring);
+               if (adev->sdma.has_page_queue)
+                       sdma_instance->funcs->start_kernel_queue(page_ring);
+       }

 exit:
        /* Restart the scheduler's work queue for the GFX and page rings
--
2.49.0



More information about the amd-gfx mailing list