summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mga_driver.c22
-rw-r--r--src/mga_reg.h3
2 files changed, 25 insertions, 0 deletions
diff --git a/src/mga_driver.c b/src/mga_driver.c
index b140013..58a1390 100644
--- a/src/mga_driver.c
+++ b/src/mga_driver.c
@@ -3282,6 +3282,28 @@ MGA_HAL(
outb(0xfac, 0x02);
}
+ /* Reset tagfifo*/
+ if (pMga->is_G200ER)
+ {
+ CARD32 ulMemCtl = INREG(MGAREG_MEMCTL);
+ CARD8 ucSeq1;
+
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Reset tagfifo\n");
+ /* Screen off */
+ OUTREG8(MGAREG_SEQ_INDEX, 0x01); /* Select SEQ1 */
+ ucSeq1 = INREG8(MGAREG_SEQ_DATA) | 0x20;
+ OUTREG8(MGAREG_SEQ_DATA, ucSeq1);
+
+ /* Reset tagfifo */
+ OUTREG(MGAREG_MEMCTL, ulMemCtl | 0x002000000);
+ usleep(1000); /* wait 1ms */
+ OUTREG(MGAREG_MEMCTL, ulMemCtl & ~0x002000000);
+
+ /* Screen on */
+ OUTREG8(MGAREG_SEQ_DATA, ucSeq1 & ~0x20);
+
+ }
+
/*
This function optimize the Priority Request control
Higher HiPriLvl will reduce drawing performance
diff --git a/src/mga_reg.h b/src/mga_reg.h
index 5a37db6..ae0fe8c 100644
--- a/src/mga_reg.h
+++ b/src/mga_reg.h
@@ -119,6 +119,9 @@
#define MGAREG_WACCEPTSEQ 0x1dd4
#define MGAREG_WMISC 0x1e70
+
+#define MGAREG_MEMCTL 0x2E08
+
/* OPMODE register additives */
#define MGAOPM_DMA_GENERAL (0x00 << 2)