drm/amd/pm: denote S to the actual clock
Subsystems (3)
Kenneth Feng
maintainerPATCH 1/1 drm/amd/pm: denote S to the actual clock
denote S to the actual clock in smu v13.0.0/v13.0.7/v13.0.10
Signed-off-by Kenneth Feng <[email protected]>
--- 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(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +6 -6
@@ -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",
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +6 -6
@@ -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",
Signature · 1 line
2.34.1
Quoted 13 lines · Kenneth Feng
denote S to the actual clock in smu v13.0.0/v13.0.7/v13.0.10
Signed-off-by Kenneth Feng <[email protected]>--- 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(-)drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +0
-0
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c static int smu_v13_0_0_print_clk_levels(struct smu_context *smu, · line 1274
Quoted 6 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +2
-1@@ -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
S is not used to indicate actual clock always.
'S' is only used to indicate the "deep sleep state" of the clock. If the clock is at deep sleep frequency ex: 95MHz, it's indicated by special level S.
S:95Mhz*
0:500Mhz
1:1900Mhz
If the clock is active and operating as normal ex:1120MHz, the level is not indicated by S. Sample values at that state will be
0:500Mhz
1:1120Mhz*
2:1900Mhz
Thanks,
Lijo
Quoted 47 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +4
-5* - 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",drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +6
-6@@ -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",