diff options
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c')
-rw-r--r-- | xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c index 58e49d1cf..1e590d546 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c,v 1.13 2000/12/15 15:19:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c,v 1.11 2000/12/01 14:29:00 dawes Exp $ */ #include "xf86.h" @@ -11,13 +11,19 @@ /* Memory layout of card is as follows: - 000000-003fff: Cursor - 001000-xxxxxx: Fifo (Min of CMDFIFO pages) - xxxxxx-420fff: Texture maps - 421000- A-1 : Framebuffer - A - B-1 : Offscreen pixmaps - B - C-1 : Back buffer - C - D-1 : Z buffer + 000000-00ffff: VGA memory + 010000-013fff: Cursor + 011000-xxxxxx: Fifo (Min of CMDFIFO pages) + xxxxxx- A-1 : Front Buffer (framebuffer) + A - B-1 : Pixmap Cache (framebuffer) + B - C-1 : Texture Memory + C - D-1 : Back Buffer + D - E-1 : Depth Buffer + + NB: pixmap cache usually butts right up against texture memory. when + 3d is disabled (via Transition2D) then the pixmap cache is increased + to overlap the texture memory. maximum pixmap cache of 4095 lines on + voodoo5 and 2048 on voodoo3/4 applies. */ void TDFXSendNOPFifo3D(ScrnInfoPtr pScrn) @@ -117,9 +123,9 @@ void TDFXResetFifo(ScrnInfoPtr pScrn) static void TDFXSyncFifo(ScrnInfoPtr pScrn) { TDFXPtr pTDFX; - int i, cnt; + int i, cnt, resets=0; int stat; - long start_sec, end_sec, dummy; + long start_sec, end_sec, dummy, readptr; TDFXTRACEACCEL("TDFXSyncFifo start\n"); pTDFX=TDFXPTR(pScrn); @@ -127,7 +133,9 @@ static void TDFXSyncFifo(ScrnInfoPtr pScrn) i=0; cnt=0; start_sec=0; + readptr=TDFXReadLongMMIO(pTDFX, SST_FIFO_RDPTRL0); do { + readptr=TDFXReadLongMMIO(pTDFX, SST_FIFO_RDPTRL0); stat=TDFXReadLongMMIO(pTDFX, 0); if (stat&SST_BUSY) i=0; else i++; cnt++; @@ -137,7 +145,17 @@ static void TDFXSyncFifo(ScrnInfoPtr pScrn) } else { getsecs(&end_sec, &dummy); if (end_sec-start_sec>3) { - TDFXResetFifo(pScrn); + dummy=TDFXReadLongMMIO(pTDFX, SST_FIFO_RDPTRL0); + if (dummy==readptr) { + TDFXResetFifo(pScrn); + readptr=dummy; + resets++; + if (resets==3) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Board is not responding.\n"); + return; + } + } start_sec=0; } } @@ -237,24 +255,6 @@ void TDFXSwapContextFifo(ScreenPtr pScreen) pTDFX->fifoSlots = pTDFX->fifoEnd-pTDFX->fifoPtr-8; } -void TDFXLostContext(ScreenPtr pScreen) -{ - ScrnInfoPtr pScrn; - TDFXPtr pTDFX; - TDFXSAREAPriv *sPriv; - - pScrn = xf86Screens[pScreen->myNum]; - pTDFX=TDFXPTR(pScrn); - sPriv=(TDFXSAREAPriv*)DRIGetSAREAPrivate(pScreen); - if (!sPriv) return; - if (sPriv->fifoPtr!=(((unsigned char*)pTDFX->fifoPtr)-pTDFX->FbBase) || - sPriv->fifoRead!=(((unsigned char*)pTDFX->fifoRead)-pTDFX->FbBase)) { - sPriv->fifoPtr=(((unsigned char*)pTDFX->fifoPtr)-pTDFX->FbBase); - sPriv->fifoRead=(((unsigned char*)pTDFX->fifoRead)-pTDFX->FbBase); - sPriv->fifoOwner=DRIGetContext(pScreen); - /* ErrorF("Out FifoPtr=%d FifoRead=%d\n", sPriv->fifoPtr, sPriv->fifoRead); */ - } -} #endif static void |