[PATCH xf86-video-r128] Fix build without XAA again

Connor Behan connor.behan at gmail.com
Thu Jul 26 17:32:24 PDT 2012


The addition of EXA had at least two mistakes. One was referring to
info->accel instead of info->accelOn, the other was putting some
statements into the code without preprocesor checks around them.

Signed-off-by: Connor Behan <connor.behan at gmail.com>
---
 src/r128_accel.c | 6 ++++--
 src/r128_exa.c   | 2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/r128_accel.c b/src/r128_accel.c
index 1df4eb8..31582e9 100644
--- a/src/r128_accel.c
+++ b/src/r128_accel.c
@@ -1875,7 +1875,6 @@ Bool R128AccelInit(ScreenPtr pScreen)
 {
     ScrnInfoPtr   pScrn = xf86ScreenToScrn(pScreen);
     R128InfoPtr   info  = R128PTR(pScrn);
-    XAAInfoRecPtr a;
 
 #ifdef USE_EXA
     if (info->useEXA) {
@@ -1895,15 +1894,18 @@ Bool R128AccelInit(ScreenPtr pScreen)
 	info->ExaDriver = exaDriverAlloc();
 	if (!info->ExaDriver) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Could not allocate EXA driver...\n");
-	    info->accel = FALSE;
+	    info->accelOn = FALSE;
 	}
 
 	return TRUE;
     }
 #endif
+
 #ifndef HAVE_XAA_H
     return FALSE;
 #else
+    XAAInfoRecPtr a;
+    
     if (!info->useEXA) {
         if (!xf86LoadSubModule(pScrn, "xaa")) return FALSE;
     }
diff --git a/src/r128_exa.c b/src/r128_exa.c
index 8fb8b64..b3e2406 100644
--- a/src/r128_exa.c
+++ b/src/r128_exa.c
@@ -142,6 +142,7 @@ static void Emit2DState(ScrnInfoPtr pScrn)
     if (has_src) OUTREG(R128_SRC_PITCH_OFFSET, info->state_2d.src_pitch_offset);
 }
 
+#ifdef R128DRI
 static void EmitCCE2DState(ScrnInfoPtr pScrn)
 {
     R128InfoPtr   info      = R128PTR(pScrn);
@@ -166,6 +167,7 @@ static void EmitCCE2DState(ScrnInfoPtr pScrn)
 
     ADVANCE_RING();
 }
+#endif
 
 /* EXA Callbacks */
 
-- 
1.7.11.1



More information about the xorg-driver-ati mailing list