summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/core
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2013-02-03 18:17:41 +0100
committerBen Skeggs <bskeggs@redhat.com>2013-02-20 16:00:41 +1000
commit134fc0327552f3ebee2cdcb50b956a31029661c0 (patch)
treea46fa83de278f70560cd866682dfef62f8635c37 /drivers/gpu/drm/nouveau/core
parenta84fa1a32e4c224edd16c825a571fe27ab366913 (diff)
downloadlinux-3.10-134fc0327552f3ebee2cdcb50b956a31029661c0.tar.gz
linux-3.10-134fc0327552f3ebee2cdcb50b956a31029661c0.tar.bz2
linux-3.10-134fc0327552f3ebee2cdcb50b956a31029661c0.zip
drm/nouveau/therm: turn on fan only when threshold hit in positive direction
+ the same for shutdown threshold - seems impossible, but shutdown can fail. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Acked-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core')
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/therm/temp.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c b/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c
index bf9b3cefb51..8f27b44db4d 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c
@@ -105,7 +105,7 @@ void nouveau_therm_sensor_event(struct nouveau_therm *therm,
return;
if (dir == NOUVEAU_THERM_THRS_FALLING)
- nv_info(therm, "temperature (%u C) went bellow the '%s' threshold\n",
+ nv_info(therm, "temperature (%u C) went below the '%s' threshold\n",
temperature, thresolds[thrs]);
else
nv_info(therm, "temperature (%u C) hit the '%s' threshold\n",
@@ -114,8 +114,10 @@ void nouveau_therm_sensor_event(struct nouveau_therm *therm,
active = (dir == NOUVEAU_THERM_THRS_RISING);
switch (thrs) {
case NOUVEAU_THERM_THRS_FANBOOST:
- nouveau_therm_fan_set(therm, true, 100);
- nouveau_therm_mode(therm, NOUVEAU_THERM_CTRL_AUTO);
+ if (active) {
+ nouveau_therm_fan_set(therm, true, 100);
+ nouveau_therm_mode(therm, NOUVEAU_THERM_CTRL_AUTO);
+ }
break;
case NOUVEAU_THERM_THRS_DOWNCLOCK:
if (priv->emergency.downclock)
@@ -126,7 +128,8 @@ void nouveau_therm_sensor_event(struct nouveau_therm *therm,
priv->emergency.pause(therm, active);
break;
case NOUVEAU_THERM_THRS_SHUTDOWN:
- orderly_poweroff(true);
+ if (active)
+ orderly_poweroff(true);
break;
case NOUVEAU_THERM_THRS_NR:
break;