提交 b2ce723c 编写于 作者: R Rex Zhu 提交者: Alex Deucher

drm/amd/powerplay: fix force dpm level failed on CZ

Signed-off-by: NRex Zhu <Rex.Zhu@amd.com>
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 97407b63
...@@ -1240,13 +1240,18 @@ static int cz_phm_force_dpm_highest(struct pp_hwmgr *hwmgr) ...@@ -1240,13 +1240,18 @@ static int cz_phm_force_dpm_highest(struct pp_hwmgr *hwmgr)
{ {
struct cz_hwmgr *cz_hwmgr = (struct cz_hwmgr *)(hwmgr->backend); struct cz_hwmgr *cz_hwmgr = (struct cz_hwmgr *)(hwmgr->backend);
if (cz_hwmgr->sclk_dpm.soft_min_clk != smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
cz_hwmgr->sclk_dpm.soft_max_clk) PPSMC_MSG_SetSclkSoftMin,
smum_send_msg_to_smc_with_parameter(hwmgr->smumgr, cz_get_sclk_level(hwmgr,
PPSMC_MSG_SetSclkSoftMin, cz_hwmgr->sclk_dpm.soft_max_clk,
cz_get_sclk_level(hwmgr, PPSMC_MSG_SetSclkSoftMin));
cz_hwmgr->sclk_dpm.soft_max_clk,
PPSMC_MSG_SetSclkSoftMin)); smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
PPSMC_MSG_SetSclkSoftMax,
cz_get_sclk_level(hwmgr,
cz_hwmgr->sclk_dpm.soft_max_clk,
PPSMC_MSG_SetSclkSoftMax));
return 0; return 0;
} }
...@@ -1292,17 +1297,17 @@ static int cz_phm_force_dpm_lowest(struct pp_hwmgr *hwmgr) ...@@ -1292,17 +1297,17 @@ static int cz_phm_force_dpm_lowest(struct pp_hwmgr *hwmgr)
{ {
struct cz_hwmgr *cz_hwmgr = (struct cz_hwmgr *)(hwmgr->backend); struct cz_hwmgr *cz_hwmgr = (struct cz_hwmgr *)(hwmgr->backend);
if (cz_hwmgr->sclk_dpm.soft_min_clk != smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
cz_hwmgr->sclk_dpm.soft_max_clk) { PPSMC_MSG_SetSclkSoftMax,
cz_hwmgr->sclk_dpm.soft_max_clk = cz_get_sclk_level(hwmgr,
cz_hwmgr->sclk_dpm.soft_min_clk; cz_hwmgr->sclk_dpm.soft_min_clk,
PPSMC_MSG_SetSclkSoftMax));
smum_send_msg_to_smc_with_parameter(hwmgr->smumgr, smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
PPSMC_MSG_SetSclkSoftMax, PPSMC_MSG_SetSclkSoftMin,
cz_get_sclk_level(hwmgr, cz_get_sclk_level(hwmgr,
cz_hwmgr->sclk_dpm.soft_max_clk, cz_hwmgr->sclk_dpm.soft_min_clk,
PPSMC_MSG_SetSclkSoftMax)); PPSMC_MSG_SetSclkSoftMin));
}
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册