diff options
author | Martin Peres <martin.peres@labri.fr> | 2012-09-04 11:52:00 (GMT) |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-10-03 03:13:15 (GMT) |
commit | 2f951a5db5b55f65eb02d9a90aa7cecafde9f8b8 (patch) | |
tree | 9aeaca54de7a14598a3b2be04cb13ab891863dfd /drivers/gpu/drm/nouveau/core/subdev/therm/base.c | |
parent | c9cbf135065c0a674d43451127a10e48a53f9054 (diff) | |
download | linux-fsl-qoriq-2f951a5db5b55f65eb02d9a90aa7cecafde9f8b8.tar.xz |
drm/nouveau/therm: add support for fan-control modes
For now, only 2 control modes are available:
- NONE: The fan is never touched (default)
- MANUAL: The fan is set to the user-defined fan speed (pwm1)
This patch introduces a distinction between ptherm internal fan management
and external fan management. The latter is bound to respect the fan mode
while the first can still select the speed it wants unless the NONE mode
is selected. This is important for automatic fan management.
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/subdev/therm/base.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/therm/base.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/base.c b/drivers/gpu/drm/nouveau/core/subdev/therm/base.c index 6502dfb..1674c74 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/therm/base.c +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/base.c @@ -40,6 +40,8 @@ nouveau_therm_attr_get(struct nouveau_therm *therm, return priv->bios_fan.min_duty; case NOUVEAU_THERM_ATTR_FAN_MAX_DUTY: return priv->bios_fan.max_duty; + case NOUVEAU_THERM_ATTR_FAN_MODE: + return priv->fan.mode; case NOUVEAU_THERM_ATTR_THRS_FAN_BOOST: return priv->bios_sensor.thrs_fan_boost.temp; case NOUVEAU_THERM_ATTR_THRS_FAN_BOOST_HYST: @@ -82,6 +84,8 @@ nouveau_therm_attr_set(struct nouveau_therm *therm, value = priv->bios_fan.min_duty; priv->bios_fan.max_duty = value; return 0; + case NOUVEAU_THERM_ATTR_FAN_MODE: + return nouveau_therm_fan_set_mode(therm, value); case NOUVEAU_THERM_ATTR_THRS_FAN_BOOST: priv->bios_sensor.thrs_fan_boost.temp = value; return 0; |