Skip to content

Commit 8f61446

Browse files
committed
drm/amdgpu: align pp_power_profile_mode with kernel docs
The kernel doc says you need to select manual mode to adjust this, but the code only allows you to adjust it when manual mode is not selected. Remove the manual mode check. Reviewed-by: Kenneth Feng <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit bbb05f8) Cc: [email protected]
1 parent 5be63fc commit 8f61446

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

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

2268-
if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL &&
2269-
smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM) {
2268+
if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM) {
22702269
index = fls(smu->workload_mask);
22712270
index = index > 0 && index <= WORKLOAD_POLICY_MAX ? index - 1 : 0;
22722271
workload[0] = smu->workload_setting[index];
@@ -2343,8 +2342,7 @@ static int smu_switch_power_profile(void *handle,
23432342
workload[0] = smu->workload_setting[index];
23442343
}
23452344

2346-
if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL &&
2347-
smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM)
2345+
if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM)
23482346
smu_bump_power_profile_mode(smu, workload, 0);
23492347

23502348
return 0;

0 commit comments

Comments
 (0)