@@ -1514,9 +1514,10 @@ static int smu_v14_0_1_set_fine_grain_gfx_freq_parameters(struct smu_context *sm
15141514
15151515 smu -> gfx_default_hard_min_freq = clk_table -> MinGfxClk ;
15161516 smu -> gfx_default_soft_max_freq = clk_table -> MaxGfxClk ;
1517- smu -> gfx_actual_hard_min_freq = 0 ;
1518- smu -> gfx_actual_soft_max_freq = 0 ;
1519-
1517+ if (smu -> gfx_actual_hard_min_freq == 0 )
1518+ smu -> gfx_actual_hard_min_freq = smu -> gfx_default_hard_min_freq ;
1519+ if (smu -> gfx_actual_soft_max_freq == 0 )
1520+ smu -> gfx_actual_soft_max_freq = smu -> gfx_default_soft_max_freq ;
15201521 return 0 ;
15211522}
15221523
@@ -1526,8 +1527,10 @@ static int smu_v14_0_0_set_fine_grain_gfx_freq_parameters(struct smu_context *sm
15261527
15271528 smu -> gfx_default_hard_min_freq = clk_table -> MinGfxClk ;
15281529 smu -> gfx_default_soft_max_freq = clk_table -> MaxGfxClk ;
1529- smu -> gfx_actual_hard_min_freq = 0 ;
1530- smu -> gfx_actual_soft_max_freq = 0 ;
1530+ if (smu -> gfx_actual_hard_min_freq == 0 )
1531+ smu -> gfx_actual_hard_min_freq = smu -> gfx_default_hard_min_freq ;
1532+ if (smu -> gfx_actual_soft_max_freq == 0 )
1533+ smu -> gfx_actual_soft_max_freq = smu -> gfx_default_soft_max_freq ;
15311534
15321535 return 0 ;
15331536}
@@ -1665,6 +1668,29 @@ static int smu_v14_0_common_set_mall_enable(struct smu_context *smu)
16651668 return ret ;
16661669}
16671670
1671+ static int smu_v14_0_0_restore_user_od_settings (struct smu_context * smu )
1672+ {
1673+ int ret ;
1674+
1675+ ret = smu_cmn_send_smc_msg_with_param (smu , SMU_MSG_SetHardMinGfxClk ,
1676+ smu -> gfx_actual_hard_min_freq ,
1677+ NULL );
1678+ if (ret ) {
1679+ dev_err (smu -> adev -> dev , "Failed to restore hard min sclk!\n" );
1680+ return ret ;
1681+ }
1682+
1683+ ret = smu_cmn_send_smc_msg_with_param (smu , SMU_MSG_SetSoftMaxGfxClk ,
1684+ smu -> gfx_actual_soft_max_freq ,
1685+ NULL );
1686+ if (ret ) {
1687+ dev_err (smu -> adev -> dev , "Failed to restore soft max sclk!\n" );
1688+ return ret ;
1689+ }
1690+
1691+ return 0 ;
1692+ }
1693+
16681694static const struct pptable_funcs smu_v14_0_0_ppt_funcs = {
16691695 .check_fw_status = smu_v14_0_check_fw_status ,
16701696 .check_fw_version = smu_v14_0_check_fw_version ,
@@ -1688,6 +1714,7 @@ static const struct pptable_funcs smu_v14_0_0_ppt_funcs = {
16881714 .mode2_reset = smu_v14_0_0_mode2_reset ,
16891715 .get_dpm_ultimate_freq = smu_v14_0_common_get_dpm_ultimate_freq ,
16901716 .set_soft_freq_limited_range = smu_v14_0_0_set_soft_freq_limited_range ,
1717+ .restore_user_od_settings = smu_v14_0_0_restore_user_od_settings ,
16911718 .od_edit_dpm_table = smu_v14_0_od_edit_dpm_table ,
16921719 .print_clk_levels = smu_v14_0_0_print_clk_levels ,
16931720 .force_clk_levels = smu_v14_0_0_force_clk_levels ,
0 commit comments