Skip to content

Commit 580ad7c

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 <kenneth.feng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 3b6e7d4 commit 580ad7c

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
@@ -2232,7 +2232,7 @@ static int smu_bump_power_profile_mode(struct smu_context *smu,
22322232
static int smu_adjust_power_state_dynamic(struct smu_context *smu,
22332233
enum amd_dpm_forced_level level,
22342234
bool skip_display_settings,
2235-
bool force_update)
2235+
bool init)
22362236
{
22372237
int ret = 0;
22382238
int index = 0;
@@ -2261,7 +2261,7 @@ static int smu_adjust_power_state_dynamic(struct smu_context *smu,
22612261
}
22622262
}
22632263

2264-
if (force_update || smu_dpm_ctx->dpm_level != level) {
2264+
if (smu_dpm_ctx->dpm_level != level) {
22652265
ret = smu_asic_set_performance_level(smu, level);
22662266
if (ret) {
22672267
dev_err(smu->adev->dev, "Failed to set performance level!");
@@ -2278,7 +2278,7 @@ static int smu_adjust_power_state_dynamic(struct smu_context *smu,
22782278
index = index > 0 && index <= WORKLOAD_POLICY_MAX ? index - 1 : 0;
22792279
workload[0] = smu->workload_setting[index];
22802280

2281-
if (force_update || smu->power_profile_mode != workload[0])
2281+
if (init || smu->power_profile_mode != workload[0])
22822282
smu_bump_power_profile_mode(smu, workload, 0);
22832283
}
22842284

0 commit comments

Comments
 (0)