]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amdgpu/sdma7: add ucode version checks for userq support
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 20 Jun 2025 15:39:22 +0000 (11:39 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 24 Jun 2025 14:38:05 +0000 (10:38 -0400)
SDMA 7.0.0/1: 7836028

Reviewed-by: Jesse Zhang <Jesse.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 8c011408ed842dfccdd50a90a9cf6bccdb85cc0e)

drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c

index ad47d0bdf77752884319c41673f032ae2915b74b..86903eccbd4e5764331d1ce7d413f86560435340 100644 (file)
@@ -1349,9 +1349,15 @@ static int sdma_v7_0_sw_init(struct amdgpu_ip_block *ip_block)
        else
                DRM_ERROR("Failed to allocated memory for SDMA IP Dump\n");
 
-       /* add firmware version checks here */
-       if (0 && !adev->sdma.disable_uq)
-               adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
+       switch (amdgpu_ip_version(adev, SDMA0_HWIP, 0)) {
+       case IP_VERSION(7, 0, 0):
+       case IP_VERSION(7, 0, 1):
+               if ((adev->sdma.instance[0].fw_version >= 7836028) && !adev->sdma.disable_uq)
+                       adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
+               break;
+       default:
+               break;
+       }
 
        return r;
 }