[PATCH xf86-video-mga 3/4] Convert most HAVE_XAA_H conditional compilation labels to USE_XAA

Kevin Brace kevinbrace at gmx.com
Mon Nov 26 19:15:33 UTC 2018


Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
---
 src/mga.h        |  2 +-
 src/mga_dga.c    |  8 ++++----
 src/mga_driver.c |  4 ++--
 src/mga_storm.c  | 28 ++++++++++++++--------------
 src/mga_video.c  |  4 ++--
 5 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/src/mga.h b/src/mga.h
index bfb43b8..f47b0af 100644
--- a/src/mga.h
+++ b/src/mga.h
@@ -559,7 +559,7 @@ typedef struct {
     CARD32		MAccess;
     int			FifoSize;
     int			StyleLen;
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
     XAAInfoRecPtr	AccelInfoRec;
 #endif
     xf86CursorInfoPtr	CursorInfoRec;
diff --git a/src/mga_dga.c b/src/mga_dga.c
index ef03688..66e6a09 100644
--- a/src/mga_dga.c
+++ b/src/mga_dga.c
@@ -15,7 +15,7 @@ static Bool MGA_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **,
 static Bool MGA_SetMode(ScrnInfoPtr, DGAModePtr);
 static int  MGA_GetViewport(ScrnInfoPtr);
 static void MGA_SetViewport(ScrnInfoPtr, int, int, int);
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
 static void MGA_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long);
 static void MGA_BlitRect(ScrnInfoPtr, int, int, int, int, int, int);
 static void MGA_BlitTransRect(ScrnInfoPtr, int, int, int, int, int, int, 
@@ -30,7 +30,7 @@ DGAFunctionRec MGA_DGAFuncs = {
    MGA_SetViewport,
    MGA_GetViewport,
    MGAStormSync,
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
    MGA_FillRect,
    MGA_BlitRect,
    MGA_BlitTransRect
@@ -124,7 +124,7 @@ SECOND_PASS:
 	    mode->flags = DGA_CONCURRENT_ACCESS;
             if(pixmap)
 		mode->flags |= DGA_PIXMAP_AVAILABLE;
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
 	    if(!pMga->NoAccel) {
 		mode->flags |= DGA_FILL_RECT | DGA_BLIT_RECT;
 		if((Bpp != 3) && (pMga->Chipset != PCI_CHIP_MGA2064))
@@ -365,7 +365,7 @@ MGA_SetViewport(
    pMga->DGAViewportStatus = 0;  /* MGAAdjustFrame loops until finished */
 }
 
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
 static void 
 MGA_FillRect (
    ScrnInfoPtr pScrn, 
diff --git a/src/mga_driver.c b/src/mga_driver.c
index 441600a..94183db 100644
--- a/src/mga_driver.c
+++ b/src/mga_driver.c
@@ -1969,7 +1969,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
 	pMga->NoAccel = FALSE;
 	pMga->Exa = FALSE;
 #ifdef USE_EXA
-#ifndef HAVE_XAA_H
+#ifndef USE_XAA
 	pMga->Exa = TRUE;
 #endif
 	if (!xf86NameCmp(s, "EXA")) {
@@ -3148,7 +3148,7 @@ MGACrtc2FillStrip(ScrnInfoPtr pScrn)
 	    (pScrn->bitsPerPixel >> 3) * pScrn->displayWidth * pScrn->virtualY);
     } else {
 	xf86SetLastScrnFlag(pScrn->entityList[0], pScrn->scrnIndex);
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
 	pMga->RestoreAccelState(pScrn);
 	pMga->SetupForSolidFill(pScrn, 0, GXcopy, 0xFFFFFFFF);
 	pMga->SubsequentSolidFillRect(pScrn, pScrn->virtualX, 0,
diff --git a/src/mga_storm.c b/src/mga_storm.c
index 28349c2..08dfa20 100644
--- a/src/mga_storm.c
+++ b/src/mga_storm.c
@@ -57,7 +57,7 @@ do { \
   XAAMoveDWORDS((d),(s),(c)); \
 } while (0)
 
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
 static void mgaSetupForSolidFill( ScrnInfoPtr pScrn, int color,
     int rop, unsigned int planemask );
 
@@ -572,29 +572,29 @@ MGASubsequentCPUToScreenTexture (
 
 Bool mgaAccelInit( ScreenPtr pScreen )
 {
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
     XAAInfoRecPtr infoPtr;
 #endif
     ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
     MGAPtr pMga = MGAPTR(pScrn);
 //  int maxFastBlitMem, maxlines;
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
     int maxFastBlitMem;
-#endif /* HAVE_XAA_H */
+#endif /* USE_XAA */
     int maxlines;
 
-#if defined(HAVE_XAA_H) && defined(RENDER)
+#if defined(USE_XAA) && defined(RENDER)
     Bool doRender = FALSE;
-#endif /* defined(HAVE_XAA_H) && defined(RENDER) */
+#endif /* defined(USE_XAA) && defined(RENDER) */
     BoxRec AvailFBArea;
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
     int i;
-#endif /* HAVE_XAA_H */
+#endif /* USE_XAA */
 
     pMga->ScratchBuffer = malloc(((pScrn->displayWidth * pMga->CurrentLayout.bitsPerPixel) + 127) >> 3);
     if(!pMga->ScratchBuffer) return FALSE;
 
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
     pMga->AccelInfoRec = infoPtr = XAACreateInfoRec();
     if(!infoPtr) return FALSE;
 #endif
@@ -630,7 +630,7 @@ Bool mgaAccelInit( ScreenPtr pScreen )
 	pMga->AtypeNoBLK = MGAAtypeNoBLK;
     }
 
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
     /* fill out infoPtr here */
     infoPtr->Flags = 	PIXMAP_CACHE |
 			OFFSCREEN_PIXMAPS |
@@ -937,7 +937,7 @@ Bool mgaAccelInit( ScreenPtr pScreen )
 
     }
 
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
     for (i = 0; i < pScrn->numEntities; i++) {
 	if (xf86IsEntityShared(pScrn->entityList[i])) {
 	    infoPtr->RestoreAccelState = mgaRestoreAccelState;
@@ -976,7 +976,7 @@ Bool mgaAccelInit( ScreenPtr pScreen )
 }
 
 
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
 /* Support for multiscreen */
 static void mgaRestoreAccelState(ScrnInfoPtr pScrn)
 {
@@ -1105,7 +1105,7 @@ void MGAStormEngineInit( ScrnInfoPtr pScrn )
     opmode &= ~0x30000;
 #endif
 
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
     pMga->SetupForSolidFill = mgaSetupForSolidFill;
     pMga->SubsequentSolidFillRect = mgaSubsequentSolidFillRect;
     pMga->RestoreAccelState = mgaRestoreAccelState;
@@ -1184,7 +1184,7 @@ void MGAStormEngineInit( ScrnInfoPtr pScrn )
 }
 
 
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
 static void
 MGASetClippingRectangle(
    ScrnInfoPtr pScrn,
diff --git a/src/mga_video.c b/src/mga_video.c
index 8d77af8..d703e48 100644
--- a/src/mga_video.c
+++ b/src/mga_video.c
@@ -2005,7 +2005,7 @@ MGAPutImageILOAD(
 			      clipBoxes, width, height))
 	return Success;
 
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
     if( pMga->AccelInfoRec->NeedToSync && ((long)data != pPriv->lastPort) ) {
 	MGAStormSync(pScrn);
     }
@@ -2039,7 +2039,7 @@ MGAPutImageILOAD(
 	pbox++;
     }
 
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
     pMga->AccelInfoRec->NeedToSync = TRUE;
 #endif
     pPriv->videoStatus = FREE_TIMER;
-- 
2.7.4



More information about the xorg-devel mailing list