linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Len Brown <len.brown@intel.com>
To: linux-acpi@vger.kernel.org
Cc: Len Brown <len.brown@intel.com>
Subject: [PATCH 6/6] ACPI: thermal: work around broken AOpen Award BIOS
Date: Thu,  9 Aug 2007 01:58:56 -0400	[thread overview]
Message-ID: <11866391413674-git-send-email-len.brown@intel.com> (raw)
Message-ID: <e4c19636e4a65815b54691c031410b15194b68b4.1186638234.git.len.brown@intel.com> (raw)
In-Reply-To: <11866391402883-git-send-email-len.brown@intel.com>
In-Reply-To: <c405f58ecf5ebf0ba3752cb24a7cd0cc5075646d.1186638234.git.len.brown@intel.com>

Use DMI to:
1. enable polling (BIOS thermal events are broken)
2. disable active trip points (BIOS fan control is broken)
3. disable passive trip point (BIOS hard-codes it too low)

The actual temperature reading does work,
and with the aid of polling, the critical
trip point should work too.

http://bugzilla.kernel.org/show_bug.cgi?id=8842

Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/acpi/thermal.c |   65 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 65 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 2b48ab9..d105d65 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -33,6 +33,7 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/dmi.h>
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/proc_fs.h>
@@ -1314,10 +1315,74 @@ static int acpi_thermal_resume(struct acpi_device *device)
 	return AE_OK;
 }
 
+#ifdef CONFIG_DMI
+static int thermal_act(struct dmi_system_id *d) {
+
+	if (act == 0) {
+		printk(KERN_NOTICE "ACPI: %s detected: "
+			"disabling all active thermal trip points\n", d->ident);
+		act = -1;
+	}
+	return 0;
+}
+static int thermal_tzp(struct dmi_system_id *d) {
+
+	if (tzp == 0) {
+		printk(KERN_NOTICE "ACPI: %s detected: "
+			"enabling thermal zone polling\n", d->ident);
+		tzp = 300;	/* 300 dS = 30 Seconds */
+	}
+	return 0;
+}
+static int thermal_psv(struct dmi_system_id *d) {
+
+	if (psv == 0) {
+		printk(KERN_NOTICE "ACPI: %s detected: "
+			"disabling all passive thermal trip points\n", d->ident);
+		psv = -1;
+	}
+	return 0;
+}
+
+static struct dmi_system_id thermal_dmi_table[] __initdata = {
+	/*
+	 * Award BIOS on this AOpen makes thermal control almost worthless.
+	 * http://bugzilla.kernel.org/show_bug.cgi?id=8842
+	 */
+	{
+	 .callback = thermal_act,
+	 .ident = "AOpen i915GMm-HFS",
+	 .matches = {
+		DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
+		DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"),
+		},
+	},
+	{
+	 .callback = thermal_psv,
+	 .ident = "AOpen i915GMm-HFS",
+	 .matches = {
+		DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
+		DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"),
+		},
+	},
+	{
+	 .callback = thermal_tzp,
+	 .ident = "AOpen i915GMm-HFS",
+	 .matches = {
+		DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
+		DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"),
+		},
+	},
+	{}
+};
+#endif /* CONFIG_DMI */
+
 static int __init acpi_thermal_init(void)
 {
 	int result = 0;
 
+	dmi_check_system(thermal_dmi_table);
+
 	if (off) {
 		printk(KERN_NOTICE "ACPI: thermal control disabled\n");
 		return -ENODEV;
-- 
1.5.3.rc4.29.g74276

  parent reply	other threads:[~2007-08-09  5:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-09  5:58 ACPI Thermal workaround hooks Len Brown
     [not found] ` <c405f58ecf5ebf0ba3752cb24a7cd0cc5075646d.1186638234.git.len.brown@intel.com>
2007-08-09  5:58   ` [PATCH 1/6] ACPI: thermal: "thermal.off=1" disables ACPI thermal support Len Brown
     [not found]   ` <bccec9c22da355b4c54d8b74bb527c67e04c4bfb.1186638234.git.len.brown@intel.com>
2007-08-09  5:58     ` [PATCH 2/6] ACPI: thermal: expose "thermal.tzp=" Len Brown
     [not found]   ` <95fa38b440b56d248ad09a75d1187310527e7b17.1186638234.git.len.brown@intel.com>
2007-08-09  5:58     ` [PATCH 3/6] ACPI: thermal: create "thermal.psv=" bootparam Len Brown
2007-08-09 17:22       ` Len Brown
     [not found]   ` <b3f523f99b705457d55f79ce20d960a6f94cbf86.1186638234.git.len.brown@intel.com>
2007-08-09  5:58     ` [PATCH 4/6] ACPI: thermal: create "thermal.nocrt" bootparam Len Brown
     [not found]   ` <131367d2e0318da7feca70b91c2c3c1c47534bed.1186638234.git.len.brown@intel.com>
2007-08-09  5:58     ` [PATCH 5/6] ACPI: thermal: add thermal.act= bootparam Len Brown
2007-08-11  4:29       ` Len Brown
     [not found]   ` <e4c19636e4a65815b54691c031410b15194b68b4.1186638234.git.len.brown@intel.com>
2007-08-09  5:58     ` Len Brown [this message]
2007-08-09 17:33 ` ACPI Thermal workaround hooks Thomas Renninger
2007-08-11  4:41   ` Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11866391413674-git-send-email-len.brown@intel.com \
    --to=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).