Skip to contentSkip to conversation

drm/amd/pm: Relax manual min/max clock check

PATCH In review Asad Kamal 2 participants 2 messages Apr 30

Subsystems (3)
lore
Share & tools
lore

Asad Kamal

author
#0 lore raw

PATCH 1/1 drm/amd/pm: Relax manual min/max clock check

Allow min == max for the soft frequency limit when AMD_DPM_FORCED_LEVEL_MANUAL is used on SMU v13.0.6

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +2 -2
index 8d04f6e73fd7..ce520f43ab94 100644
@@ -2075,9 +2075,9 @@ static int smu_v13_0_6_set_soft_freq_limited_range(struct smu_context *smu,
 		return -EINVAL;
 
 	if (smu_dpm->dpm_level == AMD_DPM_FORCED_LEVEL_MANUAL) {
-		if (min >= max) {
+		if (min > max) {
 			dev_err(smu->adev->dev,
-				"Minimum clk should be less than the maximum allowed clock\n");
+				"Minimum clk should be less/equal to the maximum allowed clock\n");
 			return -EINVAL;
 		}
 
Signature · 1 line
2.46.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Asad Kamal

Allow min == max for the soft frequency limit when AMD_DPM_FORCED_LEVEL_MANUAL is used on SMU v13.0.6

Thanks,
Lijo

Quoted 20 lines
---
  drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +2 -2
index 8d04f6e73fd7..ce520f43ab94 100644
@@ -2075,9 +2075,9 @@ static int smu_v13_0_6_set_soft_freq_limited_range(struct smu_context *smu,
  		return -EINVAL;
 
  	if (smu_dpm->dpm_level == AMD_DPM_FORCED_LEVEL_MANUAL) {
-		if (min >= max) {
+		if (min > max) {
  			dev_err(smu->adev->dev,
-				"Minimum clk should be less than the maximum allowed clock\n");
+				"Minimum clk should be less/equal to the maximum allowed clock\n");
  			return -EINVAL;
  		}