Skip to contentSkip to conversation

drm/amdgpu/smu13.0.7: print index for profiles

PATCH In review Alex Deucher 2 participants 2 messages Aug 22, 2024 – Aug 23, 2024

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu/smu13.0.7: print index for profiles

Print the index for the profiles.

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +2 -2
index a7d0231727e8..7bc95c404377 100644
@@ -2378,7 +2378,7 @@ static int smu_v13_0_7_get_power_profile_mode(struct smu_context *smu, char *buf
 
 	size += sysfs_emit_at(buf, size, "                              ");
 	for (i = 0; i <= PP_SMC_POWER_PROFILE_WINDOW3D; i++)
-		size += sysfs_emit_at(buf, size, "%-14s%s", amdgpu_pp_profile_name[i],
+		size += sysfs_emit_at(buf, size, "%d %-14s%s", i, amdgpu_pp_profile_name[i],
 			(i == smu->power_profile_mode) ? "* " : "  ");
 
 	size += sysfs_emit_at(buf, size, "\n");
@@ -2408,7 +2408,7 @@ static int smu_v13_0_7_get_power_profile_mode(struct smu_context *smu, char *buf
 do {													\
 	size += sysfs_emit_at(buf, size, "%-30s", #field);						\
 	for (j = 0; j <= PP_SMC_POWER_PROFILE_WINDOW3D; j++)						\
-		size += sysfs_emit_at(buf, size, "%-16d", activity_monitor_external[j].DpmActivityMonitorCoeffInt.field);		\
+		size += sysfs_emit_at(buf, size, "%-18d", activity_monitor_external[j].DpmActivityMonitorCoeffInt.field);		\
 	size += sysfs_emit_at(buf, size, "\n");								\
 } while (0)
 
Signature · 1 line
2.46.0
maintainer Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Friday, August 23, 2024 5:55 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/smu13.0.7: print index for profiles

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.

Print the index for the profiles.

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +2 -1
index a7d0231727e8..7bc95c404377 100644
@@ -2378,7 +2378,7 @@ static int smu_v13_0_7_get_power_profile_mode(struct smu_context *smu, char *buf
 
        size += sysfs_emit_at(buf, size, "                              ");
        for (i = 0; i <= PP_SMC_POWER_PROFILE_WINDOW3D; i++)
-               size += sysfs_emit_at(buf, size, "%-14s%s", amdgpu_pp_profile_name[i],
+               size += sysfs_emit_at(buf, size, "%d %-14s%s", i,
+ amdgpu_pp_profile_name[i],
                        (i == smu->power_profile_mode) ? "* " : "  ");
 
        size += sysfs_emit_at(buf, size, "\n"); @@ -2408,7 +2408,7 @@ static int smu_v13_0_7_get_power_profile_mode(struct smu_context *smu, char *buf
 do {                                                                                                   \
        size += sysfs_emit_at(buf, size, "%-30s", #field);                                              \
        for (j = 0; j <= PP_SMC_POWER_PROFILE_WINDOW3D; j++)                                            \
-               size += sysfs_emit_at(buf, size, "%-16d", activity_monitor_external[j].DpmActivityMonitorCoeffInt.field);               \
+               size += sysfs_emit_at(buf, size, "%-18d", activity_monitor_external[j].DpmActivityMonitorCoeffInt.field);               \
        size += sysfs_emit_at(buf, size, "\n");                                                         \

} while (0)

--
2.46.0