drm/amdgpu: Always enable fan sensors for read
authorRex Zhu <Rex.Zhu@amd.com>
Fri, 5 Oct 2018 16:11:25 +0000 (00:11 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 9 Oct 2018 22:05:12 +0000 (17:05 -0500)
don't need to set fan1_enable to read fan sensors.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

index 68548fbdee097cf329c2326ab6d6599adde39d98..94055a485e01300e5106fa261b6ce51b636360ab 100644 (file)
@@ -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) &&