summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@benzedrine.nwnk.net>2006-09-15 13:51:18 -0400
committerAdam Jackson <ajax@benzedrine.nwnk.net>2006-09-15 13:51:18 -0400
commite3f4caf40708478ef327b029d0a75944c51ea905 (patch)
tree81f2c20bf76401e9b47cf3be1be192041d34a358
parent2b9c87bbf8ee5f7f56631114eb98303cd80e4a48 (diff)
Add model-specific tweaks for some funky 945GM boards.
For the Aopen Mini-PC, ignore the claimed attached 800x600 LVDS panel. Likewise for the Apple Mac Mini, but done slightly differently since it shares PCI IDs with the Macbook Pro.
-rw-r--r--src/i830_driver.c35
1 files changed, 24 insertions, 11 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 8464b39f..75ea480c 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1231,7 +1231,7 @@ I830BIOSPreInit(ScrnInfoPtr pScrn, int flags)
int i, n;
char *s;
pointer pVBEModule = NULL;
- Bool enable, has_lvds;
+ Bool enable, has_lvds, is_apple_945gm = FALSE;
const char *chipname;
unsigned int ver;
char v[5];
@@ -1672,16 +1672,15 @@ I830BIOSPreInit(ScrnInfoPtr pScrn, int flags)
if (!i830GetLVDSInfoFromBIOS(pScrn))
has_lvds = FALSE;
- /* If the panel sequencing, status, and control registers are all zero,
- * assume there's no panel attached. This is the case on the Mac mini,
- * which is an i945GM but has no LVDS. If we tried to power something on
- * with zeroed panel sequencing registers, it probably wouldn't be a good
- * thing anyway.
- */
- if (INREG(PP_STATUS) == 0 && INREG(PP_CONTROL) == 0 &&
- INREG(LVDSPP_ON) == 0 && INREG(LVDSPP_OFF) == 0)
- {
- has_lvds = FALSE;
+ /* Blacklist machines with known broken BIOSes */
+ if (pI830->PciInfo->chipType == PCI_CHIP_I945_GM) {
+ if ((pI830->PciInfo->subsysVendor == 0xa0a0) &&
+ (pI830->PciInfo->subsysCard == 0x0589)) /* aopen mini pc */
+ has_lvds = FALSE;
+
+ if ((pI830->PciInfo->subsysVendor == 0x8086) &&
+ (pI830->PciInfo->subsysCard == 0x7270)) /* mini, macbook pro... */
+ is_apple_945gm = TRUE;
}
if ((s = xf86GetOptValString(pI830->Options, OPTION_MONITOR_LAYOUT)) &&
@@ -1772,6 +1771,20 @@ I830BIOSPreInit(ScrnInfoPtr pScrn, int flags)
pI830->specifiedMonitor = TRUE;
} else if (I830IsPrimary(pScrn)) {
/* Choose a default set of outputs to use based on what we've detected. */
+
+ /*
+ * Apple hardware is out to get us. The macbook pro has a real LVDS
+ * panel, but the mac mini does not, and they have the same device IDs.
+ * We'll distinguish by panel size, on the assumption that Apple isn't
+ * about to make any machines with an 800x600 display.
+ */
+ if (is_apple_945gm && pI830->PanelXRes == 800 && pI830->PanelYRes == 600)
+ {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Suspected Mac Mini, ignoring the LFP\n");
+ has_lvds = FALSE;
+ }
+
if (has_lvds) {
pI830->MonType2 |= PIPE_LFP;
}