Merge branch 'modesetting-origin' into modesetting

This commit is contained in:
Keith Packard 2006-09-19 16:03:04 -07:00
commit d9db5ec686
7 changed files with 29 additions and 16 deletions

View File

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

View File

@ -31,7 +31,6 @@
#define _PARSE_EDID_
#include "xf86.h"
#include "xf86_ansic.h"
#include "i830.h"
#include "i830_bios.h"
#include "edid.h"

View File

@ -30,7 +30,6 @@
#endif
#include "xf86.h"
#include "xf86_ansic.h"
#include "i830.h"
#include "i830_debug.h"

View File

@ -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"

View File

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

View File

@ -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"

View File

@ -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"