diff options
author | Tom St Denis <[email protected]> | 2017-10-16 13:28:24 -0400 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2017-10-19 15:27:13 -0400 |
commit | 5936470456c51a2d32d8e8ee756dc9a8c2eb1be9 (patch) | |
tree | 97e16bb3fe1a839abe6ff73322b5a3d1afaa4d25 | |
parent | 610dd60bf71c441907d74cd109d6405d5a336c08 (diff) |
drm/amd/powerplay: Tidy up cz_dpm_powerup_uvd()
Use PP_CAP and simplify enable/disable logic.
Signed-off-by: Tom St Denis <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c index c2afc0aaa2cb..c57f7f3b54ec 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c @@ -1281,18 +1281,11 @@ int cz_dpm_powerdown_uvd(struct pp_hwmgr *hwmgr) int cz_dpm_powerup_uvd(struct pp_hwmgr *hwmgr) { - if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_UVDPowerGating)) { - if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_UVDDynamicPowerGating)) { - return smum_send_msg_to_smc_with_parameter( - hwmgr, - PPSMC_MSG_UVDPowerON, 1); - } else { - return smum_send_msg_to_smc_with_parameter( - hwmgr, - PPSMC_MSG_UVDPowerON, 0); - } + if (PP_CAP(PHM_PlatformCaps_UVDPowerGating)) { + return smum_send_msg_to_smc_with_parameter( + hwmgr, + PPSMC_MSG_UVDPowerON, + PP_CAP(PHM_PlatformCaps_UVDDynamicPowerGating) ? 1 : 0); } return 0; |