[PATCH] drm/amdgpu: Enable SMU 13.0.0 optimizations when ROCm is active

Alex Deucher alexander.deucher at amd.com
Tue Oct 3 19:07:31 UTC 2023


When ROCm is active enable additional SMU 13.0.0 optimizations.
This reuses the unused powersave profile on PMFW.

Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
index 38b5457baded..b6c0c42de725 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
@@ -714,6 +714,14 @@ void amdgpu_amdkfd_set_compute_idle(struct amdgpu_device *adev, bool idle)
 	amdgpu_dpm_switch_power_profile(adev,
 					PP_SMC_POWER_PROFILE_COMPUTE,
 					!idle);
+	/* Add optimizations for SMU13.0.0.  Reuse the power saving profile */
+	if ((amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 0)) &&
+	    ((adev->pm.fw_version == 0x004e6601) ||
+	     (adev->pm.fw_version >= 0x004e7300))) {
+		amdgpu_dpm_switch_power_profile(adev,
+						PP_SMC_POWER_PROFILE_POWERSAVING,
+						!idle);
+	}
 }
 
 bool amdgpu_amdkfd_is_kfd_vmid(struct amdgpu_device *adev, u32 vmid)
-- 
2.41.0



More information about the amd-gfx mailing list