drm/amd/pm: add power save mode workload for smu 13.0.10
Subsystems (3)
Kenneth Feng
maintainerPATCH 1/1 drm/amd/pm: add power save mode workload for smu 13.0.10
add power save mode workload for smu 13.0.10, so that in compute mode, pmfw will add 35mv voltage margin since some applications requres higher voltages.
Signed-off-by Kenneth Feng <[email protected]>
--- .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +13 -10
@@ -2545,16 +2545,19 @@ static int smu_v13_0_0_set_power_profile_mode(struct smu_context *smu, workload_mask =1 << workload_type; -/* Add optimizations for SMU13.0.0. Reuse the power saving profile */ -if (smu->power_profile_mode ==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 >=0x004e7400 ))) { - workload_type =smu_cmn_to_asic_specific_index (smu, -CMN2ASIC_MAPPING_WORKLOAD , -PP_SMC_POWER_PROFILE_POWERSAVING ); -if (workload_type >=0 ) - workload_mask |=1 << workload_type; +/* Add optimizations for SMU13.0.0/10. Reuse the power saving profile */ +if (smu->power_profile_mode ==PP_SMC_POWER_PROFILE_COMPUTE ) { +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 )) { + workload_type =smu_cmn_to_asic_specific_index (smu, +CMN2ASIC_MAPPING_WORKLOAD , +PP_SMC_POWER_PROFILE_POWERSAVING ); +if (workload_type >=0 ) + workload_mask |=1 << workload_type; + } } return smu_cmn_send_smc_msg_with_param(smu,
Signature · 1 line
2.34.1
[AMD Official Use Only - General]
This patch is
Reviewed-by Likun Gao <[email protected]>.
Regards,
Likun
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Kenneth Feng
Sent: Wednesday, December 13, 2023 3:02 PM
To: [email protected]
Cc: Feng, Kenneth <[email protected]>
Subject: [PATCH] drm/amd/pm: add power save mode workload for smu 13.0.10
add power save mode workload for smu 13.0.10, so that in compute mode, pmfw will add 35mv voltage margin since some applications requres higher voltages.
Signed-off-by Kenneth Feng <[email protected]>
--- .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +13 -10
@@ -2545,16 +2545,19 @@ static int smu_v13_0_0_set_power_profile_mode(struct smu_context *smu, workload_mask =1 << workload_type; -/* Add optimizations for SMU13.0.0. Reuse the power saving profile */ -if (smu->power_profile_mode ==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 >=0x004e7400 ))) { - workload_type =smu_cmn_to_asic_specific_index (smu, -CMN2ASIC_MAPPING_WORKLOAD , -PP_SMC_POWER_PROFILE_POWERSAVING ); -if (workload_type >=0 ) - workload_mask |=1 << workload_type; +/* Add optimizations for SMU13.0.0/10. Reuse the power saving profile */ +if (smu->power_profile_mode ==PP_SMC_POWER_PROFILE_COMPUTE ) { +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 )) { + workload_type =smu_cmn_to_asic_specific_index (smu, +CMN2ASIC_MAPPING_WORKLOAD , +PP_SMC_POWER_PROFILE_POWERSAVING ); +if (workload_type >=0 ) + workload_mask |=1 << workload_type; + } } return smu_cmn_send_smc_msg_with_param(smu,
--
2.34.1