Skip to content

Commit

Permalink
drm/amd/pm: remove the average clock value in sysfs
Browse files Browse the repository at this point in the history
if it's fine-grained clock dpm, remove the average clock value and
reflects the real clock.

Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Kenneth Feng authored and Alex Deucher committed Oct 22, 2020
1 parent 392d256 commit 0435d77
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
Original file line number Diff line number Diff line change
Expand Up @@ -954,12 +954,16 @@ static int sienna_cichlid_print_clk_levels(struct smu_context *smu,
freq_values[1] = cur_value;
mark_index = cur_value == freq_values[0] ? 0 :
cur_value == freq_values[2] ? 2 : 1;
if (mark_index != 1)
freq_values[1] = (freq_values[0] + freq_values[2]) / 2;

for (i = 0; i < 3; i++) {
count = 3;
if (mark_index != 1) {
count = 2;
freq_values[1] = freq_values[2];
}

for (i = 0; i < count; i++) {
size += sprintf(buf + size, "%d: %uMhz %s\n", i, freq_values[i],
i == mark_index ? "*" : "");
cur_value == freq_values[i] ? "*" : "");
}

}
Expand Down

0 comments on commit 0435d77

Please sign in to comment.