Signed-off-by: Tom St Denis <[email protected]>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 17 +++++------------
 1 file 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 6ba41d7401b6..e7ce123db942 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
@@ -1282,18 +1282,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;
-- 
2.12.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to