xf86-video-intel: Branch 'modesetting' - src/i830_driver.c

Eric Anholt anholt at kemper.freedesktop.org
Wed Jun 28 00:45:59 EEST 2006


 src/i830_driver.c |   12 ++++++++++++
 1 files changed, 12 insertions(+)

New commits:
diff-tree 9fbd3d8f4befb75ed6f6bd9a9ffe0175626e8785 (from 56f7aedd0ad1f5645a90a5509b1263ec6b7b7ee1)
Author: Eric Anholt <anholt at FreeBSD.org>
Date:   Tue Jun 27 23:31:40 2006 +0200

    If the panel power registers are all zeroes on Mobile parts, disable LVDS.
    
    This is the case on the Mac mini, which is an i945GM but has no LVDS attached.
    Powering on with the power timing registers zeroed would probably be a bad idea,
    even if there was a panel attached.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 6b7dfc7..ca87951 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1701,6 +1701,18 @@ I830BIOSPreInit(ScrnInfoPtr pScrn, int f
    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;
+   }
+
    if ((s = xf86GetOptValString(pI830->Options, OPTION_MONITOR_LAYOUT)) &&
       I830IsPrimary(pScrn)) {
       char *Mon1;



More information about the xorg-commit mailing list