]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/pm: Update emit clock logic
authorLijo Lazar <lijo.lazar@amd.com>
Mon, 27 Apr 2026 11:47:41 +0000 (17:17 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 28 Apr 2026 19:46:30 +0000 (15:46 -0400)
If only one level is enabled in clock table, there is no need to
follow the fine grained clock logic which expects a minimum of
two levels (min/max).

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>
(cherry picked from commit 7f19097af1496dd908a044ca95862f32d05f02df)

drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c

index 3d49e58794d29f050af9a45355d15032a4518ebb..90c7127beabffc46dbefc3c80ad4db01b44e15a4 100644 (file)
@@ -1370,7 +1370,7 @@ int smu_cmn_print_dpm_clk_levels(struct smu_context *smu,
                level_index = 1;
        }
 
-       if (!is_fine_grained) {
+       if (!is_fine_grained || count == 1) {
                for (i = 0; i < count; i++) {
                        freq_match = !is_deep_sleep &&
                                     smu_cmn_freqs_match(