drm/amd/pm: correct smc voltage controller setup
authorEvan Quan <evan.quan@amd.com>
Fri, 25 Sep 2020 06:20:56 +0000 (14:20 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 27 Oct 2020 15:59:45 +0000 (11:59 -0400)
Correct Polaris10 smc voltage controller setup.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c

index 122b15d..7ec83a8 100644 (file)
@@ -237,7 +237,8 @@ static int smu7_get_current_pcie_lane_number(struct pp_hwmgr *hwmgr)
 */
 static int smu7_enable_smc_voltage_controller(struct pp_hwmgr *hwmgr)
 {
-       if (hwmgr->chip_id == CHIP_VEGAM) {
+       if (hwmgr->chip_id >= CHIP_POLARIS10 &&
+           hwmgr->chip_id <= CHIP_VEGAM) {
                PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device,
                                CGS_IND_REG__SMC, PWR_SVI2_PLANE1_LOAD, PSI1, 0);
                PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device,