Commit 8de7948d authored by Asad Kamal's avatar Asad Kamal Committed by Alex Deucher

drm/amd/pm: Update uclk/sclk limit report format

Use OD (pp_od_clk_voltage) interface to report current limits,
default or those set by user, for SCLK and UCLK on aldebaran.
Signed-off-by: default avatarAsad Kamal <asad.kamal@amd.com>
Reviewed-by: default avatarLijo Lazar <lijo.lazar@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 7d3ca076
...@@ -759,8 +759,11 @@ static int aldebaran_emit_clk_levels(struct smu_context *smu, ...@@ -759,8 +759,11 @@ static int aldebaran_emit_clk_levels(struct smu_context *smu,
switch (type) { switch (type) {
case SMU_OD_SCLK: case SMU_OD_SCLK:
*offset += sysfs_emit_at(buf, *offset, "%s:\n", "GFXCLK"); *offset += sysfs_emit_at(buf, *offset, "%s:\n", "OD_SCLK");
fallthrough; *offset += sysfs_emit_at(buf, *offset, "0: %uMhz\n1: %uMhz\n",
pstate_table->gfxclk_pstate.curr.min,
pstate_table->gfxclk_pstate.curr.max);
return 0;
case SMU_SCLK: case SMU_SCLK:
ret = aldebaran_get_current_clk_freq_by_table(smu, SMU_GFXCLK, &cur_value); ret = aldebaran_get_current_clk_freq_by_table(smu, SMU_GFXCLK, &cur_value);
if (ret) { if (ret) {
...@@ -788,8 +791,11 @@ static int aldebaran_emit_clk_levels(struct smu_context *smu, ...@@ -788,8 +791,11 @@ static int aldebaran_emit_clk_levels(struct smu_context *smu,
break; break;
case SMU_OD_MCLK: case SMU_OD_MCLK:
*offset += sysfs_emit_at(buf, *offset, "%s:\n", "MCLK"); *offset += sysfs_emit_at(buf, *offset, "%s:\n", "OD_MCLK");
fallthrough; *offset += sysfs_emit_at(buf, *offset, "0: %uMhz\n1: %uMhz\n",
pstate_table->uclk_pstate.curr.min,
pstate_table->uclk_pstate.curr.max);
return 0;
case SMU_MCLK: case SMU_MCLK:
ret = aldebaran_get_current_clk_freq_by_table(smu, SMU_UCLK, &cur_value); ret = aldebaran_get_current_clk_freq_by_table(smu, SMU_UCLK, &cur_value);
if (ret) { if (ret) {
...@@ -850,7 +856,6 @@ static int aldebaran_emit_clk_levels(struct smu_context *smu, ...@@ -850,7 +856,6 @@ static int aldebaran_emit_clk_levels(struct smu_context *smu,
} }
switch (type) { switch (type) {
case SMU_OD_SCLK:
case SMU_SCLK: case SMU_SCLK:
for (i = 0; i < display_levels; i++) { for (i = 0; i < display_levels; i++) {
clock_mhz = freq_values[i]; clock_mhz = freq_values[i];
...@@ -863,7 +868,6 @@ static int aldebaran_emit_clk_levels(struct smu_context *smu, ...@@ -863,7 +868,6 @@ static int aldebaran_emit_clk_levels(struct smu_context *smu,
} }
break; break;
case SMU_OD_MCLK:
case SMU_MCLK: case SMU_MCLK:
case SMU_SOCCLK: case SMU_SOCCLK:
case SMU_FCLK: case SMU_FCLK:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment