Skip to contentSkip to conversation

drm/amdgpu: add header line for power profile on Arcturus

PATCH In review Alex Deucher 2 participants 2 messages Dec 5, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: add header line for power profile on Arcturus

So the output is consistent with other asics.

---
 drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +5 -0
index 3f13986d8e50..199c96caa882 100644
@@ -1320,12 +1320,17 @@ static int arcturus_get_power_profile_mode(struct smu_context *smu,
 					"VR",
 					"COMPUTE",
 					"CUSTOM"};
+	static const char *title[] = {
+			"PROFILE_INDEX(NAME)"};
 	uint32_t i, size = 0;
 	int16_t workload_type = 0;
 
 	if (!smu->pm_enabled || !buf)
 		return -EINVAL;
 
+	size += sprintf(buf + size, "%16s\n",
+			title[0]);
+
 	for (i = 0; i <= PP_SMC_POWER_PROFILE_CUSTOM; i++) {
 		/*
 		 * Conv PP_SMC_POWER_PROFILE* to WORKLOAD_PPLIB_*_BIT
Signature · 6 lines
2.23.0

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

Thanks for the fix. Reviewed-by: Evan Quan <[email protected]>

Quoted 43 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Thursday, December 5, 2019 11:09 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: add header line for power profile on Arcturus

So the output is consistent with other asics.

---
 drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +5 -0
index 3f13986d8e50..199c96caa882 100644
@@ -1320,12 +1320,17 @@ static int arcturus_get_power_profile_mode(struct
 smu_context *smu,
 					"VR",
 					"COMPUTE",
 					"CUSTOM"};
+	static const char *title[] = {
+			"PROFILE_INDEX(NAME)"};
 	uint32_t i, size = 0;
 	int16_t workload_type = 0;
 
 	if (!smu->pm_enabled || !buf)
 		return -EINVAL;
 
+	size += sprintf(buf + size, "%16s\n",
+			title[0]);
+
 	for (i = 0; i <= PP_SMC_POWER_PROFILE_CUSTOM; i++) {
 		/*

* Conv PP_SMC_POWER_PROFILE* to
WORKLOAD_PPLIB_*_BIT
--
2.23.0

Quoted 9 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.free
desktop.org%2Fmailman%2Flistinfo%2Famd- gfx&amp;data=02%7C01%7Cevan.quan%40amd.com%7C8ece9bd486934eac9b db08d779308524%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637 111121703901932&amp;sdata=lUZprYsTzq%2FcgwwXJIwaOnMf4583o8aUK8P5 CYXYjrM%3D&amp;reserved=0

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