? Makefile
? cobfixes.diff
? savage.4.html
? savage._man
? streams_cleanup.diff
? streams_cleanup_big-v2.diff
? streams_cleanup_big-v3.diff
? streams_cleanup_big.diff
Index: savage_driver.c
===================================================================
RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_driver.c,v
retrieving revision 1.16
diff -u -r1.16 savage_driver.c
--- savage_driver.c	20 Mar 2004 17:51:23 -0000	1.16
+++ savage_driver.c	21 Mar 2004 22:20:03 -0000
@@ -775,7 +775,6 @@
     char *s = NULL;
     unsigned char config1, m, n, n1, n2, sr8, cr66 = 0, tmp;
     int mclk;
-    int endfb;
     vgaHWPtr hwp;
     int vgaCRIndex, vgaCRReg;
     pointer ddc;
@@ -1263,58 +1262,6 @@
 	psav->videoRambytes = pScrn->videoRam * 1024;
     }
 
-#if 0 /* Tim's code */
-    /*
-     * If we're running with acceleration, compute the command overflow 
-     * buffer location.  The command overflow buffer must END at a
-     * 4MB boundary; for all practical purposes, that means the very
-     * end of the frame buffer.
-     */
-
-    if( psav->NoAccel ) {
-	psav->CursorKByte = pScrn->videoRam - 4;
-	psav->cobIndex = 0;
-	psav->cobSize = 0;
-	psav->cobOffset = psav->videoRambytes;
-    }
-    else if( ((S3_SAVAGE4_SERIES(psav->Chipset)) ||
-             (S3_SUPERSAVAGE == psav->Chipset)) && psav->disableCOB ) {
-	/*
-	 * The Savage4 and ProSavage have COB coherency bugs which render 
-	 * the buffer useless.  COB seems to make the SuperSavage slower.
-         * We disable it.
-	 */
-	psav->CursorKByte = pScrn->videoRam - 4;
-	psav->cobIndex = 2;
-	psav->cobSize = 0x8000 << psav->cobIndex;
-	psav->cobOffset = psav->videoRambytes;
-    }
-    else
-    {
-	/* We use 128kB for the COB on all other chips. */
-
-	psav->cobSize = 1 << 17;
-	if (psav->Chipset == S3_SUPERSAVAGE) {
-	    psav->cobIndex = 2;
-	}
-	else {
-	    psav->cobIndex = 7;
-	}
-	psav->cobOffset = psav->videoRambytes - psav->cobSize;
-    }
-
-    /* 
-     * We place the cursor in high memory, just before the command overflow
-     * buffer.  The cursor must be aligned on a 4k boundary.
-     */
-
-    psav->CursorKByte = (psav->cobOffset >> 10)  - 4;
-
-#endif
-
-#if 1 /* S3's code */
-    /* reserved 128K for HWICON and DSTN buffer */
-    endfb = psav->videoRambytes - 0x20000 - 1;
     
     /*
      * If we're running with acceleration, compute the command overflow
@@ -1325,22 +1272,22 @@
     if (psav->NoAccel) {
         psav->cobIndex = 0;
         psav->cobSize = 0;
-        psav->cobOffset = endfb;
-    }
+    } 
     else if( ((S3_SAVAGE4_SERIES(psav->Chipset)) ||
              (S3_SUPERSAVAGE == psav->Chipset)) && psav->disableCOB ) {
         /*
          * The Savage4 and ProSavage have COB coherency bugs which render 
          * the buffer useless.
          */
+	/*
         psav->cobIndex = 2;
         psav->cobSize = 0x8000 << psav->cobIndex;
-        psav->cobOffset = endfb - psav->cobSize;
-    }
-    else {
+	*/
+        psav->cobIndex = 0;
+        psav->cobSize = 0;
+    } else {
         /* We use 128kB for the COB on all other chips. */        
         psav->cobSize = 0x20000;
-        /*psav->cobIndex = 7;*/
 	if (psav->Chipset == S3_SUPERSAVAGE  ||
 	    psav->Chipset == S3_PROSAVAGE    ||
 	    psav->Chipset == S3_TWISTER      ||
@@ -1350,19 +1297,14 @@
 	} else {
 	    psav->cobIndex = 7;
 	}
-        psav->cobOffset = endfb - psav->cobSize;
     }
              
     /* align cob to 128k */
-    psav->cobOffset = ((endfb - psav->cobSize + 1) + 0x20000) & ~0x20000;
-    endfb = psav->cobOffset - 1;
+    psav->cobOffset = (psav->videoRambytes - psav->cobSize) & ~0x1ffff;
     
     /* The cursor must be aligned on a 4k boundary. */
-    psav->CursorKByte = (endfb >> 10) - 4;
-    endfb = (psav->CursorKByte << 10) - 1;
-    psav->endfb = endfb;
-
-#endif
+    psav->CursorKByte = (psav->cobOffset >> 10) - 4;
+    psav->endfb = (psav->CursorKByte << 10) - 1;
 
     /* reset graphics engine to avoid memory corruption */
     VGAOUT8(vgaCRIndex, 0x66);
