Skip to content

Commit 2f25d8c

Browse files
committed
drm/amdgpu/smu10: fix SoC/fclk units in auto mode
SMU takes clock limits in Mhz units. socclk and fclk were using 10 khz units in some cases. Switch to Mhz units. Fixes higher than required SoC clocks. Fixes: 97cf329 ("drm/amd/pm: Removed fixed clock in auto mode DPM") Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
1 parent 28c2523 commit 2f25d8c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -773,13 +773,13 @@ static int smu10_dpm_force_dpm_level(struct pp_hwmgr *hwmgr,
773773
smum_send_msg_to_smc_with_parameter(hwmgr,
774774
PPSMC_MSG_SetHardMinFclkByFreq,
775775
hwmgr->display_config->num_display > 3 ?
776-
data->clock_vol_info.vdd_dep_on_fclk->entries[0].clk :
776+
(data->clock_vol_info.vdd_dep_on_fclk->entries[0].clk / 100) :
777777
min_mclk,
778778
NULL);
779779

780780
smum_send_msg_to_smc_with_parameter(hwmgr,
781781
PPSMC_MSG_SetHardMinSocclkByFreq,
782-
data->clock_vol_info.vdd_dep_on_socclk->entries[0].clk,
782+
data->clock_vol_info.vdd_dep_on_socclk->entries[0].clk / 100,
783783
NULL);
784784
smum_send_msg_to_smc_with_parameter(hwmgr,
785785
PPSMC_MSG_SetHardMinVcn,
@@ -792,11 +792,11 @@ static int smu10_dpm_force_dpm_level(struct pp_hwmgr *hwmgr,
792792
NULL);
793793
smum_send_msg_to_smc_with_parameter(hwmgr,
794794
PPSMC_MSG_SetSoftMaxFclkByFreq,
795-
data->clock_vol_info.vdd_dep_on_fclk->entries[index_fclk].clk,
795+
data->clock_vol_info.vdd_dep_on_fclk->entries[index_fclk].clk / 100,
796796
NULL);
797797
smum_send_msg_to_smc_with_parameter(hwmgr,
798798
PPSMC_MSG_SetSoftMaxSocclkByFreq,
799-
data->clock_vol_info.vdd_dep_on_socclk->entries[index_socclk].clk,
799+
data->clock_vol_info.vdd_dep_on_socclk->entries[index_socclk].clk / 100,
800800
NULL);
801801
smum_send_msg_to_smc_with_parameter(hwmgr,
802802
PPSMC_MSG_SetSoftMaxVcn,

0 commit comments

Comments
 (0)