diff options
author | Francisco Jerez <currojerez@gmail.com> | 2008-09-01 21:28:13 +0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-09-01 18:00:43 -0300 |
commit | b23c5c5e434aaba2128abcae61a8564a62d2e7a1 (patch) | |
tree | c1ad6458444a1a0ec0d618966c4dad279d3694bb /src/regsmi.h | |
parent | 6a01c87b7c75f698ff2b783f8d341526159ebfe2 (diff) |
Fix XAA, ShadowFB and VT switching for non-sm501 chipsets
Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Diffstat (limited to 'src/regsmi.h')
-rw-r--r-- | src/regsmi.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/regsmi.h b/src/regsmi.h index 3a6d0e1..b77b6ff 100644 --- a/src/regsmi.h +++ b/src/regsmi.h @@ -120,14 +120,16 @@ VGAOUT8(SMIPtr pSmi, int port, CARD8 data) #define READ_SCR(pSmi, scr) MMIO_IN32(pSmi->SCRBase, scr) #define CHECK_SECONDARY(pSmi) \ - if (IS_MSOC(pSmi) && !(pSmi)->IsSecondary) { \ - WRITE_DPR(pSmi, 0x40, 0); \ - WRITE_DPR(pSmi, 0x44, 0); \ - } \ - else { \ - WRITE_DPR(pSmi, 0x40, pScrn->fbOffset / 16 << 4); \ - WRITE_DPR(pSmi, 0x44, pScrn->fbOffset / 16 << 4); \ - } + if(IS_MSOC(pSmi)){ \ + if ((pSmi)->IsSecondary) { \ + WRITE_DPR(pSmi, 0x40, pScrn->fbOffset / 16 << 4); \ + WRITE_DPR(pSmi, 0x44, pScrn->fbOffset / 16 << 4); \ + } \ + else { \ + WRITE_DPR(pSmi, 0x40, 0); \ + WRITE_DPR(pSmi, 0x44, 0); \ + } \ + } /* 2D Engine commands */ #define SMI_TRANSPARENT_SRC 0x00000100 @@ -176,13 +178,13 @@ VGAOUT8(SMIPtr pSmi, int port, CARD8 data) #define MAXLOOP 0x100000 /* timeout value for engine waits */ #define ENGINE_IDLE() \ - IS_MSOC(pSmi) ? \ + (IS_MSOC(pSmi) ? \ (READ_SCR(pSmi, SCR00) & 0x00080000) == 0 : \ - (VGAIN8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x16) & 0x08) == 0 + (VGAIN8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x16) & 0x08) == 0) #define FIFO_EMPTY() \ - IS_MSOC(pSmi) ? \ + (IS_MSOC(pSmi) ? \ READ_SCR(pSmi, SCR00) & 0x00100000 : \ - VGAIN8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x16) & 0x10 + VGAIN8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x16) & 0x10) /* Wait until "v" queue entries are free */ /**** FIXME |