drm/amd/pm: Relax manual min/max clock check
Subsystems (3)
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
Signed-off-by Asad Kamal <[email protected]>
--- 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
@@ -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
Quoted 4 lines · Asad Kamal
Allow min == max for the soft frequency limit when
AMD_DPM_FORCED_LEVEL_MANUALis used on SMU v13.0.6Signed-off-by Asad Kamal <[email protected]>
Reviewed-by Lijo Lazar <[email protected]>
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@@ -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 ; }