Skip to contentSkip to conversation

drm/amd/pp: Refine pp_dpm_set_pp_table logic

PATCH In review Rex Zhu 1 participant 2 messages Jan 2, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 3/3 drm/amd/pp: Refine pp_dpm_set_pp_table logic

Disable avfs control before set user
defined pp table.

Change-Id I0a63aa1def82b166d3f2aa542c3a190339270236
---
 drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/powerplay/amd_powerplay.c +4 -4
index fa9d161..b6c18cf 100644
@@ -828,16 +828,16 @@ static int pp_dpm_set_pp_table(void *handle, const char *buf, size_t size)
 	hwmgr->soft_pp_table = hwmgr->hardcode_pp_table;
 	mutex_unlock(&pp_handle->pp_lock);
 
-	ret = amd_powerplay_reset(handle);
-	if (ret)
-		return ret;
-
 	if (hwmgr->hwmgr_func->avfs_control) {
 		ret = hwmgr->hwmgr_func->avfs_control(hwmgr, false);
 		if (ret)
 			return ret;
 	}
 
+	ret = amd_powerplay_reset(handle);
+	if (ret)
+		return ret;
+
 	return 0;
 }
 
Signature · 6 lines
1.9.1

_______________________________________________
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): 1514879612-30570-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

author
#2 lore raw

Sorry, please ignore this patch as the new logic is wrong.

Best Regards
Rex

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Tuesday, January 02, 2018 3:54 PM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH 3/3] drm/amd/pp: Refine pp_dpm_set_pp_table logic

Disable avfs control before set user
defined pp table.

Change-Id I0a63aa1def82b166d3f2aa542c3a190339270236
---
 drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/powerplay/amd_powerplay.c +4 -4
index fa9d161..b6c18cf 100644
@@ -828,16 +828,16 @@ static int pp_dpm_set_pp_table(void *handle, const char *buf, size_t size)
 	hwmgr->soft_pp_table = hwmgr->hardcode_pp_table;
 	mutex_unlock(&pp_handle->pp_lock);
 
-	ret = amd_powerplay_reset(handle);
-	if (ret)
-		return ret;
-
 	if (hwmgr->hwmgr_func->avfs_control) {
 		ret = hwmgr->hwmgr_func->avfs_control(hwmgr, false);
 		if (ret)
 			return ret;
 	}
 
+	ret = amd_powerplay_reset(handle);
+	if (ret)
+		return ret;
+
 	return 0;
 }
 
Signature · 10 lines
1.9.1

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