]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amd/pm:Fix GFX deep sleep clock reporting
authorLijo Lazar <lijo.lazar@amd.com>
Thu, 24 Aug 2023 12:54:52 +0000 (18:24 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 20 Sep 2023 16:23:55 +0000 (12:23 -0400)
For SMU v13.0.6, keep GFX deep sleep clock reporting style consistent
with that of other clocks. Sample format below.

S: 78Mhz *
0: 600Mhz
1: 800Mhz

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c

index 29e1cada7667dce51765f27c1c55563e34006a58..94b0a7226ba4f654933f08ec97688a4b64a65218 100644 (file)
@@ -870,7 +870,15 @@ static int smu_v13_0_6_print_clk_levels(struct smu_context *smu,
                min_clk = pstate_table->gfxclk_pstate.curr.min;
                max_clk = pstate_table->gfxclk_pstate.curr.max;
 
-               if (!smu_v13_0_6_freqs_in_same_level(now, min_clk) &&
+               if (now < SMU_13_0_6_DSCLK_THRESHOLD) {
+                       size += sysfs_emit_at(buf, size, "S: %uMhz *\n",
+                                             now);
+                       size += sysfs_emit_at(buf, size, "0: %uMhz\n",
+                                             min_clk);
+                       size += sysfs_emit_at(buf, size, "1: %uMhz\n",
+                                             max_clk);
+
+               } else if (!smu_v13_0_6_freqs_in_same_level(now, min_clk) &&
                    !smu_v13_0_6_freqs_in_same_level(now, max_clk)) {
                        size += sysfs_emit_at(buf, size, "0: %uMhz\n",
                                              min_clk);