Skip to content

Commit

Permalink
drm/nouveau/therm: display the availability of the internal sensor
Browse files Browse the repository at this point in the history
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 bf55eb8 commit 0b3ee37
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/nouveau/core/subdev/therm/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ nouveau_therm_preinit(struct nouveau_therm *therm)
nouveau_therm_fan_ctor(therm);

nouveau_therm_fan_mode(therm, NOUVEAU_THERM_CTRL_NONE);
nouveau_therm_sensor_preinit(therm);
return 0;
}

Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/nouveau/core/subdev/therm/priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ int nouveau_therm_fan_sense(struct nouveau_therm *therm);

int nouveau_therm_preinit(struct nouveau_therm *);

void nouveau_therm_sensor_preinit(struct nouveau_therm *);
void nouveau_therm_sensor_set_threshold_state(struct nouveau_therm *therm,
enum nouveau_therm_thrs thrs,
enum nouveau_therm_thrs_state st);
Expand Down
11 changes: 11 additions & 0 deletions drivers/gpu/drm/nouveau/core/subdev/therm/temp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 0b3ee37

Please sign in to comment.