[PATCH] drm/amd/powerplay: add smu_smc_read_sensor support for arcturus

Quan, Evan Evan.Quan at amd.com
Fri Aug 16 07:44:14 UTC 2019


Without this patch, there will be missing many sensor support on arcturus.
Better to declare this in descriptions or patch header.
With that fixed, the patch is reviewed-by: Evan Quan <evan.quan at amd.com>

Regards,
Evan
> -----Original Message-----
> From: Wang, Kevin(Yang) <Kevin1.Wang at amd.com>
> Sent: Friday, August 16, 2019 3:22 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Quan, Evan <Evan.Quan at amd.com>; Huang, Ray
> <Ray.Huang at amd.com>; Feng, Kenneth <Kenneth.Feng at amd.com>; Wang,
> Kevin(Yang) <Kevin1.Wang at amd.com>
> Subject: [PATCH] drm/amd/powerplay: add smu_smc_read_sensor support
> for arcturus
> 
> the bellow patch refine the sensor read sequence,
> but missed to add arcuturs support. (arcuturs_ppt.c)
> 
> drm/amd/powerplay: change smu_read_sensor sequence in smu
> 
> Signed-off-by: Kevin Wang <kevin1.wang at amd.com>
> ---
>  drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
> b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
> index fcf623cf5d2c..850b2a1ef329 100644
> --- a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
> +++ b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
> @@ -1012,6 +1012,9 @@ static int arcturus_read_sensor(struct smu_context
> *smu,
>  	PPTable_t *pptable = table_context->driver_pptable;
>  	int ret = 0;
> 
> +	if(!data || !size)
> +		return -EINVAL;
> +
>  	switch (sensor) {
>  	case AMDGPU_PP_SENSOR_MAX_FAN_RPM:
>  		*(uint32_t *)data = pptable->FanMaximumRpm;
> @@ -1036,7 +1039,7 @@ static int arcturus_read_sensor(struct smu_context
> *smu,
>  		*size = 4;
>  		break;
>  	default:
> -		return -EINVAL;
> +		ret = smu_smc_read_sensor(smu, sensor, data, size);
>  	}
> 
>  	return ret;
> --
> 2.22.0



More information about the amd-gfx mailing list