diff options
| author | Alex Deucher <alexander.deucher@amd.com> | 2025-01-08 16:11:42 -0500 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2025-02-12 21:02:56 -0500 |
| commit | e29dad86fa40db46763bc267761021a679e2ae8f (patch) | |
| tree | 77f2e53f0496fac4d6b4224670d9ea59b7351439 /drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | |
| parent | drm/amdgpu: add dynamic workload profile switching for gfx12 (diff) | |
| download | linux-e29dad86fa40db46763bc267761021a679e2ae8f.tar.gz linux-e29dad86fa40db46763bc267761021a679e2ae8f.zip | |
drm/amdgpu/swsmu: set workload profile to bootup default
Now that we can select a workload profile dynamically when
we submit work, it's best to default to the bootup
default workload profile. Defaulting to other profiles
prevents some power management features from kicking in
during idle periods. Once all jobs have finished, the
workload profile will automatically move back to default
bootup for max power savings.
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c')
| -rw-r--r-- | drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c index 167839f4dd2f..488360d2aaae 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c @@ -1253,26 +1253,11 @@ static void smu_init_xgmi_plpd_mode(struct smu_context *smu) } } -static bool smu_is_workload_profile_available(struct smu_context *smu, - u32 profile) -{ - if (profile >= PP_SMC_POWER_PROFILE_COUNT) - return false; - return smu->workload_map && smu->workload_map[profile].valid_mapping; -} - static void smu_init_power_profile(struct smu_context *smu) { - if (smu->power_profile_mode == PP_SMC_POWER_PROFILE_UNKNOWN) { - if (smu->is_apu || - !smu_is_workload_profile_available( - smu, PP_SMC_POWER_PROFILE_FULLSCREEN3D)) - smu->power_profile_mode = - PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT; - else - smu->power_profile_mode = - PP_SMC_POWER_PROFILE_FULLSCREEN3D; - } + if (smu->power_profile_mode == PP_SMC_POWER_PROFILE_UNKNOWN) + smu->power_profile_mode = + PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT; smu_power_profile_mode_get(smu, smu->power_profile_mode); } |
