drm/amd/pm: do not issue message while write "r" into pp_od_clk_voltage
Subsystems (3)
PATCH 1/1 drm/amd/pm: do not issue message while write "r" into pp_od_clk_voltage
We should commit the value after restore them back to default as well.
$ echo "r" > pp_od_clk_voltage $ echo "c" > pp_od_clk_voltage
--- .../drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 14 ------- .../gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 38 ------------------- 2 files changed, 52 deletions(-)
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c +0 -14
@@ -1526,20 +1526,6 @@ static int smu10_set_fine_grain_clk_vol(struct pp_hwmgr *hwmgr, smu10_data->gfx_actual_soft_min_freq = min_freq; smu10_data->gfx_actual_soft_max_freq = max_freq; - - ret =smum_send_msg_to_smc_with_parameter (hwmgr, - PPSMC_MSG_SetHardMinGfxClk, - min_freq, -NULL ); -if (ret) -return ret; - - ret =smum_send_msg_to_smc_with_parameter (hwmgr, - PPSMC_MSG_SetSoftMaxGfxClk, - max_freq, -NULL ); -if (ret) -return ret; }else if (type ==PP_OD_COMMIT_DPM_TABLE ) {if (size !=0 ) {pr_err ("Input parameter number not correct\n" );
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +0 -38
@@ -1451,7 +1451,6 @@ static int vangogh_od_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_TAB long input[], uint32_t size) { int ret = 0; -int i;struct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);if (!(smu_dpm_ctx->dpm_level ==AMD_DPM_FORCED_LEVEL_MANUAL )) {
@@ -1523,43 +1522,6 @@ static int vangogh_od_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_TAB smu->gfx_actual_soft_max_freq = smu->gfx_default_soft_max_freq; smu->cpu_actual_soft_min_freq = smu->cpu_default_soft_min_freq; smu->cpu_actual_soft_max_freq = smu->cpu_default_soft_max_freq; - - ret =smu_cmn_send_smc_msg_with_param (smu, SMU_MSG_SetHardMinGfxClk, - smu->gfx_actual_hard_min_freq,NULL ); -if (ret) { -dev_err (smu->adev->dev,"Restore the default hard min sclk failed!" ); -return ret; - } - - ret =smu_cmn_send_smc_msg_with_param (smu, SMU_MSG_SetSoftMaxGfxClk, - smu->gfx_actual_soft_max_freq,NULL ); -if (ret) { -dev_err (smu->adev->dev,"Restore the default soft max sclk failed!" ); -return ret; - } - -if (smu->adev->pm.fw_version <0x43f1b00 ) { -dev_warn (smu->adev->dev,"CPUSoftMax/CPUSoftMin are not supported, please update SBIOS!\n" ); -break ; - } - -for (i =0 ; i < smu->cpu_core_num; i++) { - ret =smu_cmn_send_smc_msg_with_param (smu, SMU_MSG_SetSoftMinCclk, - (i <<20 ) | smu->cpu_actual_soft_min_freq, -NULL ); -if (ret) { -dev_err (smu->adev->dev,"Set hard min cclk failed!" ); -return ret; - } - - ret =smu_cmn_send_smc_msg_with_param (smu, SMU_MSG_SetSoftMaxCclk, - (i <<20 ) | smu->cpu_actual_soft_max_freq, -NULL ); -if (ret) { -dev_err (smu->adev->dev,"Set soft max cclk failed!" ); -return ret; - } - } }break ;case PP_OD_COMMIT_DPM_TABLE :
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
________________________________
From: Huang, Ray <[email protected]>
Sent: Tuesday, February 9, 2021 11:41 PM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Du, Xiaojian <[email protected]>; Huang, Ray <[email protected]>
Subject: [PATCH] drm/amd/pm: do not issue message while write "r" into pp_od_clk_voltage
We should commit the value after restore them back to default as well.
$ echo "r" > pp_od_clk_voltage $ echo "c" > pp_od_clk_voltage
--- .../drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 14 ------- .../gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 38 ------------------- 2 files changed, 52 deletions(-)
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c +0 -14
@@ -1526,20 +1526,6 @@ static int smu10_set_fine_grain_clk_vol(struct pp_hwmgr *hwmgr, smu10_data->gfx_actual_soft_min_freq = min_freq; smu10_data->gfx_actual_soft_max_freq = max_freq; - - ret =smum_send_msg_to_smc_with_parameter (hwmgr, - PPSMC_MSG_SetHardMinGfxClk, - min_freq, -NULL ); -if (ret) -return ret; - - ret =smum_send_msg_to_smc_with_parameter (hwmgr, - PPSMC_MSG_SetSoftMaxGfxClk, - max_freq, -NULL ); -if (ret) -return ret; }else if (type ==PP_OD_COMMIT_DPM_TABLE ) {if (size !=0 ) {pr_err ("Input parameter number not correct\n" );
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +0 -38
@@ -1451,7 +1451,6 @@ static int vangogh_od_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_TAB long input[], uint32_t size) { int ret = 0; -int i;struct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);if (!(smu_dpm_ctx->dpm_level ==AMD_DPM_FORCED_LEVEL_MANUAL )) {
@@ -1523,43 +1522,6 @@ static int vangogh_od_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_TAB smu->gfx_actual_soft_max_freq = smu->gfx_default_soft_max_freq; smu->cpu_actual_soft_min_freq = smu->cpu_default_soft_min_freq; smu->cpu_actual_soft_max_freq = smu->cpu_default_soft_max_freq; - - ret =smu_cmn_send_smc_msg_with_param (smu, SMU_MSG_SetHardMinGfxClk, - smu->gfx_actual_hard_min_freq,NULL ); -if (ret) { -dev_err (smu->adev->dev,"Restore the default hard min sclk failed!" ); -return ret; - } - - ret =smu_cmn_send_smc_msg_with_param (smu, SMU_MSG_SetSoftMaxGfxClk, - smu->gfx_actual_soft_max_freq,NULL ); -if (ret) { -dev_err (smu->adev->dev,"Restore the default soft max sclk failed!" ); -return ret; - } - -if (smu->adev->pm.fw_version <0x43f1b00 ) { -dev_warn (smu->adev->dev,"CPUSoftMax/CPUSoftMin are not supported, please update SBIOS!\n" ); -break ; - } - -for (i =0 ; i < smu->cpu_core_num; i++) { - ret =smu_cmn_send_smc_msg_with_param (smu, SMU_MSG_SetSoftMinCclk, - (i <<20 ) | smu->cpu_actual_soft_min_freq, -NULL ); -if (ret) { -dev_err (smu->adev->dev,"Set hard min cclk failed!" ); -return ret; - } - - ret =smu_cmn_send_smc_msg_with_param (smu, SMU_MSG_SetSoftMaxCclk, - (i <<20 ) | smu->cpu_actual_soft_max_freq, -NULL ); -if (ret) { -dev_err (smu->adev->dev,"Set soft max cclk failed!" ); -return ret; - } - } }break ;case PP_OD_COMMIT_DPM_TABLE :
--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx