]> git.hungrycats.org Git - linux/commitdiff
drm/amdgpu/gfx11: only need to remap KCQs when reset via MMIO
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 6 May 2026 21:20:46 +0000 (17:20 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Jun 2026 19:51:33 +0000 (15:51 -0400)
MES remaps kernels queues as part of it's reset sequence.

Reviewed-by: Jesse Zhang <jesse.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c

index f856b0cf5becf1014bfb151f4c01fad149f51398..890f45413fc5ac00cd721eb0d3bedcd94fe8075b 100644 (file)
@@ -7048,11 +7048,12 @@ static int gfx_v11_0_reset_kcq(struct amdgpu_ring *ring,
                               struct amdgpu_fence *timedout_fence)
 {
        struct amdgpu_device *adev = ring->adev;
+       bool use_mmio = true;
        int r = 0;
 
        amdgpu_ring_reset_helper_begin(ring, timedout_fence);
 
-       r = amdgpu_mes_reset_legacy_queue(ring->adev, ring, vmid, true, 0);
+       r = amdgpu_mes_reset_legacy_queue(ring->adev, ring, vmid, use_mmio, 0);
        if (r) {
                dev_warn(adev->dev, "fail(%d) to reset kcq and try pipe reset\n", r);
                r = gfx_v11_0_reset_compute_pipe(ring);
@@ -7060,15 +7061,17 @@ static int gfx_v11_0_reset_kcq(struct amdgpu_ring *ring,
                        return r;
        }
 
-       r = gfx_v11_0_kcq_init_queue(ring, true);
-       if (r) {
-               dev_err(adev->dev, "fail to init kcq\n");
-               return r;
-       }
-       r = amdgpu_mes_map_legacy_queue(adev, ring, 0);
-       if (r) {
-               dev_err(adev->dev, "failed to remap kcq\n");
-               return r;
+       if (use_mmio) {
+               r = gfx_v11_0_kcq_init_queue(ring, true);
+               if (r) {
+                       dev_err(adev->dev, "fail to init kcq\n");
+                       return r;
+               }
+               r = amdgpu_mes_map_legacy_queue(adev, ring, 0);
+               if (r) {
+                       dev_err(adev->dev, "failed to remap kcq\n");
+                       return r;
+               }
        }
 
        return amdgpu_ring_reset_helper_end(ring, timedout_fence);