提交 134fc032 编写于 作者: M Marcin Slusarz 提交者: Ben Skeggs

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: NMarcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: NMartin Peres <martin.peres@labri.fr>
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 a84fa1a3
...@@ -105,7 +105,7 @@ void nouveau_therm_sensor_event(struct nouveau_therm *therm, ...@@ -105,7 +105,7 @@ void nouveau_therm_sensor_event(struct nouveau_therm *therm,
return; return;
if (dir == NOUVEAU_THERM_THRS_FALLING) 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]); temperature, thresolds[thrs]);
else else
nv_info(therm, "temperature (%u C) hit the '%s' threshold\n", nv_info(therm, "temperature (%u C) hit the '%s' threshold\n",
...@@ -114,8 +114,10 @@ void nouveau_therm_sensor_event(struct nouveau_therm *therm, ...@@ -114,8 +114,10 @@ void nouveau_therm_sensor_event(struct nouveau_therm *therm,
active = (dir == NOUVEAU_THERM_THRS_RISING); active = (dir == NOUVEAU_THERM_THRS_RISING);
switch (thrs) { switch (thrs) {
case NOUVEAU_THERM_THRS_FANBOOST: case NOUVEAU_THERM_THRS_FANBOOST:
if (active) {
nouveau_therm_fan_set(therm, true, 100); nouveau_therm_fan_set(therm, true, 100);
nouveau_therm_mode(therm, NOUVEAU_THERM_CTRL_AUTO); nouveau_therm_mode(therm, NOUVEAU_THERM_CTRL_AUTO);
}
break; break;
case NOUVEAU_THERM_THRS_DOWNCLOCK: case NOUVEAU_THERM_THRS_DOWNCLOCK:
if (priv->emergency.downclock) if (priv->emergency.downclock)
...@@ -126,6 +128,7 @@ void nouveau_therm_sensor_event(struct nouveau_therm *therm, ...@@ -126,6 +128,7 @@ void nouveau_therm_sensor_event(struct nouveau_therm *therm,
priv->emergency.pause(therm, active); priv->emergency.pause(therm, active);
break; break;
case NOUVEAU_THERM_THRS_SHUTDOWN: case NOUVEAU_THERM_THRS_SHUTDOWN:
if (active)
orderly_poweroff(true); orderly_poweroff(true);
break; break;
case NOUVEAU_THERM_THRS_NR: case NOUVEAU_THERM_THRS_NR:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册