diff options
author | Dave Airlie <airlied@gmail.com> | 2012-07-15 19:41:28 +1000 |
---|---|---|
committer | Dave Airlie <airlied@gmail.com> | 2012-07-15 19:41:28 +1000 |
commit | f11a407ceb0857bb0d33811511117b490a8ae6ee (patch) | |
tree | a11bad19014270c1d7bf4f27a261f3992e4e281c /src | |
parent | fa0f3092ed38ce71ba9f65156bde306eb63feaf8 (diff) |
mga: fix after XAA removal
Fix mga build after XAA removal.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/mga.h | 7 | ||||
-rw-r--r-- | src/mga_arc.c | 2 | ||||
-rw-r--r-- | src/mga_dga.c | 13 | ||||
-rw-r--r-- | src/mga_dri.c | 2 | ||||
-rw-r--r-- | src/mga_driver.c | 10 | ||||
-rw-r--r-- | src/mga_video.c | 6 |
7 files changed, 31 insertions, 13 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 46f0265..79745d1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,7 +32,6 @@ mga_drv_la_LIBADD = $(noinst_LTLIBRARIES) mga_drv_la_SOURCES = \ binding.h \ client.h \ - mga_arc.c \ mga_bios.c \ mga_common.h \ mga_dac3026.c \ @@ -70,7 +69,8 @@ mga_drv_la_SOURCES += \ mga_exa.c endif -if USE_XAA +if XAA mga_drv_la_SOURCES += \ + mga_arc.c \ mga_storm.c endif @@ -20,7 +20,10 @@ #include <stdio.h> #include "compiler.h" +#ifdef HAVE_XAA_H #include "xaa.h" +#endif +#include "xf86fbman.h" #include "exa.h" #include "xf86Cursor.h" #include "vgaHW.h" @@ -554,7 +557,9 @@ typedef struct { CARD32 MAccess; int FifoSize; int StyleLen; +#ifdef HAVE_XAA_H XAAInfoRecPtr AccelInfoRec; +#endif xf86CursorInfoPtr CursorInfoRec; DGAModePtr DGAModes; int numDGAModes; @@ -715,7 +720,7 @@ void MGAAdjustGranularity(ScrnInfoPtr pScrn, int* x, int* y); void MGA2064SetupFuncs(ScrnInfoPtr pScrn); void MGAGSetupFuncs(ScrnInfoPtr pScrn); -/* #ifdef USE_XAA */ +/*#ifdef USE_XAA */ void MGAStormSync(ScrnInfoPtr pScrn); void MGAStormEngineInit(ScrnInfoPtr pScrn); Bool MGAStormAccelInit(ScreenPtr pScreen); diff --git a/src/mga_arc.c b/src/mga_arc.c index 5263f1f..61ade3b 100644 --- a/src/mga_arc.c +++ b/src/mga_arc.c @@ -39,8 +39,10 @@ in this Software without prior written authorization from The Open Group. #include "mizerarc.h" #include "mi.h" #include "scrnintstr.h" +#ifdef HAVE_XAA_H #include "xaa.h" #include "xaalocal.h" +#endif #include "xf86.h" #include "xf86_OSproc.h" diff --git a/src/mga_dga.c b/src/mga_dga.c index a806eb2..ef03688 100644 --- a/src/mga_dga.c +++ b/src/mga_dga.c @@ -5,8 +5,6 @@ #include "xf86.h" #include "xf86_OSproc.h" #include "xf86Pci.h" -#include "xaa.h" -#include "xaalocal.h" #include "mga.h" #include "mga_reg.h" #include "dgaproc.h" @@ -17,10 +15,12 @@ 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 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, unsigned long); +#endif static DGAFunctionRec MGA_DGAFuncs = { @@ -30,9 +30,13 @@ DGAFunctionRec MGA_DGAFuncs = { MGA_SetViewport, MGA_GetViewport, MGAStormSync, +#ifdef HAVE_XAA_H MGA_FillRect, MGA_BlitRect, MGA_BlitTransRect +#else + NULL, NULL, NULL +#endif }; @@ -120,11 +124,13 @@ SECOND_PASS: mode->flags = DGA_CONCURRENT_ACCESS; if(pixmap) mode->flags |= DGA_PIXMAP_AVAILABLE; +#ifdef HAVE_XAA_H if(!pMga->NoAccel) { mode->flags |= DGA_FILL_RECT | DGA_BLIT_RECT; if((Bpp != 3) && (pMga->Chipset != PCI_CHIP_MGA2064)) mode->flags |= DGA_BLIT_RECT_TRANS; } +#endif if(pMode->Flags & V_DBLSCAN) mode->flags |= DGA_DOUBLESCAN; if(pMode->Flags & V_INTERLACE) @@ -359,6 +365,7 @@ MGA_SetViewport( pMga->DGAViewportStatus = 0; /* MGAAdjustFrame loops until finished */ } +#ifdef HAVE_XAA_H static void MGA_FillRect ( ScrnInfoPtr pScrn, @@ -424,7 +431,7 @@ static void MGA_BlitTransRect( ScrnInfoPtr pScrn, int srcx, int srcy, SET_SYNC_FLAG(pMga->AccelInfoRec); } } - +#endif static Bool MGA_OpenFramebuffer( diff --git a/src/mga_dri.c b/src/mga_dri.c index c517322..0154671 100644 --- a/src/mga_dri.c +++ b/src/mga_dri.c @@ -355,7 +355,7 @@ void MGAGetQuiescence( ScrnInfoPtr pScrn ) MGAWaitForIdleDMA( pScrn ); /* FIXME what about EXA? */ -#ifdef USE_XAA +#ifdef XAA if (!pMga->Exa && pMga->AccelInfoRec) { WAITFIFO( 11 ); OUTREG( MGAREG_MACCESS, pMga->MAccess ); diff --git a/src/mga_driver.c b/src/mga_driver.c index e50d77b..b3fe538 100644 --- a/src/mga_driver.c +++ b/src/mga_driver.c @@ -90,7 +90,7 @@ #include "mga_macros.h" #include "mga_maven.h" -#ifdef USE_XAA +#ifdef XAA #include "xaa.h" #endif @@ -2118,7 +2118,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags) } } else { #endif -#ifdef USE_XAA +#ifdef XAA if (!xf86LoadSubModule(pScrn, "xaa")) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Falling back to shadowfb\n"); @@ -3401,8 +3401,10 @@ MGAScreenInit(SCREEN_INIT_ARGS_DECL) mgaExaInit(pScreen); else #endif -#ifdef USE_XAA +#ifdef XAA MGAStormAccelInit(pScreen); +#else + ; #endif } @@ -3771,7 +3773,7 @@ MGACloseScreen(CLOSE_SCREEN_ARGS_DECL) pMgaEnt->refCount--; } -#ifdef USE_XAA +#ifdef XAA if (pMga->AccelInfoRec) XAADestroyInfoRec(pMga->AccelInfoRec); #endif diff --git a/src/mga_video.c b/src/mga_video.c index 00e026d..535e329 100644 --- a/src/mga_video.c +++ b/src/mga_video.c @@ -14,7 +14,6 @@ #include "mga_macros.h" #include "xf86xv.h" #include <X11/extensions/Xv.h> -#include "xaa.h" #ifdef USE_XAA #include "xaa.h" @@ -1987,9 +1986,11 @@ MGAPutImageILOAD( bpp = pScrn->bitsPerPixel >> 3; +#ifdef HAVE_XAA_H if( pMga->AccelInfoRec->NeedToSync && ((long)data != pPriv->lastPort) ) { MGAStormSync(pScrn); } +#endif pPriv->lastPort = (long)data; nbox=REGION_NUM_RECTS(clipBoxes); @@ -2019,8 +2020,9 @@ MGAPutImageILOAD( pbox++; } - +#ifdef HAVE_XAA_H pMga->AccelInfoRec->NeedToSync = TRUE; +#endif pPriv->videoStatus = FREE_TIMER; pPriv->freeTime = currentTime.milliseconds + FREE_DELAY; pMga->VideoTimerCallback = MGAVideoTimerCallback; |