Skip to contentSkip to conversation

drm/amdgpu/sdma6: add ucode version checks for userq support

PATCH In review Alex Deucher 2 participants 3 messages Jun 20, 2025 – Jun 23, 2025

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/2 drm/amdgpu/sdma6: add ucode version checks for userq support

SDMA 6.0.0 version 24
SDMA 6.0.2 version 21
SDMA 6.0.3 version 25

---
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c +16 -3
index 5a70ae17be04e..a9bdf8d61d6ce 100644
@@ -1374,9 +1374,22 @@ static int sdma_v6_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(6, 0, 0):
+		if ((adev->sdma.instance[0].fw_version >= 24) && !adev->sdma.disable_uq)
+			adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
+		break;
+	case IP_VERSION(6, 0, 2):
+		if ((adev->sdma.instance[0].fw_version >= 21) && !adev->sdma.disable_uq)
+			adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
+		break;
+	case IP_VERSION(6, 0, 3):
+		if ((adev->sdma.instance[0].fw_version >= 25) && !adev->sdma.disable_uq)
+			adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
+		break;
+	default:
+		break;
+	}
 
 	r = amdgpu_sdma_sysfs_reset_mask_init(adev);
 	if (r)
Signature · 1 line
2.49.0
author maintainer
#1 lore raw

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

SDMA 7.0.0/1: 7836028

---
 drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c +9 -3
index ad47d0bdf7775..86903eccbd4e5 100644
@@ -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;
 }
Signature · 1 line
2.49.0
#2 lore raw

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

[AMD Official Use Only - AMD Internal Distribution Only]

this serials is Reviewed-by: Jesse Zhang <[email protected]>

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Friday, June 20, 2025 11:41 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu/sdma7: add ucode version checks for userq support

SDMA 7.0.0/1: 7836028

---
 drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c +9 -3
index ad47d0bdf7775..86903eccbd4e5 100644
@@ -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