diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2013-11-03 23:34:55 (GMT) |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-11-08 05:40:03 (GMT) |
commit | 682b1fc79399bad4d538a36bb3eb12b3ec356f03 (patch) | |
tree | 8746a6fa11afcab468600dcb6d2c24a862abeddc /drivers/gpu/drm/nouveau/core/subdev/therm/base.c | |
parent | 208cf0b789208df752bab6ac18cbe64f4c17acc8 (diff) | |
download | linux-fsl-qoriq-682b1fc79399bad4d538a36bb3eb12b3ec356f03.tar.xz |
drm/nouveau/therm: update target fanspeed outside of therm lock
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 | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/base.c b/drivers/gpu/drm/nouveau/core/subdev/therm/base.c index 29cf7bc..21b2b30 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/therm/base.c +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/base.c @@ -92,8 +92,9 @@ nouveau_therm_update(struct nouveau_therm *therm, int mode) struct nouveau_timer *ptimer = nouveau_timer(therm); struct nouveau_therm_priv *priv = (void *)therm; unsigned long flags; + bool immd = true; bool poll = true; - int duty; + int duty = -1; spin_lock_irqsave(&priv->lock, flags); if (mode < 0) @@ -119,21 +120,22 @@ nouveau_therm_update(struct nouveau_therm *therm, int mode) duty = priv->cstate; poll = false; } + immd = false; break; case NOUVEAU_THERM_CTRL_NONE: default: ptimer->alarm_cancel(ptimer, &priv->alarm); poll = false; - goto done; } - nv_debug(therm, "FAN target request: %d%%\n", duty); - nouveau_therm_fan_set(therm, (mode != NOUVEAU_THERM_CTRL_AUTO), duty); - -done: if (list_empty(&priv->alarm.head) && poll) ptimer->alarm(ptimer, 1000000000ULL, &priv->alarm); spin_unlock_irqrestore(&priv->lock, flags); + + if (duty >= 0) { + nv_debug(therm, "FAN target request: %d%%\n", duty); + nouveau_therm_fan_set(therm, immd, duty); + } } int |