drm/amdgpu: correct MES debugfs versions
authorGraham Sider <Graham.Sider@amd.com>
Tue, 25 Oct 2022 18:42:13 +0000 (14:42 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Nov 2022 20:57:32 +0000 (16:57 -0400)
Use mes.sched_version, mes.kiq_version for debugfs as
mes.ucode_fw_version does not contain correct versioning information.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

index bf1ff8f0e71208f4c5044dd588f7e38676893baf..4e42dcb1950f7e4cd474c33bd8609071f2dd708c 100644 (file)
@@ -337,12 +337,14 @@ static int amdgpu_firmware_info(struct drm_amdgpu_info_firmware *fw_info,
                fw_info->feature = adev->psp.cap_feature_version;
                break;
        case AMDGPU_INFO_FW_MES_KIQ:
-               fw_info->ver = adev->mes.ucode_fw_version[0];
-               fw_info->feature = 0;
+               fw_info->ver = adev->mes.kiq_version & AMDGPU_MES_VERSION_MASK;
+               fw_info->feature = (adev->mes.kiq_version & AMDGPU_MES_FEAT_VERSION_MASK)
+                                       >> AMDGPU_MES_FEAT_VERSION_SHIFT;
                break;
        case AMDGPU_INFO_FW_MES:
-               fw_info->ver = adev->mes.ucode_fw_version[1];
-               fw_info->feature = 0;
+               fw_info->ver = adev->mes.sched_version & AMDGPU_MES_VERSION_MASK;
+               fw_info->feature = (adev->mes.sched_version & AMDGPU_MES_FEAT_VERSION_MASK)
+                                       >> AMDGPU_MES_FEAT_VERSION_SHIFT;
                break;
        case AMDGPU_INFO_FW_IMU:
                fw_info->ver = adev->gfx.imu_fw_version;