diff options
author | Eric Anholt <eric@anholt.net> | 2007-02-23 14:17:07 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-02-23 14:17:07 -0800 |
commit | 54198b26e87baa180208932b97f10b27d9c0fddc (patch) | |
tree | 4c50691591a016c5269d12abca6dc365d8a722d6 /src/i830_dri.c | |
parent | 828deff6453872ef0f9fa35c08c9f95f464b1785 (diff) |
Move memory allocation to ScreenInit rather than PreInit.
This lets us do memory allocation just once rather than having several passes
(as long as things succeed), avoids trouble with zaphod mode, and will let us
do better automatic sizing of allocations soon.
Diffstat (limited to 'src/i830_dri.c')
-rw-r--r-- | src/i830_dri.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c index 9e3f3786..9ea86aea 100644 --- a/src/i830_dri.c +++ b/src/i830_dri.c @@ -158,9 +158,9 @@ I830InitDma(ScrnInfoPtr pScrn) info.depth_offset = pI830->depth_buffer->offset; info.w = pScrn->virtualX; info.h = pScrn->virtualY; - info.pitch = pI830->displayWidth; - info.back_pitch = pI830->displayWidth; - info.depth_pitch = pI830->displayWidth; + info.pitch = pScrn->displayWidth; + info.back_pitch = pScrn->displayWidth; + info.depth_pitch = pScrn->displayWidth; info.cpp = pI830->cpp; if (drmCommandWrite(pI830->drmSubFD, DRM_I830_INIT, @@ -1452,7 +1452,7 @@ I830UpdateDRIBuffers(ScrnInfoPtr pScrn, drmI830Sarea *sarea) /* Don't use front_buffer->size here as it includes the pixmap cache area * Instead, calculate the entire framebuffer. */ - sarea->front_size = pI830->displayWidth * pScrn->virtualY * pI830->cpp; + sarea->front_size = pScrn->displayWidth * pScrn->virtualY * pI830->cpp; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] init sarea width,height = %d x %d (pitch %d)\n", @@ -1477,7 +1477,7 @@ I830UpdateDRIBuffers(ScrnInfoPtr pScrn, drmI830Sarea *sarea) sarea->rotation = 0; sarea->rotated_offset = -1; sarea->rotated_size = 0; - sarea->rotated_pitch = pI830->displayWidth; + sarea->rotated_pitch = pScrn->displayWidth; success = I830DRIMapScreenRegions(pScrn, sarea); |