diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-10-05 12:11:25 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-10-09 18:05:12 -0400 |
commit | a57ba84b149cfeca133ea11f253049eac5f9c1a9 (patch) | |
tree | 3f98a34b48515c115bb4b63178c9309d4441499e /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |
parent | b8a9c003679ea3619cef4092b10390224f09fbaa (diff) |
drm/amdgpu: Always enable fan sensors for read
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index 68548fbdee09..94055a485e01 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, | |||
1179 | struct amdgpu_device *adev = dev_get_drvdata(dev); | 1179 | struct amdgpu_device *adev = dev_get_drvdata(dev); |
1180 | int err; | 1180 | int err; |
1181 | u32 speed = 0; | 1181 | u32 speed = 0; |
1182 | u32 pwm_mode; | ||
1183 | |||
1184 | pwm_mode = amdgpu_dpm_get_fan_control_mode(adev); | ||
1185 | if (pwm_mode != AMD_FAN_CTRL_MANUAL) | ||
1186 | return -ENODATA; | ||
1187 | 1182 | ||
1188 | /* Can't adjust fan when the card is off */ | 1183 | /* Can't adjust fan when the card is off */ |
1189 | if ((adev->flags & AMD_IS_PX) && | 1184 | if ((adev->flags & AMD_IS_PX) && |
@@ -1246,11 +1241,6 @@ static ssize_t amdgpu_hwmon_get_fan1_target(struct device *dev, | |||
1246 | struct amdgpu_device *adev = dev_get_drvdata(dev); | 1241 | struct amdgpu_device *adev = dev_get_drvdata(dev); |
1247 | int err; | 1242 | int err; |
1248 | u32 rpm = 0; | 1243 | u32 rpm = 0; |
1249 | u32 pwm_mode; | ||
1250 | |||
1251 | pwm_mode = amdgpu_dpm_get_fan_control_mode(adev); | ||
1252 | if (pwm_mode != AMD_FAN_CTRL_MANUAL) | ||
1253 | return -ENODATA; | ||
1254 | 1244 | ||
1255 | /* Can't adjust fan when the card is off */ | 1245 | /* Can't adjust fan when the card is off */ |
1256 | if ((adev->flags & AMD_IS_PX) && | 1246 | if ((adev->flags & AMD_IS_PX) && |