Thanks Tom.

The attached patch can fix this bug.



Best Regards

Rex




________________________________
From: StDenis, Tom
Sent: Thursday, October 5, 2017 9:42 PM
To: amd-gfx mailing list
Cc: Zhu, Rex; Deucher, Alexander
Subject: tonga mclk regression

I've bisected it to this commit

[root@fx6 linux2]# git bisect bad
df1e63942063a0638a5813e5904988d834db2665 is the first bad commit
commit df1e63942063a0638a5813e5904988d834db2665
Author: Rex Zhu <[email protected]>
Date:   Fri Sep 1 13:46:20 2017 +0800

     drm/amd/powerplay: delete eventmgr layer in poweprlay

     Reviewed-by: Alex Deucher <[email protected]>
     Signed-off-by: Rex Zhu <[email protected]>
     Signed-off-by: Alex Deucher <[email protected]>

:040000 040000 5b955ab18919974b351c81565044f3280253fe03
35f848a30a0b57d7fdee53133ae5d8e066406d8f M      drivers

The commit before this has a properly throttling mclk with
glmark2/xonotic-glx and this commit does not (locks at 300MHz).  Should
point that the commit ahead of this locks at 150MHz (lowest setting).

I haven't actually looked at this commit for a fix yet.

Cheers,
Tom
From 6efbf69ff2c7abc2143f50ee28fa824c91db485a Mon Sep 17 00:00:00 2001
From: Rex Zhu <[email protected]>
Date: Fri, 6 Oct 2017 12:17:16 +0800
Subject: [PATCH 2/2] drm/amd/powerplay: fix mclk can't switch on Tonga

regresstion issue caused by
commit 47047263c52779f1f3393c32e3e53661b53a372e
("drm/amd/powerplay: delete eventmgr related files.")

Change-Id: Ia2ddf83443a666fd1e97ddf4142acce147be00dc
Signed-off-by: Rex Zhu <[email protected]>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c  | 1 -
 drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c | 6 +++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
index 35e80c9..ce59e0e 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
@@ -292,7 +292,6 @@ int hwmgr_hw_fini(struct pp_instance *handle)
 
 	phm_stop_thermal_controller(hwmgr);
 	psm_set_boot_states(hwmgr);
-	phm_display_configuration_changed(hwmgr);
 	psm_adjust_power_state_dynamic(hwmgr, false, NULL);
 	phm_disable_dynamic_state_management(hwmgr);
 	phm_disable_clock_power_gatings(hwmgr);
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
index 167cdc3..ffa44bb 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
@@ -224,6 +224,8 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip,
 	if (skip)
 		return 0;
 
+	phm_display_configuration_changed(hwmgr);
+
 	if (new_ps != NULL)
 		requested = new_ps;
 	else
@@ -232,7 +234,6 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip,
 	pcurrent = hwmgr->current_ps;
 
 	phm_apply_state_adjust_rules(hwmgr, requested, pcurrent);
-
 	if (pcurrent == NULL || (0 != phm_check_states_equal(hwmgr,
 			&pcurrent->hardware, &requested->hardware, &equal)))
 		equal = false;
@@ -241,6 +242,9 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip,
 		phm_set_power_state(hwmgr, &pcurrent->hardware, &requested->hardware);
 		memcpy(hwmgr->current_ps, hwmgr->request_ps, hwmgr->ps_size);
 	}
+
+	phm_notify_smc_display_config_after_ps_adjustment(hwmgr);
+
 	return 0;
 }
 
-- 
1.9.1

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

Reply via email to