]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu/smu13: update powersave optimizations
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 8 Jan 2025 20:17:12 +0000 (15:17 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 10 Jan 2025 16:59:09 +0000 (11:59 -0500)
Only apply when compute profile is selected.  This is
the only supported configuration.  Selecting other
profiles can lead to performane degradations.

Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c

index 2a09b27788e83c449f902f96fa05cb4fc458673b..0551a331121710abf86b7c8884ded381a222128e 100644 (file)
@@ -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);