Skip to content

Commit 97cf329

Browse files
smavilaalexdeucher
authored andcommitted
drm/amd/pm: Removed fixed clock in auto mode DPM
SMU10_UMD_PSTATE_PEAK_FCLK value should not be used to set the DPM. Suggested-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent b4ebd08 commit 97cf329

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,8 @@ static int smu10_dpm_force_dpm_level(struct pp_hwmgr *hwmgr,
563563
struct smu10_hwmgr *data = hwmgr->backend;
564564
uint32_t min_sclk = hwmgr->display_config->min_core_set_clock;
565565
uint32_t min_mclk = hwmgr->display_config->min_mem_set_clock/100;
566+
uint32_t index_fclk = data->clock_vol_info.vdd_dep_on_fclk->count - 1;
567+
uint32_t index_socclk = data->clock_vol_info.vdd_dep_on_socclk->count - 1;
566568

567569
if (hwmgr->smu_version < 0x1E3700) {
568570
pr_info("smu firmware version too old, can not set dpm level\n");
@@ -676,13 +678,13 @@ static int smu10_dpm_force_dpm_level(struct pp_hwmgr *hwmgr,
676678
smum_send_msg_to_smc_with_parameter(hwmgr,
677679
PPSMC_MSG_SetHardMinFclkByFreq,
678680
hwmgr->display_config->num_display > 3 ?
679-
SMU10_UMD_PSTATE_PEAK_FCLK :
681+
data->clock_vol_info.vdd_dep_on_fclk->entries[0].clk :
680682
min_mclk,
681683
NULL);
682684

683685
smum_send_msg_to_smc_with_parameter(hwmgr,
684686
PPSMC_MSG_SetHardMinSocclkByFreq,
685-
SMU10_UMD_PSTATE_MIN_SOCCLK,
687+
data->clock_vol_info.vdd_dep_on_socclk->entries[0].clk,
686688
NULL);
687689
smum_send_msg_to_smc_with_parameter(hwmgr,
688690
PPSMC_MSG_SetHardMinVcn,
@@ -695,11 +697,11 @@ static int smu10_dpm_force_dpm_level(struct pp_hwmgr *hwmgr,
695697
NULL);
696698
smum_send_msg_to_smc_with_parameter(hwmgr,
697699
PPSMC_MSG_SetSoftMaxFclkByFreq,
698-
SMU10_UMD_PSTATE_PEAK_FCLK,
700+
data->clock_vol_info.vdd_dep_on_fclk->entries[index_fclk].clk,
699701
NULL);
700702
smum_send_msg_to_smc_with_parameter(hwmgr,
701703
PPSMC_MSG_SetSoftMaxSocclkByFreq,
702-
SMU10_UMD_PSTATE_PEAK_SOCCLK,
704+
data->clock_vol_info.vdd_dep_on_socclk->entries[index_socclk].clk,
703705
NULL);
704706
smum_send_msg_to_smc_with_parameter(hwmgr,
705707
PPSMC_MSG_SetSoftMaxVcn,

0 commit comments

Comments
 (0)