diff options
Diffstat (limited to 'src/mga.h')
-rw-r--r-- | src/mga.h | 62 |
1 files changed, 59 insertions, 3 deletions
@@ -20,6 +20,7 @@ #include "compiler.h" #include "xaa.h" +#include "exa.h" #include "xf86Cursor.h" #include "vgaHW.h" #include "colormapst.h" @@ -81,7 +82,8 @@ typedef enum { OPTION_MONITOR2POS, OPTION_METAMODES, OPTION_OLDDMA, - OPTION_PCIDMA + OPTION_PCIDMA, + OPTION_ACCELMETHOD } MGAOpts; @@ -192,13 +194,20 @@ typedef struct { int contrast; Bool doubleBuffer; unsigned char currentBuffer; - FBLinearPtr linear; RegionRec clip; CARD32 colorKey; CARD32 videoStatus; Time offTime; Time freeTime; int lastPort; + +#ifdef USE_EXA + int size; + ExaOffscreenArea *off_screen; +#endif + + void *video_memory; + int video_offset; } MGAPortPrivRec, *MGAPortPrivPtr; typedef struct { @@ -447,6 +456,8 @@ typedef struct { MGARamdacRec Dac; Bool HasSDRAM; Bool NoAccel; + Bool Exa; + ExaDriverPtr ExaDriver; Bool SyncOnGreen; Bool HWCursor; Bool UsePCIRetry; @@ -566,6 +577,18 @@ typedef struct { Bool HALLoaded; #endif OptionInfoPtr Options; + + /* Exa */ + PicturePtr currentSrcPicture; + PicturePtr currentMaskPicture; + PixmapPtr currentSrc; + PixmapPtr currentMask; + int src_w2; + int src_h2; + int mask_w2; + int mask_h2; + CARD32 src_pitch; /* FIXME kill me */ + /* Merged Framebuffer data */ Bool MergedFB; @@ -626,12 +649,19 @@ void MGAAdjustGranularity(ScrnInfoPtr pScrn, int* x, int* y); void MGA2064SetupFuncs(ScrnInfoPtr pScrn); void MGAGSetupFuncs(ScrnInfoPtr pScrn); +/* #ifdef USE_XAA */ void MGAStormSync(ScrnInfoPtr pScrn); void MGAStormEngineInit(ScrnInfoPtr pScrn); Bool MGAStormAccelInit(ScreenPtr pScreen); +Bool mgaAccelInit(ScreenPtr pScreen); +/* #endif */ + +#ifdef USE_EXA +Bool mgaExaInit(ScreenPtr pScreen); +#endif + Bool MGAHWCursorInit(ScreenPtr pScreen); -Bool mgaAccelInit(ScreenPtr pScreen); void MGAPolyArcThinSolid(DrawablePtr, GCPtr, int, xArc*); @@ -720,4 +750,30 @@ void MGAFillDisplayModeStruct(DisplayModePtr pMode, LPMGAMODEINFO pModeInfo); /************************************************/ #endif +static __inline__ void +MGA_MARK_SYNC(MGAPtr pMga, ScrnInfoPtr pScrn) +{ +#ifdef USE_EXA + if (pMga->Exa) + exaMarkSync(pScrn->pScreen); +#endif +#ifdef USE_XAA + if (!pMga->Exa) + SET_SYNC_FLAG(pMga->AccelInfoRec); +#endif +} + +static __inline__ void +MGA_SYNC(MGAPtr pMga, ScrnInfoPtr pScrn) +{ +#ifdef USE_EXA + if (pMga->Exa) + exaWaitSync(pScrn->pScreen); +#endif +#ifdef USE_XAA + if (!pMga->Exa && pMga->AccelInfoRec && pMga->AccelInfoRec->NeedToSync) + pMga->AccelInfoRec->Sync(pScrn); +#endif +} + #endif |