xf86-video-intel: src/i830_driver.c

Alan Hourihane alanh at kemper.freedesktop.org
Mon Jun 12 14:17:17 EEST 2006


 src/i830_driver.c |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 deletions(-)

New commits:
diff-tree f02268b2091c9a785d26e82bcb35a8b713463072 (from 672c3d18dbb405095e465126053ff887d891409e)
Author: Alan Hourihane <alanh at fairlite.demon.co.uk>
Date:   Mon Jun 12 12:16:58 2006 +0100

    Don't rely on register check to find out
    if we're resuming - it's not reliable.
    
    But then, neither is the BIOS, but it's
    the best we can hope for until Eric's work
    is complete.
    
    Try setting another mode to cater for some
    broken BIOS' too.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 062d035..2d02c48 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -952,7 +952,28 @@ I830Set640x480(ScrnInfoPtr pScrn)
 	 break;
    }
    m |= (1 << 15) | (1 << 14);
-   return VBESetVBEMode(pI830->pVbe, m, NULL);
+   if (VBESetVBEMode(pI830->pVbe, m, NULL))
+	   return TRUE;
+
+   /* if the first failed, let's try the next - usually 800x600 */
+   m = 0x31;
+
+   switch (pScrn->depth) {
+   case 15:
+	 m = 0x42;
+	 break;
+   case 16:
+	 m = 0x43;
+	 break;
+   case 24:
+	 m = 0x51;
+	 break;
+   }
+   m |= (1 << 15) | (1 << 14);
+   if (VBESetVBEMode(pI830->pVbe, m, NULL))
+	   return TRUE;
+
+   return FALSE;
 }
 
 /* This is needed for SetDisplayDevices to work correctly on I915G.
@@ -5535,9 +5556,7 @@ I830BIOSEnterVT(int scrnIndex, int flags
       * the Video BIOS with our saved devices, and only when that fails,
       * we'll warm boot it.
       */
-     /* Check Pipe conf registers or possibly HTOTAL/VTOTAL for 0x00000000)*/
-      CARD32 temp = pI830->pipe ? INREG(PIPEBCONF) : INREG(PIPEACONF);
-      if (!I830Set640x480(pScrn) || !(temp & 0x80000000)) {
+      if (!I830Set640x480(pScrn)) {
          xf86Int10InfoPtr pInt;
 
          xf86DrvMsg(pScrn->scrnIndex, X_INFO, 



More information about the xorg-commit mailing list