summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-10-16 15:41:44 -0300
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-10-16 15:41:44 -0300
commitde1b633f916f4fcaaa95b226a8622d37041c86d4 (patch)
treec048ff2413f3ecf0a82fd224956a1350d0a710b5
parente020afa359434b4da06ef8509a3e504423f824d2 (diff)
Revert/modify some RandR changes to reenable XAA.
XAA was not initialized anymore in RandR patch, but it is still the default accel method. Also reenable offscreen fb manager. At least on the MSOC OEM sample (using X Server 1.4), needs some more work as EXA is crashing in a call to exaPrepareAccess() when switching to a terminal; this seems to be related to disabling exa offscreen pixmaps on the smi501.
-rw-r--r--src/smi_driver.c38
1 files changed, 36 insertions, 2 deletions
diff --git a/src/smi_driver.c b/src/smi_driver.c
index 321a8ab..4c55f41 100644
--- a/src/smi_driver.c
+++ b/src/smi_driver.c
@@ -1707,9 +1707,43 @@ SMI_ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
if(!SMI_HWInit(pScrn))
RETURN(FALSE);
+ /* Unless using EXA, regardless or using XAA or not, needs offscreen
+ * management at least for video. */
+ if (pSmi->NoAccel || !pSmi->useEXA) {
+ int numLines;
+ BoxRec AvailFBArea;
+ RegionRec AvailFBRegion;
+
+ pSmi->width = pScrn->virtualX;
+ pSmi->height = pScrn->virtualY;
+ pSmi->Stride = (pSmi->width * pSmi->Bpp + 15) & ~15;
+ numLines = pSmi->FBReserved / (pScrn->displayWidth * pSmi->Bpp);
+ AvailFBArea.x1 = 0;
+ if(pSmi->randrRotation) /* The rotated mode could need more memory */
+ AvailFBArea.y1= max(((pScrn->virtualX * pSmi->Bpp + 15) & ~15) *
+ pScrn->virtualY,
+ ((pScrn->virtualY * pSmi->Bpp + 15) & ~15) *
+ pScrn->virtualX) / (pScrn->virtualX * pSmi->Bpp);
+ else
+ AvailFBArea.y1 = pScrn->virtualY;
+ AvailFBArea.x2 = pScrn->virtualX;
+ AvailFBArea.y2 = numLines;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "FrameBuffer Box: %d,%d - %d,%d\n",
+ AvailFBArea.x1, AvailFBArea.y1, AvailFBArea.x2,
+ AvailFBArea.y2);
+ REGION_INIT(pScreen, &AvailFBRegion, &AvailFBArea, 1);
+ xf86InitFBManagerRegion(pScreen, &AvailFBRegion);
+ REGION_UNINIT(pScreen, &AvailFBRegion);
+ }
+
/* Initialize acceleration layer */
- if (!pSmi->NoAccel && pSmi->useEXA)
- SMI_EXAInit(pScreen);
+ if (!pSmi->NoAccel) {
+ if (pSmi->useEXA && !SMI_EXAInit(pScreen))
+ RETURN(FALSE);
+ else if (!pSmi->useEXA && !SMI_XAAInit(pScreen))
+ RETURN(FALSE);
+ }
/* Initialize the chosen modes */
if (!xf86SetDesiredModes(pScrn))