Skip to content

Commit cb07c83

Browse files
committed
drm/amdgpu/swsmu: Only force workload setup on init
Needed to set the workload type at init time so that we can apply the navi3x margin optimization. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3618 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3131 Fixes: c50fe28 ("drm/amdgpu/swsmu: always force a state reprogram on init") Reviewed-by: Kenneth Feng <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 580ad7c) Cc: [email protected]
1 parent 28127db commit cb07c83

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,7 +2226,7 @@ static int smu_bump_power_profile_mode(struct smu_context *smu,
22262226
static int smu_adjust_power_state_dynamic(struct smu_context *smu,
22272227
enum amd_dpm_forced_level level,
22282228
bool skip_display_settings,
2229-
bool force_update)
2229+
bool init)
22302230
{
22312231
int ret = 0;
22322232
int index = 0;
@@ -2255,7 +2255,7 @@ static int smu_adjust_power_state_dynamic(struct smu_context *smu,
22552255
}
22562256
}
22572257

2258-
if (force_update || smu_dpm_ctx->dpm_level != level) {
2258+
if (smu_dpm_ctx->dpm_level != level) {
22592259
ret = smu_asic_set_performance_level(smu, level);
22602260
if (ret) {
22612261
dev_err(smu->adev->dev, "Failed to set performance level!");
@@ -2272,7 +2272,7 @@ static int smu_adjust_power_state_dynamic(struct smu_context *smu,
22722272
index = index > 0 && index <= WORKLOAD_POLICY_MAX ? index - 1 : 0;
22732273
workload[0] = smu->workload_setting[index];
22742274

2275-
if (force_update || smu->power_profile_mode != workload[0])
2275+
if (init || smu->power_profile_mode != workload[0])
22762276
smu_bump_power_profile_mode(smu, workload, 0);
22772277
}
22782278

0 commit comments

Comments
 (0)