xf86-video-intel: src/i830_driver.c src/i830.h src/i830_quirks.c

Jesse Barnes jbarnes at kemper.freedesktop.org
Tue Apr 29 13:21:04 PDT 2008


 src/i830.h        |    1 +
 src/i830_driver.c |    3 +++
 src/i830_quirks.c |   12 ++++++++++++
 3 files changed, 16 insertions(+)

New commits:
commit a0ced923bb793aa22e6bfbeeec0888d3b42ce176
Author: Jesse Barnes <jbarnes at hobbes.lan>
Date:   Tue Apr 29 13:19:02 2008 -0700

    Add a new quirk for BIOSes that reprogram regs at lid close/open time
    
    Dell Latitude D500s seem to have this problem.  At lid close/open, the DSPABASE
    reg gets reset to 0, so we either need to keep the framebuffer at offset 0 or
    make sure we reprogram the CRTCs after the lid opens again.  Since we can't
    make sure the former is always true (buffer resize, etc.), this patch adds a
    quirk to reset the modes at lid open time.
    
    Fixes FDO bug #14890.

diff --git a/src/i830.h b/src/i830.h
index 2c6d2b4..f8845bf 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -893,6 +893,7 @@ extern const int I830CopyROP[16];
 #define QUIRK_IGNORE_MACMINI_LVDS 	0x00000004
 #define QUIRK_PIPEA_FORCE		0x00000008
 #define QUIRK_IVCH_NEED_DVOB		0x00000010
+#define QUIRK_RESET_MODES		0x00000020
 extern void i830_fixup_devices(ScrnInfoPtr);
 
 #endif /* _I830_H_ */
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 9077c58..b776ff6 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3528,6 +3528,9 @@ I830PMEvent(int scrnIndex, pmEvent event, Bool undo)
 
       I830CheckDevicesTimer(NULL, 0, pScrn);
       SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverReset);
+      if (pI830->quirk_flag & QUIRK_RESET_MODES)
+	 xf86SetDesiredModes(pScrn);
+
       break;
    default:
       ErrorF("I830PMEvent: received APM event %d\n", event);
diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 24c9658..aaff753 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -161,6 +161,15 @@ static void i830_dmi_dump(void)
     DMIID_DUMP(chassis_asset_tag);
 }
 
+/*
+ * Some machines hose the display regs regardless of the ACPI DOS
+ * setting, so we need to reset modes at ACPI event time.
+ */
+static void quirk_reset_modes (I830Ptr pI830)
+{
+    pI830->quirk_flag |= QUIRK_RESET_MODES;
+}
+
 static void quirk_pipea_force (I830Ptr pI830)
 {
     pI830->quirk_flag |= QUIRK_PIPEA_FORCE;
@@ -278,6 +287,9 @@ static i830_quirk i830_quirk_list[] = {
     /* Intel 945GM hardware (See LP: #152416) */
     { PCI_CHIP_I945_GM, 0x1584, 0x9900, quirk_ignore_tv },
 
+    /* Dell Latitude D500 needs reset modes quirk */
+    { PCI_CHIP_I855_GM, 0x1028, 0x0152, quirk_reset_modes },
+
     { 0, 0, 0, NULL },
 };
 


More information about the xorg-commit mailing list