From 919a5745ee15b3a414ba8327056592376173ffa8 Mon Sep 17 00:00:00 2001 From: Zhenyu Wang Date: Thu, 25 Dec 2008 15:25:34 +0800 Subject: [PATCH] Add a quirk for broken ACPI lid hardware/bios --- src/i830.h | 1 + src/i830_lvds.c | 3 +++ src/i830_quirks.c | 9 +++++++++ 3 files changed, 13 insertions(+), 0 deletions(-) diff --git a/src/i830.h b/src/i830.h index 8ad5c69..5e50753 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 10b6904..db3c93d 100644 --- a/src/i830_lvds.c +++ b/src/i830_lvds.c @@ -433,6 +433,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 68e39ee..acd52ec 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; } +/* quirk broken hw/bios for wrong acpi _LID state that + can't be fixed with customed DSDT or other way */ +static void quirk_broken_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,8 @@ static i830_quirk i830_quirk_list[] = { /* Asus Eee Box has no LVDS */ { PCI_CHIP_I945_GME, 0x1043, 0x1252, quirk_ignore_lvds }, + { PCI_CHIP_I915_GM, 0x1584, 0x9800, quirk_broken_lid }, + { 0, 0, 0, NULL }, }; -- 1.5.6.5