aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c
diff options
context:
space:
mode:
authorMartin Peres <martin.peres@labri.fr>2013-03-15 01:47:16 +0100
committerBen Skeggs <bskeggs@redhat.com>2013-03-18 11:15:27 +1000
commit0b3ee3772e11da2f36c91e542545780d3ed28415 (patch)
tree4903fdf660c2468759971430c1be90560dce09f0 /drivers/gpu/drm/nouveau/core/subdev/therm/temp.c
parentdrm/nouveau/therm: disable temperature management if the sensor isn't readable (diff)
downloadlinux-dev-0b3ee3772e11da2f36c91e542545780d3ed28415.tar.xz
linux-dev-0b3ee3772e11da2f36c91e542545780d3ed28415.zip
drm/nouveau/therm: display the availability of the internal sensor
Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/subdev/therm/temp.c')
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/therm/temp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c b/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c
index 2a02c9f1d7ff..470f6a47b656 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c
@@ -216,6 +216,17 @@ nouveau_therm_program_alarms_polling(struct nouveau_therm *therm)
alarm_timer_callback(&priv->sensor.therm_poll_alarm);
}
+void
+nouveau_therm_sensor_preinit(struct nouveau_therm *therm)
+{
+ const char *sensor_avail = "yes";
+
+ if (therm->temp_get(therm) < 0)
+ sensor_avail = "no";
+
+ nv_info(therm, "internal sensor: %s\n", sensor_avail);
+}
+
int
nouveau_therm_sensor_ctor(struct nouveau_therm *therm)
{