drm/amd/pm: Fix critical temp unit of SMU v13.0.6
Subsystems (3)
PATCH v2 1/1 drm/amd/pm: Fix critical temp unit of SMU v13.0.6
Critical Temperature needs to be reported in
millidegree Celsius.
Signed-off-by Asad Kamal <[email protected]>
--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +5 -4
@@ -2086,7 +2086,7 @@ static int smu_v13_0_6_get_thermal_temperature_range(struct smu_context *smu, struct smu_temperature_range *range) {struct amdgpu_device *adev = smu->adev; -u32 aid_temp, xcd_temp; +u32 aid_temp, xcd_temp, mem_temp;uint32_t smu_version;u32 ccd_temp =0 ;int ret;
@@ -2119,13 +2119,14 @@ static int smu_v13_0_6_get_thermal_temperature_range(struct smu_context *smu,if (ret) goto failed; - range->hotspot_crit_max =max3 (aid_temp, xcd_temp, ccd_temp); + range->hotspot_crit_max =max3 (aid_temp, xcd_temp, ccd_temp) * +SMU_TEMPERATURE_UNITS_PER_CENTIGRADES ; ret =smu_cmn_send_smc_msg_with_param (smu, SMU_MSG_GetCTFLimit, -PPSMC_HBM_THM_TYPE , &range->mem_crit_max); +PPSMC_HBM_THM_TYPE , &mem_temp);if (ret) goto failed; -return 0 ; + range->mem_crit_max = mem_temp *SMU_TEMPERATURE_UNITS_PER_CENTIGRADES ; failed:return ret; }
Signature · 1 line
2.34.1
[AMD Official Use Only - General]
Reviewed-by Yang Wang <[email protected]>
Best Regards,
Kevin
________________________________
发件人: Kamal, Asad <[email protected]>
发送时间: 星期五, 八月 18, 2023 19:01
收件人: [email protected] <[email protected]>; Wang, Yang(Kevin) <[email protected]>
抄送: Lazar, Lijo <[email protected]>; Zhang, Morris <[email protected]>; Kamal, Asad <[email protected]>; Ma, Le <[email protected]>; Zhang, Hawking <[email protected]> 主题: [PATCH v2] drm/amd/pm: Fix critical temp unit of SMU v13.0.6
Critical Temperature needs to be reported in
millidegree Celsius.
Signed-off-by Asad Kamal <[email protected]>
--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +5 -4
@@ -2086,7 +2086,7 @@ static int smu_v13_0_6_get_thermal_temperature_range(struct smu_context *smu, struct smu_temperature_range *range) {struct amdgpu_device *adev = smu->adev; -u32 aid_temp, xcd_temp; +u32 aid_temp, xcd_temp, mem_temp;uint32_t smu_version;u32 ccd_temp =0 ;int ret;
@@ -2119,13 +2119,14 @@ static int smu_v13_0_6_get_thermal_temperature_range(struct smu_context *smu,if (ret) goto failed; - range->hotspot_crit_max =max3 (aid_temp, xcd_temp, ccd_temp); + range->hotspot_crit_max =max3 (aid_temp, xcd_temp, ccd_temp) * +SMU_TEMPERATURE_UNITS_PER_CENTIGRADES ; ret =smu_cmn_send_smc_msg_with_param (smu, SMU_MSG_GetCTFLimit, -PPSMC_HBM_THM_TYPE , &range->mem_crit_max); +PPSMC_HBM_THM_TYPE , &mem_temp);if (ret) goto failed; -return 0 ; + range->mem_crit_max = mem_temp *SMU_TEMPERATURE_UNITS_PER_CENTIGRADES ; failed:return ret; }
--
2.34.1
Quoted 4 lines · Asad Kamal
Critical Temperature needs to be reported in
millidegree Celsius.Signed-off-by Asad Kamal <[email protected]>
Reviewed-by Lijo Lazar <[email protected]>
Thanks,
Lijo
Quoted 35 lines
--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +5
-4@@ -2086,7 +2086,7 @@ static int smu_v13_0_6_get_thermal_temperature_range(struct smu_context *smu, struct smu_temperature_range *range) {struct amdgpu_device *adev = smu->adev; -u32 aid_temp, xcd_temp; +u32 aid_temp, xcd_temp, mem_temp;uint32_t smu_version;u32 ccd_temp =0 ;int ret;@@ -2119,13 +2119,14 @@ static int smu_v13_0_6_get_thermal_temperature_range(struct smu_context *smu,if (ret) goto failed; - range->hotspot_crit_max =max3 (aid_temp, xcd_temp, ccd_temp); + range->hotspot_crit_max =max3 (aid_temp, xcd_temp, ccd_temp) * +SMU_TEMPERATURE_UNITS_PER_CENTIGRADES ; ret =smu_cmn_send_smc_msg_with_param (smu, SMU_MSG_GetCTFLimit, -PPSMC_HBM_THM_TYPE , &range->mem_crit_max); +PPSMC_HBM_THM_TYPE , &mem_temp);if (ret) goto failed; -return 0 ; + range->mem_crit_max = mem_temp *SMU_TEMPERATURE_UNITS_PER_CENTIGRADES ; failed:return ret; }