[PATCH] drm/amdgpu: Always enable fan sensors for read

Deucher, Alexander Alexander.Deucher at amd.com
Fri Oct 5 18:26:15 UTC 2018


> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Rex
> Zhu
> Sent: Friday, October 5, 2018 12:23 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Zhu, Rex <Rex.Zhu at amd.com>
> Subject: [PATCH] drm/amdgpu: Always enable fan sensors for read
> 
> don't need to set fan1_enable to read fan sensors.
> 
> Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> index 68548fb..94055a4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> @@ -1179,11 +1179,6 @@ static ssize_t
> amdgpu_hwmon_get_fan1_input(struct device *dev,
>  	struct amdgpu_device *adev = dev_get_drvdata(dev);
>  	int err;
>  	u32 speed = 0;
> -	u32 pwm_mode;
> -
> -	pwm_mode = amdgpu_dpm_get_fan_control_mode(adev);
> -	if (pwm_mode != AMD_FAN_CTRL_MANUAL)
> -		return -ENODATA;
> 
>  	/* Can't adjust fan when the card is off */
>  	if  ((adev->flags & AMD_IS_PX) &&
> @@ -1246,11 +1241,6 @@ static ssize_t
> amdgpu_hwmon_get_fan1_target(struct device *dev,
>  	struct amdgpu_device *adev = dev_get_drvdata(dev);
>  	int err;
>  	u32 rpm = 0;
> -	u32 pwm_mode;
> -
> -	pwm_mode = amdgpu_dpm_get_fan_control_mode(adev);
> -	if (pwm_mode != AMD_FAN_CTRL_MANUAL)
> -		return -ENODATA;
> 
>  	/* Can't adjust fan when the card is off */
>  	if  ((adev->flags & AMD_IS_PX) &&
> --
> 1.9.1
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list