diff options
author | Christian Toutant <ctoutant@matrox.com> | 2011-09-20 13:07:16 -0400 |
---|---|---|
committer | Christian Toutant <ctoutant@matrox.com> | 2011-09-20 13:07:16 -0400 |
commit | 01ca2186ea028b2549de509b51726aa08519fce0 (patch) | |
tree | 989c168ea034d311a0f5f07155f39591a186e438 | |
parent | c083bf0a66bef9a4345847f39be5fb895c211f79 (diff) |
Reset tagfifo for renesas.
For renesas, we need to reset tagfifo after a mode switch.
Signed-off-by: Christian Toutant <ctoutant@matrox.com>
-rw-r--r-- | src/mga_driver.c | 22 | ||||
-rw-r--r-- | src/mga_reg.h | 3 |
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) |