/* must be called with alarm_program_lock taken ! */ void
nvkm_therm_sensor_set_threshold_state(struct nvkm_therm *therm, enum nvkm_therm_thrs thrs, enum nvkm_therm_thrs_state st)
{
therm->sensor.alarm_state[thrs] = st;
}
/* must be called with alarm_program_lock taken ! */ enum nvkm_therm_thrs_state
nvkm_therm_sensor_get_threshold_state(struct nvkm_therm *therm, enum nvkm_therm_thrs thrs)
{ return therm->sensor.alarm_state[thrs];
}
if (dir == NVKM_THERM_THRS_FALLING)
nvkm_info(subdev, "temperature (%i C) went below the '%s' threshold\n",
temperature, thresholds[thrs]); else
nvkm_info(subdev, "temperature (%i C) hit the '%s' threshold\n",
temperature, thresholds[thrs]);
active = (dir == NVKM_THERM_THRS_RISING); switch (thrs) { case NVKM_THERM_THRS_FANBOOST: if (active) {
nvkm_therm_fan_set(therm, true, 100);
nvkm_therm_fan_mode(therm, NVKM_THERM_CTRL_AUTO);
} break; case NVKM_THERM_THRS_DOWNCLOCK: if (therm->emergency.downclock)
therm->emergency.downclock(therm, active); break; case NVKM_THERM_THRS_CRITICAL: if (therm->emergency.pause)
therm->emergency.pause(therm, active); break; case NVKM_THERM_THRS_SHUTDOWN: if (active) { struct work_struct *work;
work = kmalloc(sizeof(*work), GFP_ATOMIC); if (work) {
INIT_WORK(work, nv_poweroff_work);
schedule_work(work);
}
} break; case NVKM_THERM_THRS_NR: break;
}
}
/* must be called with alarm_program_lock taken ! */ staticvoid
nvkm_therm_threshold_hyst_polling(struct nvkm_therm *therm, conststruct nvbios_therm_threshold *thrs, enum nvkm_therm_thrs thrs_name)
{ enum nvkm_therm_thrs_direction direction; enum nvkm_therm_thrs_state prev_state, new_state; int temp = therm->func->temp_get(therm);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.