summaryrefslogtreecommitdiff
path: root/src/mga.h
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2007-08-20 15:20:39 -0700
committerIan Romanick <idr@us.ibm.com>2007-08-20 15:20:39 -0700
commit707d3adbc7d9ee918d6c70083f51ad851ce68852 (patch)
treeca70f5609de3d2aa2311e3cc0fecf638707c0de8 /src/mga.h
parent741c50c162986a14647301c2c5f8e080a7664efd (diff)
parent489e007a29de63716ab550eacb3e98a91975d1d5 (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.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/mga.h b/src/mga.h
index 4be0fbb..00f4741 100644
--- a/src/mga.h
+++ b/src/mga.h
@@ -148,6 +148,32 @@ void MGAdbg_outreg32(ScrnInfoPtr, int,int, char*);
outMGAdreg(MGA1064_DATA, tmp | (val)); \
} while (0)
+#define MGAWAITVSYNC() \
+ do { \
+ unsigned int count = 0; \
+ unsigned int status = 0; \
+ do { \
+ status = INREG( MGAREG_Status ); \
+ count++; \
+ } while( ( status & 0x08 ) && (count < 250000) );\
+ count = 0; \
+ status = 0; \
+ do { \
+ status = INREG( MGAREG_Status ); \
+ count++; \
+ } while( !( status & 0x08 ) && (count < 250000) );\
+ } while (0)
+
+#define MGAWAITBUSY() \
+ do { \
+ unsigned int count = 0; \
+ unsigned int status = 0; \
+ do { \
+ status = INREG8( MGAREG_Status + 2 ); \
+ count++; \
+ } while( ( status & 0x01 ) && (count < 500000) ); \
+ } while (0)
+
#define PORT_OFFSET (0x1F00 - 0x300)
#define MGA_VERSION 4000
@@ -730,6 +756,9 @@ long MGAG450SavePLLFreq(ScrnInfoPtr pScrn);
void MGAprintDac(ScrnInfoPtr pScrn);
void MGAG200SESaveFonts(ScrnInfoPtr, vgaRegPtr);
void MGAG200SERestoreFonts(ScrnInfoPtr, vgaRegPtr);
+void MGAG200SESaveMode(ScrnInfoPtr, vgaRegPtr);
+void MGAG200SERestoreMode(ScrnInfoPtr, vgaRegPtr);
+void MGAG200SEHWProtect(ScrnInfoPtr, Bool);
#ifdef USEMGAHAL
/************ ESC Call Definition ***************/