]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/pm: optimize logic and remove unnecessary checks in smu v15.0.8
authorYang Wang <kevinyang.wang@amd.com>
Tue, 31 Mar 2026 02:39:17 +0000 (22:39 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 3 Apr 2026 17:54:21 +0000 (13:54 -0400)
commite4465c0464a3d1b8d66d84c440ab1d49c483c01a
treebad6947d0278bab381d73decd1710abcfb324efb
parent95e21dff4717c0525f80c225884ddc391911b1c3
drm/amd/pm: optimize logic and remove unnecessary checks in smu v15.0.8

the following two sets of logic are clearly mutually exclusive in
smu_v15_0_8_set_soft_freq_limited_range.
remove unnecessary code logic to keep the code logic clear.

e.g:

if (smu_dpm->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL)
return -EINVAL;

if (smu_dpm->dpm_level == AMD_DPM_FORCED_LEVEL_MANUAL) {
...
}

Signed-off-by: Yang Wang <kevinyang.wang@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/smu15/smu_v15_0_8_ppt.c