summaryrefslogtreecommitdiff
path: root/src/i810_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i810_driver.c')
-rw-r--r--src/i810_driver.c17
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 */