Commit e03ff809 authored by Tom St Denis's avatar Tom St Denis Committed by Alex Deucher

drm/amd/powerplay: Tidy up cz_dpm_update_vce_dpm()

Use PP_CAP and tidy up indentation.
Signed-off-by: default avatarTom St Denis <tom.stdenis@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1f9506f5
...@@ -1328,17 +1328,16 @@ int cz_dpm_update_vce_dpm(struct pp_hwmgr *hwmgr) ...@@ -1328,17 +1328,16 @@ int cz_dpm_update_vce_dpm(struct pp_hwmgr *hwmgr)
hwmgr->dyn_state.vce_clock_voltage_dependency_table; hwmgr->dyn_state.vce_clock_voltage_dependency_table;
/* Stable Pstate is enabled and we need to set the VCE DPM to highest level */ /* Stable Pstate is enabled and we need to set the VCE DPM to highest level */
if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, if (PP_CAP(PHM_PlatformCaps_StablePState) ||
PHM_PlatformCaps_StablePState) hwmgr->en_umd_pstate) {
|| hwmgr->en_umd_pstate) {
cz_hwmgr->vce_dpm.hard_min_clk = cz_hwmgr->vce_dpm.hard_min_clk =
ptable->entries[ptable->count - 1].ecclk; ptable->entries[ptable->count - 1].ecclk;
smum_send_msg_to_smc_with_parameter(hwmgr, smum_send_msg_to_smc_with_parameter(hwmgr,
PPSMC_MSG_SetEclkHardMin, PPSMC_MSG_SetEclkHardMin,
cz_get_eclk_level(hwmgr, cz_get_eclk_level(hwmgr,
cz_hwmgr->vce_dpm.hard_min_clk, cz_hwmgr->vce_dpm.hard_min_clk,
PPSMC_MSG_SetEclkHardMin)); PPSMC_MSG_SetEclkHardMin));
} else { } else {
/*Program HardMin based on the vce_arbiter.ecclk */ /*Program HardMin based on the vce_arbiter.ecclk */
if (hwmgr->vce_arbiter.ecclk == 0) { if (hwmgr->vce_arbiter.ecclk == 0) {
...@@ -1351,10 +1350,10 @@ int cz_dpm_update_vce_dpm(struct pp_hwmgr *hwmgr) ...@@ -1351,10 +1350,10 @@ int cz_dpm_update_vce_dpm(struct pp_hwmgr *hwmgr)
} else { } else {
cz_hwmgr->vce_dpm.hard_min_clk = hwmgr->vce_arbiter.ecclk; cz_hwmgr->vce_dpm.hard_min_clk = hwmgr->vce_arbiter.ecclk;
smum_send_msg_to_smc_with_parameter(hwmgr, smum_send_msg_to_smc_with_parameter(hwmgr,
PPSMC_MSG_SetEclkHardMin, PPSMC_MSG_SetEclkHardMin,
cz_get_eclk_level(hwmgr, cz_get_eclk_level(hwmgr,
cz_hwmgr->vce_dpm.hard_min_clk, cz_hwmgr->vce_dpm.hard_min_clk,
PPSMC_MSG_SetEclkHardMin)); PPSMC_MSG_SetEclkHardMin));
} }
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment