Skip to content

Commit a992c90

Browse files
Lijo Lazaralexdeucher
authored andcommitted
drm/amd/pm: Fix smuv13.0.6 current clock reporting
When current clock is equal to max dpm level clock, the level is not indicated correctly with *. Fix by comparing current clock against dpm level value. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Asad Kamal <asad.kamal@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org # 6.7.x
1 parent 91739a8 commit a992c90

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,9 @@ static int smu_v13_0_6_print_clks(struct smu_context *smu, char *buf, int size,
970970
if (i < (clocks.num_levels - 1))
971971
clk2 = clocks.data[i + 1].clocks_in_khz / 1000;
972972

973-
if (curr_clk >= clk1 && curr_clk < clk2) {
973+
if (curr_clk == clk1) {
974+
level = i;
975+
} else if (curr_clk >= clk1 && curr_clk < clk2) {
974976
level = (curr_clk - clk1) <= (clk2 - curr_clk) ?
975977
i :
976978
i + 1;

0 commit comments

Comments
 (0)