Commit e1c0d2e7 authored by Asad Kamal's avatar Asad Kamal Committed by Alex Deucher

drm/amd/pm: Fix critical temp unit of SMU v13.0.6

Critical Temperature needs to be reported in
millidegree Celsius.
Signed-off-by: default avatarAsad Kamal <asad.kamal@amd.com>
Reviewed-by: default avatarYang Wang <kevinyang.wang@amd.com>
Reviewed-by: default avatarLijo Lazar <lijo.lazar@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3f160967
...@@ -2086,7 +2086,7 @@ static int smu_v13_0_6_get_thermal_temperature_range(struct smu_context *smu, ...@@ -2086,7 +2086,7 @@ static int smu_v13_0_6_get_thermal_temperature_range(struct smu_context *smu,
struct smu_temperature_range *range) struct smu_temperature_range *range)
{ {
struct amdgpu_device *adev = smu->adev; struct amdgpu_device *adev = smu->adev;
u32 aid_temp, xcd_temp; u32 aid_temp, xcd_temp, mem_temp;
uint32_t smu_version; uint32_t smu_version;
u32 ccd_temp = 0; u32 ccd_temp = 0;
int ret; int ret;
...@@ -2119,13 +2119,14 @@ static int smu_v13_0_6_get_thermal_temperature_range(struct smu_context *smu, ...@@ -2119,13 +2119,14 @@ static int smu_v13_0_6_get_thermal_temperature_range(struct smu_context *smu,
if (ret) if (ret)
goto failed; 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, 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) if (ret)
goto failed; goto failed;
return 0; range->mem_crit_max = mem_temp * SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
failed: failed:
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment