Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 0085f00

Browse files
alexdeuchergregkh
authored andcommittedOct 22, 2024
drm/amdgpu/smu13: always apply the powersave optimization
commit 7a1613e upstream. It can avoid margin issues in some very demanding applications. 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> (cherry picked from commit 62f38b4) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1b92395 commit 0085f00

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed
 

‎drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c

+10-12
Original file line numberDiff line numberDiff line change
@@ -2555,18 +2555,16 @@ static int smu_v13_0_0_set_power_profile_mode(struct smu_context *smu,
25552555
workload_mask = 1 << workload_type;
25562556

25572557
/* Add optimizations for SMU13.0.0/10. Reuse the power saving profile */
2558-
if (smu->power_profile_mode == PP_SMC_POWER_PROFILE_COMPUTE) {
2559-
if ((amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 0) &&
2560-
((smu->adev->pm.fw_version == 0x004e6601) ||
2561-
(smu->adev->pm.fw_version >= 0x004e7300))) ||
2562-
(amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 10) &&
2563-
smu->adev->pm.fw_version >= 0x00504500)) {
2564-
workload_type = smu_cmn_to_asic_specific_index(smu,
2565-
CMN2ASIC_MAPPING_WORKLOAD,
2566-
PP_SMC_POWER_PROFILE_POWERSAVING);
2567-
if (workload_type >= 0)
2568-
workload_mask |= 1 << workload_type;
2569-
}
2558+
if ((amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 0) &&
2559+
((smu->adev->pm.fw_version == 0x004e6601) ||
2560+
(smu->adev->pm.fw_version >= 0x004e7300))) ||
2561+
(amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 10) &&
2562+
smu->adev->pm.fw_version >= 0x00504500)) {
2563+
workload_type = smu_cmn_to_asic_specific_index(smu,
2564+
CMN2ASIC_MAPPING_WORKLOAD,
2565+
PP_SMC_POWER_PROFILE_POWERSAVING);
2566+
if (workload_type >= 0)
2567+
workload_mask |= 1 << workload_type;
25702568
}
25712569

25722570
ret = smu_cmn_send_smc_msg_with_param(smu,

0 commit comments

Comments
 (0)
This repository has been archived.