[PATCH] drm/amd/powerplay: fix temperature granularity error in smu11

Quan, Evan Evan.Quan at amd.com
Wed Jul 24 02:34:08 UTC 2019


Better to combine this with previous ptach(drm/amd/powerplay: add callback function of get_thermal_temperature_range) as one.
Since this issue to fix was actually introduced by that patch.
 
But if the original patch was already submitted, it's OK to commit this separately.

Either way, this way is Reviewed-by: Evan Quan <evan.quan at amd.com>

Regards,
Evan
> -----Original Message-----
> From: Wang, Kevin(Yang) <Kevin1.Wang at amd.com>
> Sent: Tuesday, July 23, 2019 8:08 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Feng, Kenneth <Kenneth.Feng at amd.com>; Huang, Ray
> <Ray.Huang at amd.com>; Quan, Evan <Evan.Quan at amd.com>; Wang,
> Kevin(Yang) <Kevin1.Wang at amd.com>
> Subject: [PATCH] drm/amd/powerplay: fix temperature granularity error in
> smu11
> 
> in this patch,
> drm/amd/powerplay: add callback function of
> get_thermal_temperature_range the driver missed temperature granularity
> change on other temperature.
> 
> Signed-off-by: Kevin Wang <kevin1.wang at amd.com>
> ---
>  drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> index 745b35a1600d..735802bb07b9 100644
> --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> @@ -1229,15 +1229,15 @@ static int
> smu_v11_0_start_thermal_control(struct smu_context *smu)
>  			return ret;
>  	}
> 
> -	adev->pm.dpm.thermal.min_temp = range.min;
> -	adev->pm.dpm.thermal.max_temp = range.max;
> -	adev->pm.dpm.thermal.max_edge_emergency_temp =
> range.edge_emergency_max;
> -	adev->pm.dpm.thermal.min_hotspot_temp = range.hotspot_min;
> -	adev->pm.dpm.thermal.max_hotspot_crit_temp =
> range.hotspot_crit_max;
> -	adev->pm.dpm.thermal.max_hotspot_emergency_temp =
> range.hotspot_emergency_max;
> -	adev->pm.dpm.thermal.min_mem_temp = range.mem_min;
> -	adev->pm.dpm.thermal.max_mem_crit_temp =
> range.mem_crit_max;
> -	adev->pm.dpm.thermal.max_mem_emergency_temp =
> range.mem_emergency_max;
> +	adev->pm.dpm.thermal.min_temp = range.min *
> SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
> +	adev->pm.dpm.thermal.max_temp = range.max *
> SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
> +	adev->pm.dpm.thermal.max_edge_emergency_temp =
> range.edge_emergency_max *
> SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
> +	adev->pm.dpm.thermal.min_hotspot_temp = range.hotspot_min *
> SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
> +	adev->pm.dpm.thermal.max_hotspot_crit_temp =
> range.hotspot_crit_max * SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
> +	adev->pm.dpm.thermal.max_hotspot_emergency_temp =
> range.hotspot_emergency_max *
> SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
> +	adev->pm.dpm.thermal.min_mem_temp = range.mem_min *
> SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
> +	adev->pm.dpm.thermal.max_mem_crit_temp =
> range.mem_crit_max * SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
> +	adev->pm.dpm.thermal.max_mem_emergency_temp =
> range.mem_emergency_max
> +* SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
>  	adev->pm.dpm.thermal.min_temp = range.min *
> SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
>  	adev->pm.dpm.thermal.max_temp = range.max *
> SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
> 
> --
> 2.22.0



More information about the amd-gfx mailing list