]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/pm: Relax manual min/max clock check
authorAsad Kamal <asad.kamal@amd.com>
Thu, 30 Apr 2026 10:12:12 +0000 (18:12 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 May 2026 13:56:51 +0000 (09:56 -0400)
Allow min == max for the soft frequency limit when
AMD_DPM_FORCED_LEVEL_MANUAL is used on SMU v13.0.6

Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@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 3d91904fd4197801907d524433dcef3bf40a7481..b123881344890fc8ee06cdfeddf655e3a64a3df9 100644 (file)
@@ -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;
                }