drm/amdgpu: compare MES firmware version ucode for gfx11

MES firmware should report the same version whether read from
the register or from the firmware ucode binary. This is not
always the case, so add a log when they mismatch.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Sunil Khatri 2026-06-01 20:11:17 +05:30 committed by Alex Deucher
parent 39eb6da7ac
commit dd7bd8e0f0
3 changed files with 14 additions and 0 deletions

View File

@ -781,6 +781,18 @@ int amdgpu_mes_init_microcode(struct amdgpu_device *adev, int pipe)
return r;
}
void amdgpu_mes_validate_fw_version(struct amdgpu_device *adev)
{
u32 fw_from_ucode = adev->mes.fw_version[AMDGPU_MES_SCHED_PIPE];
u32 fw_from_reg = adev->mes.sched_version & AMDGPU_MES_VERSION_MASK;
if (fw_from_ucode != fw_from_reg)
dev_info(adev->dev,
"MES firmware reports incorrect version in ucode binary (0x%x vs 0x%x)\n",
fw_from_ucode, fw_from_reg);
}
bool amdgpu_mes_suspend_resume_all_supported(struct amdgpu_device *adev)
{
uint32_t mes_rev = adev->mes.sched_version & AMDGPU_MES_VERSION_MASK;

View File

@ -441,6 +441,7 @@ struct amdgpu_mes_funcs {
(adev)->mes.kiq_hw_fini((adev), (xcc_id))
int amdgpu_mes_init_microcode(struct amdgpu_device *adev, int pipe);
void amdgpu_mes_validate_fw_version(struct amdgpu_device *adev);
int amdgpu_mes_init(struct amdgpu_device *adev);
void amdgpu_mes_fini(struct amdgpu_device *adev);

View File

@ -1688,6 +1688,7 @@ static int mes_v11_0_hw_init(struct amdgpu_ip_block *ip_block)
if (r)
goto failure;
amdgpu_mes_validate_fw_version(adev);
out:
/*
* Disable KIQ ring usage from the driver once MES is enabled.