Lines Matching +full:temp +full:- +full:sensor
29 therm->bios_sensor.offset_constant = 0; in nvkm_therm_temp_set_defaults()
31 therm->bios_sensor.thrs_fan_boost.temp = 90; in nvkm_therm_temp_set_defaults()
32 therm->bios_sensor.thrs_fan_boost.hysteresis = 3; in nvkm_therm_temp_set_defaults()
34 therm->bios_sensor.thrs_down_clock.temp = 95; in nvkm_therm_temp_set_defaults()
35 therm->bios_sensor.thrs_down_clock.hysteresis = 3; in nvkm_therm_temp_set_defaults()
37 therm->bios_sensor.thrs_critical.temp = 105; in nvkm_therm_temp_set_defaults()
38 therm->bios_sensor.thrs_critical.hysteresis = 5; in nvkm_therm_temp_set_defaults()
40 therm->bios_sensor.thrs_shutdown.temp = 135; in nvkm_therm_temp_set_defaults()
41 therm->bios_sensor.thrs_shutdown.hysteresis = 5; /*not that it matters */ in nvkm_therm_temp_set_defaults()
47 struct nvbios_therm_sensor *s = &therm->bios_sensor; in nvkm_therm_temp_safety_checks()
50 s->thrs_fan_boost.hysteresis = max_t(u8, s->thrs_fan_boost.hysteresis, 2); in nvkm_therm_temp_safety_checks()
51 s->thrs_down_clock.hysteresis = max_t(u8, s->thrs_down_clock.hysteresis, 2); in nvkm_therm_temp_safety_checks()
52 s->thrs_critical.hysteresis = max_t(u8, s->thrs_critical.hysteresis, 2); in nvkm_therm_temp_safety_checks()
53 s->thrs_shutdown.hysteresis = max_t(u8, s->thrs_shutdown.hysteresis, 2); in nvkm_therm_temp_safety_checks()
62 therm->sensor.alarm_state[thrs] = st; in nvkm_therm_sensor_set_threshold_state()
70 return therm->sensor.alarm_state[thrs]; in nvkm_therm_sensor_get_threshold_state()
84 struct nvkm_subdev *subdev = &therm->subdev; in nvkm_therm_sensor_event()
89 int temperature = therm->func->temp_get(therm); in nvkm_therm_sensor_event()
111 if (therm->emergency.downclock) in nvkm_therm_sensor_event()
112 therm->emergency.downclock(therm, active); in nvkm_therm_sensor_event()
115 if (therm->emergency.pause) in nvkm_therm_sensor_event()
116 therm->emergency.pause(therm, active); in nvkm_therm_sensor_event()
143 int temp = therm->func->temp_get(therm); in nvkm_therm_threshold_hyst_polling() local
147 if (temp >= thrs->temp && prev_state == NVKM_THERM_THRS_LOWER) { in nvkm_therm_threshold_hyst_polling()
150 } else if (temp <= thrs->temp - thrs->hysteresis && in nvkm_therm_threshold_hyst_polling()
165 container_of(alarm, struct nvkm_therm, sensor.therm_poll_alarm); in alarm_timer_callback()
166 struct nvbios_therm_sensor *sensor = &therm->bios_sensor; in alarm_timer_callback() local
167 struct nvkm_timer *tmr = therm->subdev.device->timer; in alarm_timer_callback()
170 spin_lock_irqsave(&therm->sensor.alarm_program_lock, flags); in alarm_timer_callback()
172 nvkm_therm_threshold_hyst_polling(therm, &sensor->thrs_fan_boost, in alarm_timer_callback()
176 &sensor->thrs_down_clock, in alarm_timer_callback()
179 nvkm_therm_threshold_hyst_polling(therm, &sensor->thrs_critical, in alarm_timer_callback()
182 nvkm_therm_threshold_hyst_polling(therm, &sensor->thrs_shutdown, in alarm_timer_callback()
185 spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags); in alarm_timer_callback()
188 if (therm->func->temp_get(therm) >= 0) in alarm_timer_callback()
195 struct nvbios_therm_sensor *sensor = &therm->bios_sensor; in nvkm_therm_program_alarms_polling() local
197 nvkm_debug(&therm->subdev, in nvkm_therm_program_alarms_polling()
199 sensor->thrs_fan_boost.temp, in nvkm_therm_program_alarms_polling()
200 sensor->thrs_fan_boost.hysteresis, in nvkm_therm_program_alarms_polling()
201 sensor->thrs_down_clock.temp, in nvkm_therm_program_alarms_polling()
202 sensor->thrs_down_clock.hysteresis, in nvkm_therm_program_alarms_polling()
203 sensor->thrs_critical.temp, in nvkm_therm_program_alarms_polling()
204 sensor->thrs_critical.hysteresis, in nvkm_therm_program_alarms_polling()
205 sensor->thrs_shutdown.temp, in nvkm_therm_program_alarms_polling()
206 sensor->thrs_shutdown.hysteresis); in nvkm_therm_program_alarms_polling()
208 alarm_timer_callback(&therm->sensor.therm_poll_alarm); in nvkm_therm_program_alarms_polling()
214 therm->func->program_alarms(therm); in nvkm_therm_sensor_init()
221 struct nvkm_timer *tmr = therm->subdev.device->timer; in nvkm_therm_sensor_fini()
223 nvkm_timer_alarm(tmr, 0, &therm->sensor.therm_poll_alarm); in nvkm_therm_sensor_fini()
232 if (therm->func->temp_get(therm) < 0) in nvkm_therm_sensor_preinit()
235 nvkm_debug(&therm->subdev, "internal sensor: %s\n", sensor_avail); in nvkm_therm_sensor_preinit()
241 struct nvkm_subdev *subdev = &therm->subdev; in nvkm_therm_sensor_ctor()
242 struct nvkm_bios *bios = subdev->device->bios; in nvkm_therm_sensor_ctor()
244 nvkm_alarm_init(&therm->sensor.therm_poll_alarm, alarm_timer_callback); in nvkm_therm_sensor_ctor()
248 &therm->bios_sensor)) in nvkm_therm_sensor_ctor()