summaryrefslogtreecommitdiff
path: root/src/mga.h
diff options
context:
space:
mode:
authorAdam Jackson <ajax@benzedrine.nwnk.net>2007-03-28 11:07:49 -0400
committerAdam Jackson <ajax@benzedrine.nwnk.net>2007-03-28 11:53:01 -0400
commit630390dc5b892941ed6609ca5c35b90be53333f7 (patch)
treeb3594c086d81619f9bb8be01557e3e4dbb791c52 /src/mga.h
parent99430f1cf36c07350cdc557dbbb5c0a34c9b9dd0 (diff)
Fix various timing bugs on the G200SE.
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 61e8729..156ac81 100644
--- a/src/mga.h
+++ b/src/mga.h
@@ -147,6 +147,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
@@ -693,6 +719,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 ***************/