diff options
author | Martin Peres <martin.peres@free.fr> | 2014-08-17 17:33:07 +0200 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-10-02 13:25:42 +1000 |
commit | 451e1a3916ea109fa7458c7ff07a6c803a66e912 (patch) | |
tree | 4731bcf50ebccc31ca0889fc24b166654d0b90e1 | |
parent | c432c74219b23343e4b76251e3c2387b8cf0b4ca (diff) | |
download | nouveau-451e1a3916ea109fa7458c7ff07a6c803a66e912.tar.gz |
therm/fan: do not use the pwm mode when the vbios tells us to use toggle
Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | nvkm/subdev/therm/fanpwm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/nvkm/subdev/therm/fanpwm.c b/nvkm/subdev/therm/fanpwm.c index 9a5c07340..c629d7f2a 100644 --- a/nvkm/subdev/therm/fanpwm.c +++ b/nvkm/subdev/therm/fanpwm.c @@ -25,6 +25,8 @@ #include <core/option.h> #include <subdev/gpio.h> +#include <subdev/bios.h> +#include <subdev/bios/fan.h> #include "priv.h" @@ -86,11 +88,15 @@ nouveau_fanpwm_create(struct nouveau_therm *therm, struct dcb_gpio_func *func) { struct nouveau_device *device = nv_device(therm); struct nouveau_therm_priv *tpriv = (void *)therm; + struct nouveau_bios *bios = nouveau_bios(therm); struct nouveau_fanpwm_priv *priv; + struct nvbios_therm_fan fan; u32 divs, duty; + nvbios_fan_parse(bios, &fan); + if (!nouveau_boolopt(device->cfgopt, "NvFanPWM", func->param) || - !therm->pwm_ctrl || + !therm->pwm_ctrl || fan.type == NVBIOS_THERM_FAN_TOGGLE || therm->pwm_get(therm, func->line, &divs, &duty) == -ENODEV) return -ENODEV; |