Skip to contentSkip to conversation

drm/amd/pm: Update emit clock logic

PATCH In review Lijo Lazar 2 participants 2 messages Apr 27

Subsystems (3)
lore
Share & tools
lore

Lijo Lazar

author
#0 lore raw

PATCH 1/1 drm/amd/pm: Update emit clock logic

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).

---
 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +1 -1
index 006ef585a377..bbe2ebaf4294 100644
@@ -1357,7 +1357,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(
Signature · 1 line
2.49.0
Reviewed-by on v1 1/1
#1 lore raw

AMD General

Thanks & Regards
Asad

-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Monday, April 27, 2026 5:22 PM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Deucher, Alexander <[email protected]>; Kamal, Asad <[email protected]>; Wang, Yang(Kevin) <[email protected]>
Subject: [PATCH] drm/amd/pm: Update emit clock logic

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).

---
 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +1 -1
index 006ef585a377..bbe2ebaf4294 100644
@@ -1357,7 +1357,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(

--
2.49.0