diff options
author | Roland Mainz <roland.mainz@nrubsig.org> | 2004-12-15 09:35:23 +0000 |
---|---|---|
committer | Roland Mainz <roland.mainz@nrubsig.org> | 2004-12-15 09:35:23 +0000 |
commit | 235ff9f8c20d93b22b11cc378f7e53f20a058038 (patch) | |
tree | e9ae8dbeaba5b30c57fd04b60a6c8475cc5e1a98 /src/i810_driver.c | |
parent | 9e8e19c6fde15fe5b9bb7532316dedeeca54b8d9 (diff) |
Bug #1944 (https://bugs.freedesktop.org/show_bug.cgi?id=1944)XORG-6_8_1_901
attachment #1403 (https://bugs.freedesktop.org/attachment.cgi?id=1403):
Various I8xx driver fixes, including:
- 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 8b09243d..b87ca6e9 100644 --- a/src/i810_driver.c +++ b/src/i810_driver.c @@ -1124,14 +1124,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; } @@ -1159,7 +1151,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; @@ -2074,6 +2066,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 */ |