diff options
author | Egbert Eich <eich@suse.de> | 2004-10-12 19:13:43 +0000 |
---|---|---|
committer | Egbert Eich <eich@suse.de> | 2004-10-12 19:13:43 +0000 |
commit | 88714c3b2274fcfe50837631b1d38a7cd96f692a (patch) | |
tree | d15880c65861585183b0c5cfd3e903085c20174f /src/i810_driver.c | |
parent | 687298daed40aaade44e61342a9abe984088541b (diff) |
Change order of SetDisplayDevice(), HWRestore(), UnbindGART() and
RestoreBIOSMemSize() to be exactly opposite to the Save procedure in EnterVT()
(Matthias Hopf, Alan Hourihane).
Fixed server crash on reset when a structure allocated in PreInit() was freed on
CloseScreen().
Fixed ring buffer lock ups that happened because the structure that contained
ringbuffer data was not zeroed after allocation.
Fixed numerous warnings due to signed unsigned comparisons.
Diffstat (limited to 'src/i810_driver.c')
-rw-r--r-- | src/i810_driver.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/i810_driver.c b/src/i810_driver.c index 153ed552..47aa05ea 100644 --- a/src/i810_driver.c +++ b/src/i810_driver.c @@ -1127,14 +1127,6 @@ I810PreInit(ScrnInfoPtr pScrn, int flags) xf86SetOperatingState(resVgaIo, pI810->pEnt->index, ResUnusedOpr); xf86SetOperatingState(resVgaMem, pI810->pEnt->index, ResDisableOpr); - pI810->LpRing = xalloc(sizeof(I810RingBuffer)); - if (!pI810->LpRing) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Could not allocate lpring data structure.\n"); - I810FreeRec(pScrn); - return FALSE; - } - return TRUE; } @@ -1162,7 +1154,7 @@ static Bool I810MapMem(ScrnInfoPtr pScrn) { I810Ptr pI810 = I810PTR(pScrn); - unsigned i; + long i; for (i = 2; i < pI810->FbMapSize; i <<= 1) ; pI810->FbMapSize = i; @@ -2077,6 +2069,13 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) pI810 = I810PTR(pScrn); hwp = VGAHWPTR(pScrn); + pI810->LpRing = xcalloc(sizeof(I810RingBuffer),1); + if (!pI810->LpRing) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Could not allocate lpring data structure.\n"); + return FALSE; + } + miClearVisualTypes(); /* Re-implemented Direct Color support, -jens */ |