summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2008-12-29 10:05:17 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2008-12-29 10:05:17 +0800
commitfcd280b730f86ea54ecd89d3e037e71f8375b5f5 (patch)
treed61153102c2f69613f4af5fbd8074b22fcebb776 /src
parent6b9f421b792c701e909d81ae2b6e6a47fb069b0b (diff)
Bug #19239: Add a quirk for broken ACPI lid state
For broken hardware/bios with incorrect ACPI LID state, there's machine that can not be fixed in ACPI way, customed DSDT that reprogram _LID method to read EC state. Although this is ACPI issue, this quirk can be used to work around that.
Diffstat (limited to 'src')
-rw-r--r--src/i830.h1
-rw-r--r--src/i830_lvds.c3
-rw-r--r--src/i830_quirks.c10
3 files changed, 14 insertions, 0 deletions
diff --git a/src/i830.h b/src/i830.h
index 8ad5c698..5e507533 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -1035,6 +1035,7 @@ extern const int I830CopyROP[16];
#define QUIRK_RESET_MODES 0x00000020
#define QUIRK_PFIT_SAFE 0x00000040
#define QUIRK_IGNORE_CRT 0x00000080
+#define QUIRK_BROKEN_ACPI_LID 0x00000100
extern void i830_fixup_devices(ScrnInfoPtr);
#endif /* _I830_H_ */
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index c6002ebd..df92dea1 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -401,6 +401,9 @@ i830_lvds_acpi_lid_open(xf86OutputPtr output)
char state[64];
enum lid_status ret = LID_UNKNOWN;
+ if (pI830->quirk_flag & QUIRK_BROKEN_ACPI_LID)
+ goto out;
+
button_dir = opendir(ACPI_BUTTON);
/* If acpi button driver is not loaded, bypass ACPI check method */
if (button_dir == NULL)
diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 68e39eee..67043765 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -227,6 +227,13 @@ static void quirk_ivch_dvob (I830Ptr pI830)
pI830->quirk_flag |= QUIRK_IVCH_NEED_DVOB;
}
+/* For broken hw/bios for incorrect acpi _LID state that
+ can't be fixed with customed DSDT or other way */
+static void quirk_broken_acpi_lid (I830Ptr pI830)
+{
+ pI830->quirk_flag |= QUIRK_BROKEN_ACPI_LID;
+}
+
/* keep this list sorted by OEM, then by chip ID */
static i830_quirk i830_quirk_list[] = {
/* Aopen mini pc */
@@ -347,6 +354,9 @@ static i830_quirk i830_quirk_list[] = {
/* Asus Eee Box has no LVDS */
{ PCI_CHIP_I945_GME, 0x1043, 0x1252, quirk_ignore_lvds },
+ /* #19239: Mirrus Centrino laptop */
+ { PCI_CHIP_I915_GM, 0x1584, 0x9800, quirk_broken_acpi_lid },
+
{ 0, 0, 0, NULL },
};