diff options
author | Keith Packard <keithp@neko.keithp.com> | 2006-09-19 16:03:04 -0700 |
---|---|---|
committer | Keith Packard <keithp@neko.keithp.com> | 2006-09-19 16:03:04 -0700 |
commit | d9db5ec6866555ec13ba3ddabb1516eb45637afa (patch) | |
tree | 29832231de0bd3635639946700724b2437f264b9 | |
parent | cbaf3cf74bd420533d299c4113761ec536097e33 (diff) | |
parent | e3f4caf40708478ef327b029d0a75944c51ea905 (diff) |
Merge branch 'modesetting-origin' into modesetting
-rw-r--r-- | src/Makefile.am | 3 | ||||
-rw-r--r-- | src/i830_bios.c | 1 | ||||
-rw-r--r-- | src/i830_debug.c | 1 | ||||
-rw-r--r-- | src/i830_display.c | 3 | ||||
-rw-r--r-- | src/i830_driver.c | 35 | ||||
-rw-r--r-- | src/i830_i2c.c | 1 | ||||
-rw-r--r-- | src/i830_sdvo.c | 1 |
7 files changed, 29 insertions, 16 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 50d0ad1a..71ae2f25 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,6 +32,7 @@ i810_drv_ladir = @moduledir@/drivers i810_drv_la_SOURCES = \ common.h \ + i2c_vid.h \ i810_accel.c \ i810_common.h \ i810_cursor.c \ @@ -65,6 +66,8 @@ i810_drv_la_SOURCES = \ i830_rotate.c \ i830_randr.c \ i830_sdvo.c \ + i830_sdvo.h \ + i830_sdvo_regs.h \ i830_xf86Modes.h \ i830_xf86Modes.c if DRI diff --git a/src/i830_bios.c b/src/i830_bios.c index b68c4676..9e7e3f62 100644 --- a/src/i830_bios.c +++ b/src/i830_bios.c @@ -31,7 +31,6 @@ #define _PARSE_EDID_ #include "xf86.h" -#include "xf86_ansic.h" #include "i830.h" #include "i830_bios.h" #include "edid.h" diff --git a/src/i830_debug.c b/src/i830_debug.c index e2a28b27..a48e9f2f 100644 --- a/src/i830_debug.c +++ b/src/i830_debug.c @@ -30,7 +30,6 @@ #endif #include "xf86.h" -#include "xf86_ansic.h" #include "i830.h" #include "i830_debug.h" diff --git a/src/i830_display.c b/src/i830_display.c index 6eb2a330..2fb918a3 100644 --- a/src/i830_display.c +++ b/src/i830_display.c @@ -30,8 +30,9 @@ #include "config.h" #endif +#include <unistd.h> + #include "xf86.h" -#include "xf86_ansic.h" #include "i830.h" #include "i830_bios.h" #include "i830_display.h" 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; } diff --git a/src/i830_i2c.c b/src/i830_i2c.c index fa0ca301..cee7bb51 100644 --- a/src/i830_i2c.c +++ b/src/i830_i2c.c @@ -30,7 +30,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #endif #include "xf86.h" -#include "xf86_ansic.h" #include "xf86_OSproc.h" #include "xf86Resources.h" #include "xf86RAC.h" diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c index fe0c41a6..cbc9c6b0 100644 --- a/src/i830_sdvo.c +++ b/src/i830_sdvo.c @@ -27,7 +27,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "config.h" #endif #include "xf86.h" -#include "xf86_ansic.h" #include "xf86_OSproc.h" #include "compiler.h" #include "i830.h" |