drm/amdgpu: Enable SMU 13.0.0 optimizations when ROCm is active
Subsystems (3)
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: Enable SMU 13.0.0 optimizations when ROCm is active
When ROCm is active enable additional SMU 13.0.0 optimizations. This reuses the unused powersave profile on PMFW.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +8 -0
@@ -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)
Signature · 1 line
2.41.0
Ping?
Quoted 31 lines · Alex Deucher
When ROCm is active enable additional SMU 13.0.0 optimizations. This reuses the unused powersave profile on PMFW.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +8
-1@@ -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
Wang, Yang(Kevin)
Reviewed-byHi Alex,
why need to switch profile twice for smu 13.0.0 ? in idle state : set compute profile then set power save profile? Afaik, Pmfw always uses the last set result to represent the current profile.
But it shouldn't affect the results. Anyway.
Best Regards,
Kevin
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Wednesday, October 4, 2023 10:04 PM
To: Deucher, Alexander <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm/amdgpu: Enable SMU 13.0.0 optimizations when ROCm is active
Ping?
Quoted 31 lines · Alex Deucher
When ROCm is active enable additional SMU 13.0.0 optimizations. This reuses the unused powersave profile on PMFW.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +8
-1@@ -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
Quoted 6 lines · Yang(Kevin)
Hi Alex,
why need to switch profile twice for smu 13.0.0 ? in idle state : set compute profile then set power save profile? Afaik, Pmfw always uses the last set result to represent the current profile.
But it shouldn't affect the results. Anyway.
We want to be setting both workload bits (powersave and compute). I guess this won't work as is? I thought the code or'ed both bits.
Alex
Quoted 47 lines
Reviewed-by Yang Wang <[email protected]>Best Regards,
Kevin-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Wednesday, October 4, 2023 10:04 PM
To: Deucher, Alexander <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm/amdgpu: Enable SMU 13.0.0 optimizations when ROCm is activePing?
Quoted 31 lines · Alex Deucher
When ROCm is active enable additional SMU 13.0.0 optimizations. This reuses the unused powersave profile on PMFW.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +8
-1@@ -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
Quoted 4 lines · Alex Deucher
Quoted 1 line · Yang(Kevin)
Quoted 8 lines
Quoted 5 lines
Hi Alex,
why need to switch profile twice for smu 13.0.0 ? in idle state : set compute profile then set power save profile? Afaik, Pmfw always uses the last set result to represent the current profile.
But it shouldn't affect the results. Anyway.We want to be setting both workload bits (powersave and compute). I guess this won't work as is? I thought the code or'ed both bits.
Confirming this won't work as expected. Will rework and resend.
Alex
Quoted 51 lines
Alex
Quoted 47 lines
Reviewed-by Yang Wang <[email protected]>Best Regards,
Kevin-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Wednesday, October 4, 2023 10:04 PM
To: Deucher, Alexander <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm/amdgpu: Enable SMU 13.0.0 optimizations when ROCm is activePing?
Quoted 31 lines · Alex Deucher
When ROCm is active enable additional SMU 13.0.0 optimizations. This reuses the unused powersave profile on PMFW.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +8
-1@@ -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
Am 03.10.23 um 21:07 schrieb Alex Deucher:
Quoted 4 lines
When ROCm is active enable additional SMU 13.0.0 optimizations. This reuses the unused powersave profile on PMFW.
Signed-off-by Alex Deucher <[email protected]>
Quoted 23 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +8
-0@@ -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)