mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 06:02:05 +00:00
drm/amd/pm: Fix esm reg mask use to get pcie speed
Fix mask used for esm ctrl register to get pcie link speed on smu_v11_0_3, smu_v13_0_2 & smu_v13_0_6 Fixes:511a95552e
("drm/amd/pm: Add SMU 13.0.6 support") Fixes:c05d1c4015
("drm/amd/swsmu: add aldebaran smu13 ip support (v3)") Fixes:f1c3785931
("drm/amd/powerplay: add Arcturus support for gpu metrics export") Signed-off-by: Asad Kamal <asad.kamal@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Le Ma <le.ma@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
a3c4581806
commit
b485b899e5
@ -2272,8 +2272,8 @@ static uint16_t arcturus_get_current_pcie_link_speed(struct smu_context *smu)
|
||||
|
||||
/* TODO: confirm this on real target */
|
||||
esm_ctrl = RREG32_PCIE(smnPCIE_ESM_CTRL);
|
||||
if ((esm_ctrl >> 15) & 0x1FFFF)
|
||||
return (uint16_t)(((esm_ctrl >> 8) & 0x3F) + 128);
|
||||
if ((esm_ctrl >> 15) & 0x1)
|
||||
return (uint16_t)(((esm_ctrl >> 8) & 0x7F) + 128);
|
||||
|
||||
return smu_v11_0_get_current_pcie_link_speed(smu);
|
||||
}
|
||||
|
@ -1683,8 +1683,8 @@ static int aldebaran_get_current_pcie_link_speed(struct smu_context *smu)
|
||||
|
||||
/* TODO: confirm this on real target */
|
||||
esm_ctrl = RREG32_PCIE(smnPCIE_ESM_CTRL);
|
||||
if ((esm_ctrl >> 15) & 0x1FFFF)
|
||||
return (((esm_ctrl >> 8) & 0x3F) + 128);
|
||||
if ((esm_ctrl >> 15) & 0x1)
|
||||
return (((esm_ctrl >> 8) & 0x7F) + 128);
|
||||
|
||||
return smu_v13_0_get_current_pcie_link_speed(smu);
|
||||
}
|
||||
|
@ -2148,8 +2148,8 @@ static int smu_v13_0_6_get_current_pcie_link_speed(struct smu_context *smu)
|
||||
|
||||
/* TODO: confirm this on real target */
|
||||
esm_ctrl = RREG32_PCIE(smnPCIE_ESM_CTRL);
|
||||
if ((esm_ctrl >> 15) & 0x1FFFF)
|
||||
return (((esm_ctrl >> 8) & 0x3F) + 128);
|
||||
if ((esm_ctrl >> 15) & 0x1)
|
||||
return (((esm_ctrl >> 8) & 0x7F) + 128);
|
||||
|
||||
speed_level = (RREG32_PCIE(smnPCIE_LC_SPEED_CNTL) &
|
||||
PCIE_LC_SPEED_CNTL__LC_CURRENT_DATA_RATE_MASK)
|
||||
|
Loading…
Reference in New Issue
Block a user