Change-Id: Ibd74590c3fe9dbdeac924b697d18448bddbefcdb
---
 drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c 
b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
index a125e30..10bf687 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
@@ -1359,6 +1359,11 @@ static int cz_dpm_force_dpm_level(struct pp_hwmgr *hwmgr,
        if (level == hwmgr->dpm_level)
                return 0;
 
+       if (level == AMD_DPM_FORCED_LEVEL_PROFILE_PEAK)
+               cz_nbdpm_pstate_enable_disable(hwmgr, false, false);
+       else if (level == AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD)
+               cz_nbdpm_pstate_enable_disable(hwmgr, false, true);
+
        switch (level) {
        case AMD_DPM_FORCED_LEVEL_HIGH:
        case AMD_DPM_FORCED_LEVEL_PROFILE_PEAK:
@@ -1435,7 +1440,8 @@ int cz_dpm_update_uvd_dpm(struct pp_hwmgr *hwmgr, bool 
bgate)
        if (!bgate) {
                /* Stable Pstate is enabled and we need to set the UVD DPM to 
highest level */
                if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
-                                        PHM_PlatformCaps_StablePState)) {
+                                        PHM_PlatformCaps_StablePState)
+                       || hwmgr->en_umd_pstate) {
                        cz_hwmgr->uvd_dpm.hard_min_clk =
                                   ptable->entries[ptable->count - 1].vclk;
 
@@ -1464,7 +1470,8 @@ int  cz_dpm_update_vce_dpm(struct pp_hwmgr *hwmgr)
 
        /* Stable Pstate is enabled and we need to set the VCE DPM to highest 
level */
        if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
-                                        PHM_PlatformCaps_StablePState)) {
+                                       PHM_PlatformCaps_StablePState)
+                                       || hwmgr->en_umd_pstate) {
                cz_hwmgr->vce_dpm.hard_min_clk =
                                  ptable->entries[ptable->count - 1].ecclk;
 
-- 
1.9.1

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

Reply via email to