From owner-freebsd-acpi@FreeBSD.ORG Wed Feb 9 02:01:30 2005 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5280416A4CE for ; Wed, 9 Feb 2005 02:01:30 +0000 (GMT) Received: from out005.verizon.net (out005pub.verizon.net [206.46.170.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7498843D3F for ; Wed, 9 Feb 2005 02:01:29 +0000 (GMT) (envelope-from Alex.Kovalenko@verizon.net) Received: from RabbitsDen ([70.21.161.195]) by out005.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20050209020128.GJRC6130.out005.verizon.net@RabbitsDen> for ; Tue, 8 Feb 2005 20:01:28 -0600 From: "Alexandre \"Sunny\" Kovalenko" To: freebsd-acpi@freebsd.org Content-Type: multipart/mixed; boundary="=-cDYnWL8BjwMTyuTKOvjs" Date: Tue, 08 Feb 2005 20:58:38 -0500 Message-Id: <1107914318.1015.15.camel@RabbitsDen> Mime-Version: 1.0 X-Mailer: Evolution 2.0.3 FreeBSD GNOME Team Port X-Authentication-Info: Submitted using SMTP AUTH at out005.verizon.net from [70.21.161.195] at Tue, 8 Feb 2005 20:01:28 -0600 Subject: Thermal state switching X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Feb 2005 02:01:30 -0000 --=-cDYnWL8BjwMTyuTKOvjs Content-Type: text/plain; charset=iso-8859-5 Content-Transfer-Encoding: 8bit Good people, I was looking at thermal states switching by acpi_thermal.c and it looks like follows (provided that temperature raises and falls slowly and gradually): NONE =up> AC2 =up> AC1 =up> AC0 =down> NONE (1) I do not know whether this was intentional or not and, for me, something along the lines of NONE =up> AC2 =up> AC1 =up> AC0 =down> AC1 =down> AC2 =down> NONE (2) seemed more natural. If (2) and not (1) was indeed the desired behavior attached patch seems to do the job. If (1) is what was intended, I do apologize for the noise. I am running -CURRENT from February 3. -- Alexandre "Sunny" Kovalenko (Олександр Коваленко) --=-cDYnWL8BjwMTyuTKOvjs Content-Disposition: attachment; filename=acpi_thermal.c.patch Content-Type: text/x-patch; name=acpi_thermal.c.patch; charset=ASCII Content-Transfer-Encoding: 7bit --- acpi_thermal.c.ORIG Tue Sep 21 14:39:10 2004 +++ acpi_thermal.c Tue Feb 8 20:17:51 2005 @@ -405,7 +405,6 @@ 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_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. */ --=-cDYnWL8BjwMTyuTKOvjs--