[PATCH 2/2] drm/amdgpu/sdma7: add ucode version checks for userq support

Zhang, Jesse(Jie) Jesse.Zhang at amd.com
Mon Jun 23 01:25:04 UTC 2025


[AMD Official Use Only - AMD Internal Distribution Only]

this serials 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: Friday, June 20, 2025 11:41 PM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
Subject: [PATCH 2/2] drm/amdgpu/sdma7: add ucode version checks for userq support

SDMA 7.0.0/1: 7836028

Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c
index ad47d0bdf7775..86903eccbd4e5 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c
@@ -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;
 }
--
2.49.0



More information about the amd-gfx mailing list