]> git.hungrycats.org Git - linux/commitdiff
drm/amdgpu/gfx12: unmap the queue via MES on reset for MMIO path
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 19 May 2026 20:08:16 +0000 (16:08 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Jun 2026 19:51:35 +0000 (15:51 -0400)
To keep MES in sync.

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

index fc6ecdbd03b81af2f25606505994146abc483dde..af15908c9b19183bdfd6d6dfc054c44fac2edddb 100644 (file)
@@ -5255,6 +5255,10 @@ static int gfx_v12_0_reset_kgq(struct amdgpu_ring *ring,
                return r;
 
        if (use_mmio) {
+               r = amdgpu_mes_unmap_legacy_queue(adev, ring,
+                                                 RESET_QUEUES, 0, 0, 0);
+               if (r)
+                       return r;
                amdgpu_gfx_mqd_reset_restore(ring);
 
                r = amdgpu_mes_map_legacy_queue(adev, ring, 0);
@@ -5282,6 +5286,10 @@ static int gfx_v12_0_reset_kcq(struct amdgpu_ring *ring,
                return r;
 
        if (use_mmio) {
+               r = amdgpu_mes_unmap_legacy_queue(adev, ring,
+                                                 RESET_QUEUES, 0, 0, 0);
+               if (r)
+                       return r;
                amdgpu_gfx_mqd_reset_restore(ring);
 
                r = amdgpu_mes_map_legacy_queue(adev, ring, 0);