[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force XFree86 SVN commit: r1129 - in trunk/debian: . patches



Author: branden
Date: 2004-03-04 09:02:06 -0500 (Thu, 04 Mar 2004)
New Revision: 1129

Modified:
   trunk/debian/TODO
   trunk/debian/changelog
   trunk/debian/patches/000_stolen_from_HEAD_i830_driver.diff
Log:
Grab from upstream CVS HEAD some fixes to the i810 driver's i830 support.
+ Update manpage to clarify that XVideo is only enabled by default when
  the configurations supports it.  (David Dawes)
+ Add a "VBERestore" option for the i830 part of the i810 driver, to
  allow the VBE restore bug workaround to be disabled.  This is needed
  for correct text mode restoration on some 830M-based machines
  (David Dawes, reported by Martin van Es).
+ Turn off the GetDisplayInfo BIOS call by default and add an option
  to turn it back on in the i810 driver. This fixes some lockup
  problems found with some Dell BIOS' (Alan Hourihane, Alain Poirier).
  (Closes: #226430)


Modified: trunk/debian/TODO
===================================================================
--- trunk/debian/TODO	2004-03-04 13:52:42 UTC (rev 1128)
+++ trunk/debian/TODO	2004-03-04 14:02:06 UTC (rev 1129)
@@ -1,9 +1,5 @@
 To-Do List
 
-4.3.0-4
-=======
-* Fix 235156,235671: xserver-xfree86: i865: Cannot shmat() low memory.
-
 Post 4.3.0-1
 ============
 * Re-do migration of /usr/X11R6/lib/X11/{app-defaults,xkb}:

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2004-03-04 13:52:42 UTC (rev 1128)
+++ trunk/debian/changelog	2004-03-04 14:02:06 UTC (rev 1129)
@@ -35,8 +35,21 @@
     interpreters).  (Closes: #235687)
     - debian/shell-lib.sh
 
- -- Branden Robinson <branden@debian.org>  Tue,  2 Mar 2004 15:02:49 -0500
+  * Grab from upstream CVS HEAD some fixes to the i810 driver's i830 support.
+      + Update manpage to clarify that XVideo is only enabled by default when
+        the configurations supports it.  (David Dawes)
+      + Add a "VBERestore" option for the i830 part of the i810 driver, to
+        allow the VBE restore bug workaround to be disabled.  This is needed
+        for correct text mode restoration on some 830M-based machines
+        (David Dawes, reported by Martin van Es).
+      + Turn off the GetDisplayInfo BIOS call by default and add an option
+        to turn it back on in the i810 driver. This fixes some lockup
+        problems found with some Dell BIOS' (Alan Hourihane, Alain Poirier).
+        (Closes: #226430)
+    - debian/patches/000_stolen_from_HEAD_i830_driver.diff
 
+ -- Branden Robinson <branden@debian.org>  Thu,  4 Mar 2004 08:58:26 -0500
+
 xfree86 (4.3.0-3) unstable; urgency=medium
 
   * Urgency due to fix for serious bug which frustrates removal of library

Modified: trunk/debian/patches/000_stolen_from_HEAD_i830_driver.diff
===================================================================
--- trunk/debian/patches/000_stolen_from_HEAD_i830_driver.diff	2004-03-04 13:52:42 UTC (rev 1128)
+++ trunk/debian/patches/000_stolen_from_HEAD_i830_driver.diff	2004-03-04 14:02:06 UTC (rev 1129)
@@ -17,14 +17,40 @@
         * Fixed calculation of video overlay memory size.
         * Fixed video overlay on TV out (BugzillaR #213). (Egbert Eich).
 
+xc/programs/Xserver/hw/xfree86/drivers/i810/i810.man @ 1.5
+  small update [David Dawes added clarification about XVideo only being
+  enabled by default when the configurations supports it.]
+
 xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h @ 1.11
 xc/programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c @ 1.45
    515. When the i830 driver's checks for sufficient memory for tiled mode
         fail, don't later try to allocate with tiling enabled (David Dawes).
 
-diff -urN xc.orig/programs/Xserver/hw/xfree86/drivers/i810/i830.h xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h
---- xc.orig/programs/Xserver/hw/xfree86/drivers/i810/i830.h	2003-11-15 18:12:41.000000000 +1100
-+++ xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h	2003-11-15 18:14:32.000000000 +1100
+xc/programs/Xserver/hw/xfree86/drivers/i810/i810.man @ 1.6
+xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h @ 1.12
+xc/programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c @ 1.48
+   738. Add a "VBERestore" option for the i830 part of the i810 driver, to
+        allow the VBE restore bug workaround to be disabled.  This is needed
+        for correct text mode restoration on some 830M-based machines
+        (David Dawes, reported by Martin van Es).
+
+xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h @ 1.13
+xc/programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c @ 1.50
+   811. Turn off the GetDisplayInfo BIOS call by default and add an option
+        to turn it back on in the i810 driver. This fixes some lockup
+        problems found with some Dell BIOS' (Alan Hourihane, Alain Poirier).
+
+--- xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h~	2004-03-04 08:08:59.000000000 -0500
++++ xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h	2004-03-04 08:09:15.000000000 -0500
+@@ -27,7 +27,7 @@
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ 
+ **************************************************************************/
+-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h,v 1.7.2.1 2003/10/21 02:22:38 dawes Exp $ */
++/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h,v 1.13 2004/02/20 00:06:00 alanh Exp $ */
+ 
+ /*
+  * Authors:
 @@ -147,6 +147,7 @@
     unsigned long TotalVideoRam;
     I830MemRange StolenMemory;		/* pre-allocated memory */
@@ -41,7 +67,7 @@
  
     int auxPitch;
     int auxPitchBits;
-@@ -295,6 +297,11 @@
+@@ -295,6 +297,13 @@
     Bool closing;
     Bool suspended;
  
@@ -50,10 +76,12 @@
 +   int yoffset;
 +
 +   int SaveGeneration;
++   Bool vbeRestoreWorkaround;
++   Bool displayInfo;
  } I830Rec;
  
  #define I830PTR(p) ((I830Ptr)((p)->driverPrivate))
-@@ -391,5 +398,8 @@
+@@ -391,5 +400,8 @@
  
  #define ALLOCATE_DRY_RUN		0x80000000
  
@@ -62,8 +90,45 @@
 +#define DRAM_WRITE    0x33330000
  
  #endif /* _I830_H_ */
---- xc/programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c~	2003-12-24 18:03:07.000000000 -0500
-+++ xc/programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c	2003-12-24 18:03:13.000000000 -0500
+--- xc/programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c~	2004-03-04 08:09:04.000000000 -0500
++++ xc/programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c	2004-03-04 08:09:18.000000000 -0500
+@@ -1,4 +1,4 @@
+-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c,v 1.27.2.3 2003/12/19 23:41:32 dawes Exp $ */
++/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c,v 1.51 2004/02/25 12:53:14 eich Exp $ */
+ /**************************************************************************
+ 
+ Copyright 2001 VA Linux Systems Inc., Fremont, California.
+@@ -154,7 +154,7 @@
+ #include "micmap.h"
+ 
+ #include "fb.h"
+-#include "miscstruct.h"
++#include "regionstr.h"
+ #include "xf86xv.h"
+ #include "Xv.h"
+ #include "vbe.h"
+@@ -202,8 +202,8 @@
+    OPTION_XVIDEO,
+    OPTION_VIDEO_KEY,
+    OPTION_COLOR_KEY,
+-   OPTION_STRETCH,
+-   OPTION_CENTER
++   OPTION_VBE_RESTORE,
++   OPTION_DISPLAY_INFO
+ } I830Opts;
+ 
+ static OptionInfoRec I830BIOSOptions[] = {
+@@ -215,8 +215,8 @@
+    {OPTION_XVIDEO,	"XVideo",	OPTV_BOOLEAN,	{0},	TRUE},
+    {OPTION_COLOR_KEY,	"ColorKey",	OPTV_INTEGER,	{0},	FALSE},
+    {OPTION_VIDEO_KEY,	"VideoKey",	OPTV_INTEGER,	{0},	FALSE},
+-   {OPTION_STRETCH,	"Stretch",	OPTV_BOOLEAN,	{0},	FALSE},
+-   {OPTION_CENTER,	"Center",	OPTV_BOOLEAN,	{0},	FALSE},
++   {OPTION_VBE_RESTORE,	"VBERestore",	OPTV_BOOLEAN,	{0},	FALSE},
++   {OPTION_DISPLAY_INFO,"DisplayInfo",	OPTV_BOOLEAN,	{0},	FALSE},
+    {-1,			NULL,		OPTV_NONE,	{0},	FALSE}
+ };
+ /* *INDENT-ON* */
 @@ -230,9 +230,6 @@
  static Bool I830VESASetVBEMode(ScrnInfoPtr pScrn, int mode,
  			       VbeCRTCInfoBlock *block);
@@ -74,7 +139,38 @@
  
  #ifdef I830DEBUG
  void
-@@ -1066,6 +1063,93 @@
+@@ -793,18 +790,26 @@
+    I830Ptr pI830 = I830PTR(pScrn);
+    int pipe, n;
+    DisplayType i;
+-
+-   for (i = 0; i < NumKnownDisplayTypes; i++) {
+-      if (GetDisplayInfo(pScrn, 1 << i, &pI830->displayAttached[i],
++   
++   /* This seems to lockup some Dell BIOS'. So it's on option to turn on */
++   if (pI830->displayInfo) {
++       xf86DrvMsg(pScrn->scrnIndex, X_INFO,
++		  "Broken BIOSes cause the system to hang here.\n"
++		  "\t      If you encounter this problem please add \n"
++		  "\t\t Option \"DisplayInfo\" \"FALSE\"\n"
++		  "\t      to the Device section of your XF86Config file.\n");
++      for (i = 0; i < NumKnownDisplayTypes; i++) {
++         if (GetDisplayInfo(pScrn, 1 << i, &pI830->displayAttached[i],
+ 			 &pI830->displayPresent[i],
+ 			 &pI830->displaySize[i].x2,
+ 			 &pI830->displaySize[i].y2)) {
+-	 xf86DrvMsg(pScrn->scrnIndex, X_INFO,
++	    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ 		    "Display Info: %s: attached: %s, present: %s, size: "
+ 		    "(%d,%d)\n", displayDevices[i],
+ 		    BOOLTOSTRING(pI830->displayAttached[i]),
+ 		    BOOLTOSTRING(pI830->displayPresent[i]),
+ 		    pI830->displaySize[i].x2, pI830->displaySize[i].y2);
++         }
+       }
+    }
+ 
+@@ -1066,6 +1071,93 @@
     return FALSE;
  }
  
@@ -168,7 +264,7 @@
  static void
  RestoreBIOSMemSize(ScrnInfoPtr pScrn)
  {
-@@ -1074,6 +1158,9 @@
+@@ -1074,6 +1166,9 @@
  
     DPRINTF(PFX, "RestoreBIOSMemSize\n");
  
@@ -178,7 +274,38 @@
     if (!pI830->overrideBIOSMemSize)
        return;
  
-@@ -1246,6 +1333,7 @@
+@@ -1096,7 +1191,7 @@
+ SetBIOSMemSize(ScrnInfoPtr pScrn, int newSize)
+ {
+    I830Ptr pI830 = I830PTR(pScrn);
+-   CARD32 swf1;
++   unsigned long swf1;
+    Bool mapped;
+ 
+    DPRINTF(PFX, "SetBIOSMemSize: %d kB\n", newSize / 1024);
+@@ -1112,7 +1207,7 @@
+ #endif
+ 
+    if ((IS_I830(pI830) || IS_845G(pI830)) && pI830->useSWF1) {
+-      CARD32 newSWF1;
++      unsigned long newSWF1;
+ 
+       /* Need MMIO access here. */
+       mapped = (pI830->MMIOBase != NULL);
+@@ -1125,10 +1220,10 @@
+ 	 newSWF1 = 8;
+ 
+       swf1 = INREG(SWF1);
+-      xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Before: SWF1 is 0x%08x\n", swf1);
++      xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Before: SWF1 is 0x%08lx\n", swf1);
+       swf1 &= ~0x0f;
+       swf1 |= (newSWF1 & 0x0f);
+-      xf86DrvMsg(pScrn->scrnIndex, X_INFO, "After: SWF1 is 0x%08x\n", swf1);
++      xf86DrvMsg(pScrn->scrnIndex, X_INFO, "After: SWF1 is 0x%08lx\n", swf1);
+       OUTREG(SWF1, swf1);
+       if (!mapped)
+ 	 I830UnmapMMIO(pScrn);
+@@ -1246,6 +1341,7 @@
        return FALSE;
  
     pI830 = I830PTR(pScrn);
@@ -186,9 +313,21 @@
     pI830->pEnt = pEnt;
  
     if (pI830->pEnt->location.type != BUS_PCI)
-@@ -1608,10 +1696,13 @@
+@@ -1458,7 +1554,7 @@
+    /* Sanity check: compare with what the BIOS thinks. */
+    if (pI830->vbeInfo->TotalMemory != pI830->StolenMemory.Size / 1024 / 64) {
+       xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+-		 "Detected stolen memory (%d kB) doesn't match what the BIOS"
++		 "Detected stolen memory (%ld kB) doesn't match what the BIOS"
+ 		 " reports (%d kB)\n",
+ 		 ROUND_DOWN_TO(pI830->StolenMemory.Size / 1024, 64),
+ 		 pI830->vbeInfo->TotalMemory * 64);
+@@ -1606,17 +1702,22 @@
+ 
+ 	    pI830->BIOSMemorySize = KB(pI830->vbeInfo->TotalMemory * 64);
  	    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- 		       "BIOS now sees %d kB VideoRAM\n",
+-		       "BIOS now sees %d kB VideoRAM\n",
++		       "BIOS now sees %ld kB VideoRAM\n",
  		       pI830->BIOSMemorySize / 1024);
 -	 } else {
 -	    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -204,7 +343,40 @@
  	 }
        }
     }
-@@ -1945,6 +2036,7 @@
+ 
+-   xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Pre-allocated VideoRAM: %d kByte\n",
++   pVbe = pI830->pVbe;
++
++   xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Pre-allocated VideoRAM: %ld kByte\n",
+ 	      pI830->StolenMemory.Size / 1024);
+    xf86DrvMsg(pScrn->scrnIndex, from, "VideoRAM: %d kByte\n", pScrn->videoRam);
+    pI830->TotalVideoRam = KB(pScrn->videoRam);
+@@ -1723,6 +1824,15 @@
+    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%d display pipe%s available.\n",
+ 	      pI830->availablePipes, pI830->availablePipes > 1 ? "s" : "");
+ 
++   pI830->displayInfo = TRUE;
++   from = X_DEFAULT;
++   if (!xf86ReturnOptValBool(pI830->Options, OPTION_DISPLAY_INFO, TRUE)) {
++      from = X_CONFIG;
++      pI830->displayInfo = FALSE;
++   }
++   xf86DrvMsg(pScrn->scrnIndex, from, "Display Info: %s.\n",
++	      pI830->displayInfo ? "enabled" : "disabled");
++
+    if (!I830DetectDisplayDevice(pScrn)) {
+       xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ 		 "Couldn't detect display devices.\n");
+@@ -1921,7 +2031,7 @@
+ 		  xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ 			     "Allocation with DRI tiling enabled would "
+ 			     "exceed the\n"
+-			     "\tmemory aperture size (%d kB) by %d kB.\n"
++			     "\tmemory aperture size (%ld kB) by %ld kB.\n"
+ 			     "\tReduce VideoRam amount to avoid this!\n",
+ 			     pI830->FbMapSize / 1024,
+ 			     -pI830->MemoryAperture.Size / 1024);
+@@ -1945,6 +2055,7 @@
  	  * Tiling can't be enabled.  Check if there's enough memory for DRI
  	  * without tiling.
  	  */
@@ -212,7 +384,138 @@
  	 I830ResetAllocations(pScrn, 0);
  	 if (I830Allocate2DMemory(pScrn, ALLOCATE_DRY_RUN | ALLOC_INITIAL) &&
  	     I830Allocate3DMemory(pScrn, ALLOCATE_DRY_RUN | ALLOC_NO_TILING)) {
-@@ -2593,7 +2685,7 @@
+@@ -1960,7 +2071,7 @@
+ 		  xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ 			     "Allocation with DRI enabled would "
+ 			     "exceed the\n"
+-			     "\tmemory aperture size (%d kB) by %d kB.\n"
++			     "\tmemory aperture size (%ld kB) by %ld kB.\n"
+ 			     "\tReduce VideoRam amount to avoid this!\n",
+ 			     pI830->FbMapSize / 1024,
+ 			     -pI830->MemoryAperture.Size / 1024);
+@@ -2034,6 +2145,16 @@
+    VBEFreeVBEInfo(pI830->vbeInfo);
+    vbeFree(pVbe);
+ 
++   /* Use the VBE mode restore workaround by default. */
++   pI830->vbeRestoreWorkaround = TRUE;
++   from = X_DEFAULT;
++   if (xf86ReturnOptValBool(pI830->Options, OPTION_VBE_RESTORE, FALSE)) {
++      pI830->vbeRestoreWorkaround = FALSE;
++      from = X_CONFIG;
++   }
++   xf86DrvMsg(pScrn->scrnIndex, from, "VBE Restore workaround: %s.\n",
++	      pI830->vbeRestoreWorkaround ? "enabled" : "disabled");
++      
+ #if defined(XF86DRI)
+    if (!pI830->directRenderingDisabled) {
+       if (!xf86LoadSubModule(pScrn, "shadow")) {
+@@ -2061,26 +2182,26 @@
+    /* Check first for page table errors */
+    temp = INREG(PGE_ERR);
+    if (temp != 0) {
+-      xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "PGTBL_ER is 0x%08x\n", temp);
++      xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "PGTBL_ER is 0x%08lx\n", temp);
+       errors++;
+    }
+    temp = INREG(PGETBL_CTL);
+    if (!(temp & 1)) {
+       xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+-		 "PGTBL_CTL (0x%08x) indicates GTT is disabled\n", temp);
++		 "PGTBL_CTL (0x%08lx) indicates GTT is disabled\n", temp);
+       errors++;
+    }
+    temp = INREG(LP_RING + RING_LEN);
+    if (temp & 1) {
+       xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+-		 "PRB0_CTL (0x%08x) indicates ring buffer enabled\n", temp);
++		 "PRB0_CTL (0x%08lx) indicates ring buffer enabled\n", temp);
+       errors++;
+    }
+    head = INREG(LP_RING + RING_HEAD);
+    tail = INREG(LP_RING + RING_TAIL);
+    if ((tail & I830_TAIL_MASK) != (head & I830_HEAD_MASK)) {
+       xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+-		 "PRB0_HEAD (0x%08x) and PRB0_TAIL (0x%08x) indicate "
++		 "PRB0_HEAD (0x%08lx) and PRB0_TAIL (0x%08lx) indicate "
+ 		 "ring buffer not flushed\n", head, tail);
+       errors++;
+    }
+@@ -2165,7 +2286,7 @@
+    if ((pI830->LpRing.mem.Start & I830_RING_START_MASK) !=
+        pI830->LpRing.mem.Start) {
+       xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+-		 "I830SetRingRegs: Ring buffer start (%x) violates its "
++		 "I830SetRingRegs: Ring buffer start (%lx) violates its "
+ 		 "mask (%x)\n", pI830->LpRing.mem.Start, I830_RING_START_MASK);
+    }
+    /* Don't care about the old value.  Reserved bits must be zero anyway. */
+@@ -2175,7 +2296,7 @@
+    if (((pI830->LpRing.mem.Size - 4096) & I830_RING_NR_PAGES) !=
+        pI830->LpRing.mem.Size - 4096) {
+       xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+-		 "I830SetRingRegs: Ring buffer size - 4096 (%x) violates its "
++		 "I830SetRingRegs: Ring buffer size - 4096 (%lx) violates its "
+ 		 "mask (%x)\n", pI830->LpRing.mem.Size - 4096,
+ 		 I830_RING_NR_PAGES);
+    }
+@@ -2231,10 +2352,6 @@
+    vgaHWUnlock(hwp);
+    vgaHWSave(pScrn, vgaReg, VGA_SR_FONTS);
+ 
+-#ifndef I845G_VBE_WORKAROUND
+-#define I845G_VBE_WORKAROUND 1
+-#endif
+-
+    pVesa = pI830->vesa;
+    /*
+     * This save/restore method doesn't work for 845G BIOS, or for some
+@@ -2246,7 +2363,7 @@
+     * registers, turning off the irq & breaking the kernel module
+     * behaviour.
+     */
+-   if (!I845G_VBE_WORKAROUND) {
++   if (!pI830->vbeRestoreWorkaround) {
+       CARD16 imr = INREG16(IMR);
+       CARD16 ier = INREG16(IER);
+       CARD16 hwstam = INREG16(HWSTAM);
+@@ -2442,6 +2559,22 @@
+    }
+ 
+    /*
++    * Test if the extendedRefresh BIOS function is supported.
++    */
++   if (pI830->useExtendedRefresh && !pI830->vesa->useDefaultRefresh &&
++       (mode & (1 << 11)) && data && data->data && data->block) {
++      if (!SetRefreshRate(pScrn, mode, 60)) {
++	 xf86DrvMsg(pScrn->scrnIndex, X_INFO,
++		    "BIOS call 0x5f05 not supported, "
++		    "setting refresh with VBE 3 method.\n");
++	 pI830->useExtendedRefresh = FALSE;
++	 pI830->enableDisplays = FALSE;
++	 xf86DrvMsg(pScrn->scrnIndex, X_INFO,
++		 "Not using BIOS call 0x5f64 to enable displays.\n");
++      }
++   }
++
++   /*
+     * The BIOS may not set a scanline pitch that would require more video
+     * memory than it's aware of.  We check for this later, and set it
+     * explicitly if necessary.
+@@ -2545,10 +2678,10 @@
+     * Print out the PIPEACONF and PIPEBCONF registers.
+     */
+    temp = INREG(PIPEACONF);
+-   xf86DrvMsg(pScrn->scrnIndex, X_INFO, "PIPEACONF is 0x%08x\n", temp);
++   xf86DrvMsg(pScrn->scrnIndex, X_INFO, "PIPEACONF is 0x%08lx\n", temp);
+    if (IS_MOBILE(pI830)) {
+       temp = INREG(PIPEBCONF);
+-      xf86DrvMsg(pScrn->scrnIndex, X_INFO, "PIPEBCONF is 0x%08x\n", temp);
++      xf86DrvMsg(pScrn->scrnIndex, X_INFO, "PIPEBCONF is 0x%08lx\n", temp);
+    }
+ 
+ #if PRINT_MODE_INFO
+@@ -2593,7 +2726,7 @@
        if (temp / pI830->cpp != pScrn->displayWidth) {
  	 xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
  		    "Correcting plane %c stride (%d -> %d)\n", PIPE_NAME(i),
@@ -221,7 +524,7 @@
  	 OUTREG(stridereg, pScrn->displayWidth * pI830->cpp);
  	 /* Trigger update */
  	 temp = INREG(basereg);
-@@ -2891,7 +2983,8 @@
+@@ -2891,7 +3024,8 @@
      * first, then re-initialise the VBE information.
      */
     pI830->pVbe = VBEInit(NULL, pI830->pEnt->index);
@@ -231,7 +534,7 @@
     if (!pI830->pVbe)
        return FALSE;
     pI830->vbeInfo = VBEGetVBEInfo(pI830->pVbe);
-@@ -2990,9 +3083,13 @@
+@@ -2990,9 +3124,13 @@
     if (pI830->directRenderingEnabled)
        pI830->directRenderingEnabled = I830DRIScreenInit(pScreen);
  
@@ -247,7 +550,7 @@
  
  #else
     pI830->directRenderingEnabled = FALSE;
-@@ -3026,6 +3123,9 @@
+@@ -3026,6 +3164,9 @@
     pScrn->memPhysBase = (unsigned long)pI830->FbBase;
     pScrn->fbOffset = pI830->FrontBuffer.Start;
  
@@ -257,7 +560,17 @@
     vgaHWSetMmioFuncs(hwp, pI830->MMIOBase, 0);
     vgaHWGetIOBase(hwp);
     DPRINTF(PFX, "assert( if(!vgaHWMapMem(pScrn)) )\n");
-@@ -3163,34 +3263,15 @@
+@@ -3107,9 +3248,7 @@
+       return FALSE;
+    }
+ 
+-#ifdef DPMSExtension
+    xf86DPMSInit(pScreen, I830DisplayPowerManagementSet, 0);
+-#endif
+ 
+ #ifdef I830_XV
+    /* Init video */
+@@ -3163,34 +3302,15 @@
     ScrnInfoPtr pScrn;
     I830Ptr pI830;
     vbeInfoPtr pVbe;
@@ -294,18 +607,7 @@
  }
  
  static void
-@@ -3251,6 +3332,10 @@
- #endif
- 
-    ResetState(pScrn, TRUE);
-+#ifdef XF86DRI
-+   /* NeedToSync is set TRUE in RefreshRing called from ResetState() */
-+   pI830->AccelInfoRec->NeedToSync = FALSE;
-+#endif
-    RestoreHWState(pScrn);
-    RestoreBIOSMemSize(pScrn);
-    I830UnbindGARTMemory(pScrn);
-@@ -3266,7 +3351,6 @@
+@@ -3266,7 +3386,6 @@
  {
     ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
     I830Ptr pI830 = I830PTR(pScrn);
@@ -313,7 +615,7 @@
  
     DPRINTF(PFX, "Enter VT\n");
  
-@@ -3274,14 +3358,15 @@
+@@ -3274,14 +3393,15 @@
        return FALSE;
  
     CheckInheritedState(pScrn);
@@ -332,3 +634,63 @@
        SaveHWState(pScrn);
     }
     ResetState(pScrn, FALSE);
+@@ -3347,11 +3467,6 @@
+       } while (_head != _tail);
+    }
+ 
+-#if 0
+-   OffsetFrame = !OffsetFrame;
+-   pScrn->AdjustFrame(scrnIndex, 0, 0, 0);
+-#endif
+-
+ #ifndef BINDUNBIND
+ #define BINDUNBIND 0
+ #endif
+@@ -3498,7 +3613,7 @@
+    return (*pScreen->CloseScreen) (scrnIndex, pScreen);
+ }
+ 
+-static int
++static ModeStatus
+ I830ValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
+ {
+    if (mode->Flags & V_INTERLACE) {
+Index: programs/Xserver/hw/xfree86/drivers/i810/i810.man
+===================================================================
+RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.man,v
+retrieving revision 1.3.2.1
+retrieving revision 1.6
+diff -u -u -r1.3.2.1 -r1.6
+--- programs/Xserver/hw/xfree86/drivers/i810/i810.man	21 Oct 2003 02:22:37 -0000	1.3.2.1
++++ programs/Xserver/hw/xfree86/drivers/i810/i810.man	7 Jan 2004 03:43:19 -0000	1.6
+@@ -1,4 +1,4 @@
+-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810.man,v 1.3.2.1 2003/10/21 02:22:37 dawes Exp $ 
++.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810.man,v 1.6 2004/01/07 03:43:19 dawes Exp $ 
+ .\" shorthand for double quote that works everywhere.
+ .ds q \N'34'
+ .TH I810 __drivermansuffix__ __vendorversion__
+@@ -116,6 +116,13 @@
+ .B Options
+ are supported for the 830M and later chipsets:
+ .TP
++.BI "Option \*qVBERestore\*q \*q" boolean \*q
++Enable or disable the use of VBE save/restore for saving and restoring
++the initial text mode.  This is disabled by default because it causes
++lockups on some platforms.  However, there are some cases where it must
++enabled for the correct restoration of the initial video mode.  If you are
++having a problem with that, try enabling this option.  Default: Disabled.
++.TP
+ .BI "Option \*qVideoKey\*q \*q" integer \*q
+ This is the same as the
+ .B \*qColorKey\*q
+@@ -123,8 +130,8 @@
+ other drivers.
+ .TP
+ .BI "Option \*qXVideo\*q \*q" boolean \*q
+-Disable or enable XVideo support.
+-Default: XVideo is enabled for configurations where it is supported.
++Disable or enable XVideo support.  Default: XVideo is enabled for
++configurations where it is supported.
+ 
+ 
+ .SH "SEE ALSO"



Reply to: