[PATCH] drm/amd/pm: denote S to the actual clock

Kenneth Feng kenneth.feng at amd.com
Wed Feb 7 08:33:33 UTC 2024


denote S to the actual clock in smu v13.0.0/v13.0.7/v13.0.10

Signed-off-by: Kenneth Feng <kenneth.feng at amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 12 ++++++------
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
index 2e7518f4ae1a..63a930c4da01 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
@@ -1270,18 +1270,18 @@ static int smu_v13_0_0_print_clk_levels(struct smu_context *smu,
 			 *   - level 1 -> max clock freq
 			 * And the current clock frequency can be any value between them.
 			 * So, if the current clock frequency is not at level 0 or level 1,
-			 * we will fake it as three dpm levels:
+			 * we will denote it to S:
+			 *   - level S -> current actual clock freq
 			 *   - level 0 -> min clock freq
-			 *   - level 1 -> current actual clock freq
-			 *   - level 2 -> max clock freq
+			 *   - level 1 -> max clock freq
 			 */
 			if ((single_dpm_table->dpm_levels[0].value != curr_freq) &&
 			     (single_dpm_table->dpm_levels[1].value != curr_freq)) {
+				size += sysfs_emit_at(buf, size, "S: %uMhz *\n",
+						curr_freq);
 				size += sysfs_emit_at(buf, size, "0: %uMhz\n",
 						single_dpm_table->dpm_levels[0].value);
-				size += sysfs_emit_at(buf, size, "1: %uMhz *\n",
-						curr_freq);
-				size += sysfs_emit_at(buf, size, "2: %uMhz\n",
+				size += sysfs_emit_at(buf, size, "1: %uMhz\n",
 						single_dpm_table->dpm_levels[1].value);
 			} else {
 				size += sysfs_emit_at(buf, size, "0: %uMhz %s\n",
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
index 0ffdb58af74e..dbdb50173de7 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
@@ -1259,18 +1259,18 @@ static int smu_v13_0_7_print_clk_levels(struct smu_context *smu,
 			 *   - level 1 -> max clock freq
 			 * And the current clock frequency can be any value between them.
 			 * So, if the current clock frequency is not at level 0 or level 1,
-			 * we will fake it as three dpm levels:
+			 * we will denote it to S:
+			 *   - level S -> current actual clock freq
 			 *   - level 0 -> min clock freq
-			 *   - level 1 -> current actual clock freq
-			 *   - level 2 -> max clock freq
+			 *   - level 1 -> max clock freq
 			 */
 			if ((single_dpm_table->dpm_levels[0].value != curr_freq) &&
 			     (single_dpm_table->dpm_levels[1].value != curr_freq)) {
+				size += sysfs_emit_at(buf, size, "S: %uMhz *\n",
+						curr_freq);
 				size += sysfs_emit_at(buf, size, "0: %uMhz\n",
 						single_dpm_table->dpm_levels[0].value);
-				size += sysfs_emit_at(buf, size, "1: %uMhz *\n",
-						curr_freq);
-				size += sysfs_emit_at(buf, size, "2: %uMhz\n",
+				size += sysfs_emit_at(buf, size, "1: %uMhz\n",
 						single_dpm_table->dpm_levels[1].value);
 			} else {
 				size += sysfs_emit_at(buf, size, "0: %uMhz %s\n",
-- 
2.34.1



More information about the amd-gfx mailing list