Skip to content

Commit

Permalink
drm/nouveau/therm: disable auto fan management if temperature is not …
Browse files Browse the repository at this point in the history
…available

Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Martin Peres authored and Ben Skeggs committed Mar 18, 2013
1 parent 76c0295 commit 98ee7c7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/nouveau/core/subdev/therm/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ nouveau_therm_fan_mode(struct nouveau_therm *therm, int mode)
(mode != NOUVEAU_THERM_CTRL_NONE && device->card_type >= NV_C0))
return -EINVAL;

/* do not allow automatic fan management if the thermal sensor is
* not available */
if (priv->mode == 2 && therm->temp_get(therm) < 0)
return -EINVAL;

if (priv->mode == mode)
return 0;

Expand Down

0 comments on commit 98ee7c7

Please sign in to comment.