RE: [PATCH] drm/amdgpu/smu13: update powersave optimizations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only - AMD Internal Distribution Only]

Reviewed-by: Kenneth Feng kenneth.feng@xxxxxxx


-----Original Message-----
From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Alex Deucher
Sent: Thursday, January 9, 2025 4:26 AM
To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>
Subject: [PATCH] drm/amdgpu/smu13: update powersave optimizations

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.


Only apply when compute profile is selected.  This is the only supported configuration.  Selecting other profiles can lead to performane degradations.

Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
index 2a09b27788e83..0551a33112171 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
@@ -2643,11 +2643,12 @@ static int smu_v13_0_0_set_power_profile_mode(struct smu_context *smu,
                                          &backend_workload_mask);

        /* Add optimizations for SMU13.0.0/10.  Reuse the power saving profile */
-       if ((amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 0) &&
-            ((smu->adev->pm.fw_version == 0x004e6601) ||
-             (smu->adev->pm.fw_version >= 0x004e7300))) ||
-           (amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 10) &&
-            smu->adev->pm.fw_version >= 0x00504500)) {
+       if ((workload_mask & (1 << PP_SMC_POWER_PROFILE_COMPUTE)) &&
+           ((amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 0) &&
+             ((smu->adev->pm.fw_version == 0x004e6601) ||
+              (smu->adev->pm.fw_version >= 0x004e7300))) ||
+            (amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 10) &&
+             smu->adev->pm.fw_version >= 0x00504500))) {
                workload_type = smu_cmn_to_asic_specific_index(smu,
                                                               CMN2ASIC_MAPPING_WORKLOAD,
                                                               PP_SMC_POWER_PROFILE_POWERSAVING);
--
2.47.1





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux