]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/nouveau/therm: disable temperature management if the sensor isn't readable
authorMartin Peres <martin.peres@labri.fr>
Thu, 14 Mar 2013 23:42:38 +0000 (00:42 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 18 Mar 2013 01:15:27 +0000 (11:15 +1000)
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/subdev/therm/temp.c

index 0d94d1a19eb7f38a32db8fa2bf5db99c20719a52..2a02c9f1d7ff1cb31642647b4ae00d9fca558eb1 100644 (file)
@@ -193,7 +193,7 @@ alarm_timer_callback(struct nouveau_alarm *alarm)
                                             NOUVEAU_THERM_THRS_SHUTDOWN);
 
        /* schedule the next poll in one second */
-       if (list_empty(&alarm->head))
+       if (therm->temp_get(therm) >= 0 && list_empty(&alarm->head))
                ptimer->alarm(ptimer, 1000 * 1000 * 1000, alarm);
 
        spin_unlock_irqrestore(&priv->sensor.alarm_program_lock, flags);