diff options
author | Martin Peres <martin.peres@labri.fr> | 2013-03-05 10:44:12 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-03-18 11:15:26 +1000 |
commit | 7591782b9f30a5a8bcbba5744c85050ff6743d69 (patch) | |
tree | cb88aed87c850e843391aea2ec63f58388e1398b /drivers/gpu | |
parent | eea4eb14a0f74f806e7a458f174f880744a68bdd (diff) | |
download | op-kernel-dev-7591782b9f30a5a8bcbba5744c85050ff6743d69.zip op-kernel-dev-7591782b9f30a5a8bcbba5744c85050ff6743d69.tar.gz |
drm/nouveau/therm: do not make assumptions on temperature
In nouveau_therm_sensor_event, temperature is stored as an uint8_t
even though the original interface returns an int.
This change should make it more obvious when the sensor is either
very-ill-calibrated or when we selected the wrong sensor style
on the nv40 family.
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/therm/temp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c b/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c index b37624a..0a17b95 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c @@ -106,16 +106,16 @@ void nouveau_therm_sensor_event(struct nouveau_therm *therm, const char *thresolds[] = { "fanboost", "downclock", "critical", "shutdown" }; - uint8_t temperature = therm->temp_get(therm); + int temperature = therm->temp_get(therm); if (thrs < 0 || thrs > 3) return; if (dir == NOUVEAU_THERM_THRS_FALLING) - nv_info(therm, "temperature (%u C) went below the '%s' threshold\n", + nv_info(therm, "temperature (%i C) went below the '%s' threshold\n", temperature, thresolds[thrs]); else - nv_info(therm, "temperature (%u C) hit the '%s' threshold\n", + nv_info(therm, "temperature (%i C) hit the '%s' threshold\n", temperature, thresolds[thrs]); active = (dir == NOUVEAU_THERM_THRS_RISING); |