Skip to content

Commit 1a8d845

Browse files
committed
Revert "drm/amdgpu: align pp_power_profile_mode with kernel docs"
This reverts commit 8f61446. This breaks some manual setting of the profile mode in certain cases. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3600 Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 7a19955) Cc: [email protected]
1 parent 38e3285 commit 1a8d845

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2266,7 +2266,8 @@ static int smu_adjust_power_state_dynamic(struct smu_context *smu,
22662266
smu_dpm_ctx->dpm_level = level;
22672267
}
22682268

2269-
if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM) {
2269+
if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL &&
2270+
smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM) {
22702271
index = fls(smu->workload_mask);
22712272
index = index > 0 && index <= WORKLOAD_POLICY_MAX ? index - 1 : 0;
22722273
workload[0] = smu->workload_setting[index];
@@ -2345,7 +2346,8 @@ static int smu_switch_power_profile(void *handle,
23452346
workload[0] = smu->workload_setting[index];
23462347
}
23472348

2348-
if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM)
2349+
if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL &&
2350+
smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM)
23492351
smu_bump_power_profile_mode(smu, workload, 0);
23502352

23512353
return 0;

0 commit comments

Comments
 (0)