summaryrefslogtreecommitdiff
path: root/src/mga.h
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2006-10-10 11:43:52 -0700
committerIan Romanick <idr@us.ibm.com>2006-10-10 11:43:52 -0700
commit8fee907cac7e5924630e3648bfb72ad9bd021ea8 (patch)
tree868822813637ebb4692801ee2122f1f8defbcc4e /src/mga.h
parent7cecee186c889902bed9b7fa042f0bd3cc0297ef (diff)
parent2fc0ebfbe850c138e840b6653ed1476623aa04a4 (diff)
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-mga into pci-rework
Diffstat (limited to 'src/mga.h')
-rw-r--r--src/mga.h62
1 files changed, 59 insertions, 3 deletions
diff --git a/src/mga.h b/src/mga.h
index 3969183..f9afea3 100644
--- a/src/mga.h
+++ b/src/mga.h
@@ -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