diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-10-23 04:10:17 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-10-23 04:10:17 +0000 |
commit | 0269ef0f844373e5c2792b65479caaba4b386e1d (patch) | |
tree | 8acd566015dde6c55c92a7aae6183d2f49b688ad /sys/dev/pci | |
parent | ec87c69cd64e66f2f26b2eb5973967b95dbddf43 (diff) |
drm/amdgpu/swsmu: Only force workload setup on init
From Alex Deucher
db0978d3ed8b1f69b6e09c3ccb66897fd2a9f6d7 in linux-6.6.y/6.6.58
cb07c8338fc2b9d5f949a19d4a07ee4d5ecf8793 in mainline linux
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/drm/amd/pm/swsmu/amdgpu_smu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/amd/pm/swsmu/amdgpu_smu.c b/sys/dev/pci/drm/amd/pm/swsmu/amdgpu_smu.c index c890b07fee1..2a98a28fbe7 100644 --- a/sys/dev/pci/drm/amd/pm/swsmu/amdgpu_smu.c +++ b/sys/dev/pci/drm/amd/pm/swsmu/amdgpu_smu.c @@ -1843,7 +1843,7 @@ static int smu_bump_power_profile_mode(struct smu_context *smu, static int smu_adjust_power_state_dynamic(struct smu_context *smu, enum amd_dpm_forced_level level, bool skip_display_settings, - bool force_update) + bool init) { int ret = 0; int index = 0; @@ -1872,7 +1872,7 @@ static int smu_adjust_power_state_dynamic(struct smu_context *smu, } } - if (force_update || smu_dpm_ctx->dpm_level != level) { + if (smu_dpm_ctx->dpm_level != level) { ret = smu_asic_set_performance_level(smu, level); if (ret) { dev_err(smu->adev->dev, "Failed to set performance level!"); @@ -1889,7 +1889,7 @@ static int smu_adjust_power_state_dynamic(struct smu_context *smu, index = index > 0 && index <= WORKLOAD_POLICY_MAX ? index - 1 : 0; workload[0] = smu->workload_setting[index]; - if (force_update || smu->power_profile_mode != workload[0]) + if (init || smu->power_profile_mode != workload[0]) smu_bump_power_profile_mode(smu, workload, 0); } |