Skip to contentSkip to conversation

drm/amdgpu: Always enable fan sensors for read

PATCH In review Rex Zhu 2 participants 2 messages Oct 5, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Always enable fan sensors for read

don't need to set fan1_enable to read fan sensors.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +0 -10
index 68548fb..94055a4 100644
@@ -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) &&
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1538756593-25542-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by Alex Deucher
#2 lore raw
Quoted 11 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Rex Zhu
Sent: Friday, October 5, 2018 12:23 PM
To: [email protected]
Cc: Zhu, Rex <[email protected]>
Subject: [PATCH] drm/amdgpu: Always enable fan sensors for read

don't need to set fan1_enable to read fan sensors.

Quoted 38 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +0 -5
index 68548fb..94055a4 100644
@@ -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 */
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +0 -5
 	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

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx