Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: change registers in error checking for smu 13.0.5

smu 13.0.5 use new registers for smu msg and param.

Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Yifan Zhang and committed by
Alex Deucher
7c916f95 bb7c3e9c

+8 -2
+8 -2
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
··· 160 160 { 161 161 struct amdgpu_device *adev = smu->adev; 162 162 const char *message = smu_get_message_name(smu, msg); 163 + u32 msg_idx, prm; 163 164 164 165 switch (reg_c2pmsg_90) { 165 166 case SMU_RESP_NONE: { 166 - u32 msg_idx = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_66); 167 - u32 prm = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_82); 167 + if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 5)) { 168 + msg_idx = RREG32_SOC15(MP1, 0, mmMP1_C2PMSG_2); 169 + prm = RREG32_SOC15(MP1, 0, mmMP1_C2PMSG_34); 170 + } else { 171 + msg_idx = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_66); 172 + prm = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_82); 173 + } 168 174 dev_err_ratelimited(adev->dev, 169 175 "SMU: I'm not done with your previous command: SMN_C2PMSG_66:0x%08X SMN_C2PMSG_82:0x%08X", 170 176 msg_idx, prm);