summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2023-10-13 22:26:03 +0300
committerAlex Deucher <alexander.deucher@amd.com>2023-10-20 01:26:51 +0300
commit4916615fe96fb530517b0d46702c750c20a5601c (patch)
tree41754a80b52beda1cc7cb31c176ca2afb7bd6738 /drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
parentd757dfd667aad54c6ed0b6f22a11ad5a317663de (diff)
downloadlinux-4916615fe96fb530517b0d46702c750c20a5601c.tar.xz
drm/amd: Don't parse IMU ucode version if it won't be loaded
When the IMU ucode is loaded by the PSP parsing the version that comes from Linux will vary. Rather than showing the wrong data to kernel interface consumers, avoid populating it in this case. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/imu_v11_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/imu_v11_0.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c b/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
index 875fb5ac70b5..c0bdab3bf0e4 100644
--- a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
@@ -55,7 +55,6 @@ static int imu_v11_0_init_microcode(struct amdgpu_device *adev)
if (err)
goto out;
imu_hdr = (const struct imu_firmware_header_v1_0 *)adev->gfx.imu_fw->data;
- adev->gfx.imu_fw_version = le32_to_cpu(imu_hdr->header.ucode_version);
//adev->gfx.imu_feature_version = le32_to_cpu(imu_hdr->ucode_feature_version);
if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
@@ -69,7 +68,8 @@ static int imu_v11_0_init_microcode(struct amdgpu_device *adev)
info->fw = adev->gfx.imu_fw;
adev->firmware.fw_size +=
ALIGN(le32_to_cpu(imu_hdr->imu_dram_ucode_size_bytes), PAGE_SIZE);
- }
+ } else
+ adev->gfx.imu_fw_version = le32_to_cpu(imu_hdr->header.ucode_version);
out:
if (err) {