Revert "drm/amdgpu: align pp_power_profile_mode with kernel docs"
authorjsg <jsg@openbsd.org>
Thu, 12 Sep 2024 23:22:10 +0000 (23:22 +0000)
committerjsg <jsg@openbsd.org>
Thu, 12 Sep 2024 23:22:10 +0000 (23:22 +0000)
From Alex Deucher
94479011f4f551b4b1e010776a131512402b27bc in linux-6.6.y/6.6.51
1a8d845470941f1b6de1b392227530c097dc5e0c in mainline linux

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

index ab7f5a2..c890b07 100644 (file)
@@ -1883,7 +1883,8 @@ 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_PERF_DETERMINISM) {
+       if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL &&
+               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];
@@ -1962,7 +1963,8 @@ static int smu_switch_power_profile(void *handle,
                workload[0] = smu->workload_setting[index];
        }
 
-       if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM)
+       if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL &&
+               smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM)
                smu_bump_power_profile_mode(smu, workload, 0);
 
        return 0;