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.
This commit is contained in:
Jesse Barnes 2008-04-29 13:19:02 -07:00
parent fff17b9d1b
commit a0ced923bb
3 changed files with 16 additions and 0 deletions

View File

@ -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_ */

View File

@ -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);

View File

@ -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 },
};