Skip to contentSkip to conversation

drm/amd/powerplay: fix wrong clock adjust sequence

PATCH In review Evan Quan 2 participants 2 messages Jun 6, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Evan Quan

author
#0 lore raw

PATCH 1/1 drm/amd/powerplay: fix wrong clock adjust sequence

The clocks should be adjusted after display configuration changed. Otherwise, the socclk and memclk may be forced on an unnecessary higher level.

Change-Id I0170e968ba1f64d15d4238b658eefc307adc2642
---
 drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c +6 -7
index 0af13c1..323990b 100644
@@ -265,19 +265,18 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip,
 	if (skip)
 		return 0;
 
-	if (!hwmgr->ps)
-		/*
-		 * for vega12/vega20 which does not support power state manager
-		 * DAL clock limits should also be honoured
-		 */
-		phm_apply_clock_adjust_rules(hwmgr);
-
 	phm_pre_display_configuration_changed(hwmgr);
 
 	phm_display_configuration_changed(hwmgr);
 
 	if (hwmgr->ps)
 		power_state_management(hwmgr, new_ps);
+	else
+		/*
+		 * for vega12/vega20 which does not support power state manager
+		 * DAL clock limits should also be honoured
+		 */
+		phm_apply_clock_adjust_rules(hwmgr);
 
 	phm_notify_smc_display_config_after_ps_adjustment(hwmgr);
 
Signature · 6 lines
2.7.4

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

A message that is not in the archive (sent off-list or not yet received): 1528264486-28733-1-git-send-email-evan.quan-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Best Regards

Rex

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Evan Quan <[email protected]>
Sent: Wednesday, June 6, 2018 1:54 PM
To: [email protected]
Cc: Quan, Evan; Zhu, Rex
Subject: [PATCH] drm/amd/powerplay: fix wrong clock adjust sequence

The clocks should be adjusted after display configuration changed. Otherwise, the socclk and memclk may be forced on an unnecessary higher level.

Change-Id I0170e968ba1f64d15d4238b658eefc307adc2642
---
 drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c +6 -7
index 0af13c1..323990b 100644
@@ -265,19 +265,18 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip,
         if (skip)
                 return 0;
 
-       if (!hwmgr->ps)
-               /*
-                * for vega12/vega20 which does not support power state manager
-                * DAL clock limits should also be honoured
-                */
-               phm_apply_clock_adjust_rules(hwmgr);
-
         phm_pre_display_configuration_changed(hwmgr);
 
         phm_display_configuration_changed(hwmgr);
 
         if (hwmgr->ps)
                 power_state_management(hwmgr, new_ps);
+       else
+               /*
+                * for vega12/vega20 which does not support power state manager
+                * DAL clock limits should also be honoured
+                */
+               phm_apply_clock_adjust_rules(hwmgr);
 
         phm_notify_smc_display_config_after_ps_adjustment(hwmgr);
 

--
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of Conduct.

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