drm/amd/powerplay: refine vce dpm update code on Cz.

Program HardMin based on the vce_arbiter.ecclk
if ecclk is 0, disable ECLK DPM 0. Otherwise VCE
could hang if switching SCLK from DPM 0 to 6/7

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Rex Zhu 2017-01-10 15:47:50 +08:00 committed by Alex Deucher
parent a844764751
commit ab8db87b82

View File

@ -1402,14 +1402,22 @@ int cz_dpm_update_vce_dpm(struct pp_hwmgr *hwmgr)
cz_hwmgr->vce_dpm.hard_min_clk, cz_hwmgr->vce_dpm.hard_min_clk,
PPSMC_MSG_SetEclkHardMin)); PPSMC_MSG_SetEclkHardMin));
} else { } else {
/*EPR# 419220 -HW limitation to to */ /*Program HardMin based on the vce_arbiter.ecclk */
cz_hwmgr->vce_dpm.hard_min_clk = hwmgr->vce_arbiter.ecclk; if (hwmgr->vce_arbiter.ecclk == 0) {
smum_send_msg_to_smc_with_parameter(hwmgr->smumgr, smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
PPSMC_MSG_SetEclkHardMin, PPSMC_MSG_SetEclkHardMin, 0);
cz_get_eclk_level(hwmgr, /* disable ECLK DPM 0. Otherwise VCE could hang if
cz_hwmgr->vce_dpm.hard_min_clk, * switching SCLK from DPM 0 to 6/7 */
PPSMC_MSG_SetEclkHardMin)); smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
PPSMC_MSG_SetEclkSoftMin, 1);
} else {
cz_hwmgr->vce_dpm.hard_min_clk = hwmgr->vce_arbiter.ecclk;
smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
PPSMC_MSG_SetEclkHardMin,
cz_get_eclk_level(hwmgr,
cz_hwmgr->vce_dpm.hard_min_clk,
PPSMC_MSG_SetEclkHardMin));
}
} }
return 0; return 0;
} }