diff options
author | Jordan Crouse <jordan.crouse@amd.com> | 2006-12-14 17:28:48 -0700 |
---|---|---|
committer | Jordan Crouse <jordan.crouse@amd.com> | 2006-12-14 17:34:10 -0700 |
commit | d901348441642fadbd71ed2e37e74b3b2a7af97c (patch) | |
tree | 2e8fcff96617844469cf92919b7f9daf70c0af3a /src/amd_gx_driver.c | |
parent | 73dc69c6597d5f0f6023c067f7b1c2d7709b604b (diff) |
Fix the memory mapping so its more sane, and disable XAA pixmap caches
during rotation.
Diffstat (limited to 'src/amd_gx_driver.c')
-rw-r--r-- | src/amd_gx_driver.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/amd_gx_driver.c b/src/amd_gx_driver.c index 99ff264..7548fc7 100644 --- a/src/amd_gx_driver.c +++ b/src/amd_gx_driver.c @@ -308,7 +308,9 @@ GXAllocateMemory(ScreenPtr pScrn, ScrnInfoPtr pScrni, int rotate) } } - /* Set the memory available for the offscreen pixmaps */ + /* XAA always exists - we can't remove it on demand like we can with EXA. + So we assume the worse, and only give XAA enough offspace room to + account for any eventuality that RandR might throw at us. */ if (!pGeode->NoAccel) { @@ -319,9 +321,6 @@ GXAllocateMemory(ScreenPtr pScrn, ScrnInfoPtr pScrni, int rotate) pExa->memorySize = fboffset + fbavail; } - /* XXX - We don't use XAA if we are rotated, so this should be fine. Changing the - * resolution will hurt us though */ - if (!pGeode->useEXA) { if (!xf86FBManagerRunning(pScrn)) { @@ -331,15 +330,10 @@ GXAllocateMemory(ScreenPtr pScrn, ScrnInfoPtr pScrni, int rotate) RegionRec OffscreenRegion; BoxRec AvailBox; - /* We only get one shot at allocating offscreen memory for XAA */ - /* That means if the mode changes with RandR, we'll probably be out of luck. - * we can compensate for rotation by offsetting the start of offscreen memory to account - * for the shadow framebuffer even if we're not using it right now - */ + /* Assume the shadow FB exists even if it doesnt */ if (pGeode->shadowSize == 0) { size = (pScrn->width * bytpp) * pScrni->virtualX; - offset += size; avail -= size; } @@ -709,9 +703,6 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) else pScrni->videoRam = pGeode->pEnt->device->videoRam; - if (!GXMapMem(pScrni)) - return FALSE; - pGeode->maxWidth = GX_MAX_WIDTH; pGeode->maxHeight = GX_MAX_HEIGHT; @@ -1076,6 +1067,9 @@ GXEnterGraphics(ScreenPtr pScrn, ScrnInfoPtr pScrni) { GeodeRec *pGeode = GEODEPTR(pScrni); + if (!GXMapMem(pScrni)) + return FALSE; + gfx_wait_until_idle(); /* Save off the current state (should this be somewhere else)? */ |