Skip to content

Commit 31135cc

Browse files
committed
drm/amdgpu/sdma7: add ucode version checks for userq support
SDMA 7.0.0/1: 7836028 Reviewed-by: Jesse Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 8c01140)
1 parent 899dec4 commit 31135cc

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,9 +1349,15 @@ static int sdma_v7_0_sw_init(struct amdgpu_ip_block *ip_block)
13491349
else
13501350
DRM_ERROR("Failed to allocated memory for SDMA IP Dump\n");
13511351

1352-
/* add firmware version checks here */
1353-
if (0 && !adev->sdma.disable_uq)
1354-
adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
1352+
switch (amdgpu_ip_version(adev, SDMA0_HWIP, 0)) {
1353+
case IP_VERSION(7, 0, 0):
1354+
case IP_VERSION(7, 0, 1):
1355+
if ((adev->sdma.instance[0].fw_version >= 7836028) && !adev->sdma.disable_uq)
1356+
adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
1357+
break;
1358+
default:
1359+
break;
1360+
}
13551361

13561362
return r;
13571363
}

0 commit comments

Comments
 (0)