]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu: enable gfx12 queue reset flag
authorJesse Zhang <jesse.zhang@amd.com>
Mon, 6 Jan 2025 02:17:49 +0000 (10:17 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 9 Jan 2025 21:02:47 +0000 (16:02 -0500)
Enable the kgq and kcq queue reset flag

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

index 40c47a2dd06025671658c087a5cfa5c00dadb448..814fbef78133f6de4a48c1df956c4d387b19df0b 100644 (file)
@@ -1442,11 +1442,19 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block)
                }
        }
 
-       /* TODO: Add queue reset mask when FW fully supports it */
        adev->gfx.gfx_supported_reset =
                amdgpu_get_soft_full_reset_mask(&adev->gfx.gfx_ring[0]);
        adev->gfx.compute_supported_reset =
                amdgpu_get_soft_full_reset_mask(&adev->gfx.compute_ring[0]);
+       switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
+       case IP_VERSION(12, 0, 0):
+       case IP_VERSION(12, 0, 1):
+               if ((adev->gfx.me_fw_version >= 2660) &&
+                           (adev->gfx.mec_fw_version >= 2920)) {
+                               adev->gfx.compute_supported_reset |= AMDGPU_RESET_TYPE_PER_QUEUE;
+                               adev->gfx.gfx_supported_reset |= AMDGPU_RESET_TYPE_PER_QUEUE;
+               }
+       }
 
        if (!adev->enable_mes_kiq) {
                r = amdgpu_gfx_kiq_init(adev, GFX12_MEC_HPD_SIZE, 0);