summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 06:54:12 +0200
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 04:40:24 +0200
commitb3c418bb48228a206a8c421adaf269cdc83c3c52 (patch)
tree32a329d91c9b42ee79244eb39d87b560cebe28f8 /drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
parentdrm/nouveau/pmu: switch to subdev printk macros (diff)
downloadlinux-b3c418bb48228a206a8c421adaf269cdc83c3c52.tar.xz
linux-b3c418bb48228a206a8c421adaf269cdc83c3c52.zip
drm/nouveau/therm: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
index 41628de3bf6c..b346f3a0ff11 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
@@ -88,6 +88,7 @@ nvkm_therm_sensor_event(struct nvkm_therm *obj, enum nvkm_therm_thrs thrs,
enum nvkm_therm_thrs_direction dir)
{
struct nvkm_therm_priv *therm = container_of(obj, typeof(*therm), base);
+ struct nvkm_subdev *subdev = &therm->base.subdev;
bool active;
const char *thresolds[] = {
"fanboost", "downclock", "critical", "shutdown"
@@ -98,11 +99,12 @@ nvkm_therm_sensor_event(struct nvkm_therm *obj, enum nvkm_therm_thrs thrs,
return;
if (dir == NVKM_THERM_THRS_FALLING)
- nv_info(therm, "temperature (%i C) went below the '%s' threshold\n",
- temperature, thresolds[thrs]);
+ nvkm_info(subdev,
+ "temperature (%i C) went below the '%s' threshold\n",
+ temperature, thresolds[thrs]);
else
- nv_info(therm, "temperature (%i C) hit the '%s' threshold\n",
- temperature, thresolds[thrs]);
+ nvkm_info(subdev, "temperature (%i C) hit the '%s' threshold\n",
+ temperature, thresolds[thrs]);
active = (dir == NVKM_THERM_THRS_RISING);
switch (thrs) {
@@ -200,13 +202,16 @@ nvkm_therm_program_alarms_polling(struct nvkm_therm *obj)
struct nvkm_therm_priv *therm = container_of(obj, typeof(*therm), base);
struct nvbios_therm_sensor *sensor = &therm->bios_sensor;
- nv_debug(therm,
- "programmed thresholds [ %d(%d), %d(%d), %d(%d), %d(%d) ]\n",
- sensor->thrs_fan_boost.temp, sensor->thrs_fan_boost.hysteresis,
- sensor->thrs_down_clock.temp,
- sensor->thrs_down_clock.hysteresis,
- sensor->thrs_critical.temp, sensor->thrs_critical.hysteresis,
- sensor->thrs_shutdown.temp, sensor->thrs_shutdown.hysteresis);
+ nvkm_debug(&therm->base.subdev,
+ "programmed thresholds [ %d(%d), %d(%d), %d(%d), %d(%d) ]\n",
+ sensor->thrs_fan_boost.temp,
+ sensor->thrs_fan_boost.hysteresis,
+ sensor->thrs_down_clock.temp,
+ sensor->thrs_down_clock.hysteresis,
+ sensor->thrs_critical.temp,
+ sensor->thrs_critical.hysteresis,
+ sensor->thrs_shutdown.temp,
+ sensor->thrs_shutdown.hysteresis);
alarm_timer_callback(&therm->sensor.therm_poll_alarm);
}
@@ -238,13 +243,14 @@ nvkm_therm_sensor_preinit(struct nvkm_therm *therm)
if (therm->temp_get(therm) < 0)
sensor_avail = "no";
- nv_info(therm, "internal sensor: %s\n", sensor_avail);
+ nvkm_debug(&therm->subdev, "internal sensor: %s\n", sensor_avail);
}
int
nvkm_therm_sensor_ctor(struct nvkm_therm *obj)
{
struct nvkm_therm_priv *therm = container_of(obj, typeof(*therm), base);
+ struct nvkm_subdev *subdev = &therm->base.subdev;
struct nvkm_bios *bios = nvkm_bios(therm);
nvkm_alarm_init(&therm->sensor.therm_poll_alarm, alarm_timer_callback);
@@ -252,7 +258,7 @@ nvkm_therm_sensor_ctor(struct nvkm_therm *obj)
nvkm_therm_temp_set_defaults(&therm->base);
if (nvbios_therm_sensor_parse(bios, NVBIOS_THERM_DOMAIN_CORE,
&therm->bios_sensor))
- nv_error(therm, "nvbios_therm_sensor_parse failed\n");
+ nvkm_error(subdev, "nvbios_therm_sensor_parse failed\n");
nvkm_therm_temp_safety_checks(&therm->base);
return 0;