drm/amdgpu: align pp_power_profile_mode with kernel docs
authorjsg <jsg@openbsd.org>
Thu, 5 Sep 2024 04:27:10 +0000 (04:27 +0000)
committerjsg <jsg@openbsd.org>
Thu, 5 Sep 2024 04:27:10 +0000 (04:27 +0000)
From Alex Deucher
11182b33faf3ee80f5ea042a465b26a23e257f8a in linux-6.6.y/6.6.49
8f614469de248a4bc55fb07e55d5f4c340c75b11 in mainline linux

sys/dev/pci/drm/amd/pm/swsmu/amdgpu_smu.c

index d6daf3c..fafffbe 100644 (file)
@@ -1882,8 +1882,7 @@ static int smu_adjust_power_state_dynamic(struct smu_context *smu,
                smu_dpm_ctx->dpm_level = level;
        }
 
-       if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL &&
-               smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM) {
+       if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM) {
                index = fls(smu->workload_mask);
                index = index > 0 && index <= WORKLOAD_POLICY_MAX ? index - 1 : 0;
                workload[0] = smu->workload_setting[index];
@@ -1960,8 +1959,7 @@ static int smu_switch_power_profile(void *handle,
                workload[0] = smu->workload_setting[index];
        }
 
-       if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL &&
-               smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM)
+       if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM)
                smu_bump_power_profile_mode(smu, workload, 0);
 
        return 0;