summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_thermal.c
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2005-02-22 00:40:13 +0000
committernjl <njl@FreeBSD.org>2005-02-22 00:40:13 +0000
commit9134e725ec9f023ad3711139125dd592c8b7770a (patch)
tree43df51c152210fb758afefb63409572d9a3ab7f7 /sys/dev/acpica/acpi_thermal.c
parent33c97a179e93e168dfd1b4daf4a73aa207c102dc (diff)
downloadFreeBSD-src-9134e725ec9f023ad3711139125dd592c8b7770a.zip
FreeBSD-src-9134e725ec9f023ad3711139125dd592c8b7770a.tar.gz
Set the start of the cooling time later on, when we're actually performing
the switch. Other interim tests (i.e., for minimum runtime) could invalidate the start time. This fixes transitions to cooler states in that now they go to the next active state (_AC0 -> _AC1) instead of going straight to off (_AC0 -> off). Submitted by: Alexandre "Sunny" Kovalenko (Alex.Kovalenko / verizon.net)
Diffstat (limited to 'sys/dev/acpica/acpi_thermal.c')
-rw-r--r--sys/dev/acpica/acpi_thermal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c
index f936cd9..53e791f 100644
--- a/sys/dev/acpica/acpi_thermal.c
+++ b/sys/dev/acpica/acpi_thermal.c
@@ -398,14 +398,13 @@ acpi_tz_monitor(void *Context)
*/
newactive = TZ_ACTIVE_NONE;
for (i = TZ_NUMLEVELS - 1; i >= 0; i--) {
- if ((sc->tz_zone.ac[i] != -1) && (temp >= sc->tz_zone.ac[i])) {
+ if (sc->tz_zone.ac[i] != -1 && temp >= sc->tz_zone.ac[i]) {
newactive = i;
if (sc->tz_active != newactive) {
ACPI_VPRINT(sc->tz_dev,
acpi_device_get_parent_softc(sc->tz_dev),
"_AC%d: temperature %d.%d >= setpoint %d.%d\n", i,
TZ_KELVTOC(temp), TZ_KELVTOC(sc->tz_zone.ac[i]));
- getnanotime(&sc->tz_cooling_started);
}
}
}
@@ -455,6 +454,7 @@ acpi_tz_monitor(void *Context)
acpi_tz_aclevel_string(sc->tz_active),
acpi_tz_aclevel_string(newactive), TZ_KELVTOC(temp));
sc->tz_active = newactive;
+ getnanotime(&sc->tz_cooling_started);
}
/* XXX (de)activate any passive cooling that may be required. */
OpenPOWER on IntegriCloud