diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-08-29 19:20:54 -0300 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-08-29 19:54:05 -0300 |
commit | 0eb35f2065314807a604a44e571bbb898db23543 (patch) | |
tree | 89b1db8c3da9cb21f9b666c89f314eb218014711 /src/smi_accel.c | |
parent | 375e35fc7df4a21c2e0bc933774cc2f5f29b89d1 (diff) |
Update xaa and generic acceleration code for the MSOC.
Currently, the support for EXA is not functional, neither is
ShadowFB or bpp/depth other than 16.
Diffstat (limited to 'src/smi_accel.c')
-rw-r--r-- | src/smi_accel.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/smi_accel.c b/src/smi_accel.c index 9c3fca0..6e66677 100644 --- a/src/smi_accel.c +++ b/src/smi_accel.c @@ -79,6 +79,26 @@ SMI_AccelSync(ScrnInfoPtr pScrn) ENTER_PROC("SMI_AccelSync"); WaitIdleEmpty(); /* #161 */ + if (IS_MSOC(pSmi)) { + int i, dwVal; + + for (i = 0x1000000; i > 0; i--) { + dwVal = regRead32(pSmi, CMD_INTPR_STATUS); + if (FIELD_GET(dwVal, CMD_INTPR_STATUS, + 2D_ENGINE) == CMD_INTPR_STATUS_2D_ENGINE_IDLE && + FIELD_GET(dwVal, CMD_INTPR_STATUS, + 2D_FIFO) == CMD_INTPR_STATUS_2D_FIFO_EMPTY && + FIELD_GET(dwVal, CMD_INTPR_STATUS, + 2D_SETUP) == CMD_INTPR_STATUS_2D_SETUP_IDLE && + FIELD_GET(dwVal, CMD_INTPR_STATUS, + CSC_STATUS) == CMD_INTPR_STATUS_CSC_STATUS_IDLE && + FIELD_GET(dwVal, CMD_INTPR_STATUS, + 2D_MEMORY_FIFO) == CMD_INTPR_STATUS_2D_MEMORY_FIFO_EMPTY && + FIELD_GET(dwVal, CMD_INTPR_STATUS, + COMMAND_FIFO) == CMD_INTPR_STATUS_COMMAND_FIFO_EMPTY) + break; + } + } LEAVE_PROC("SMI_AccelSync"); } @@ -125,6 +145,7 @@ SMI_EngineReset(ScrnInfoPtr pScrn) WRITE_DPR(pSmi, 0x40, pSmi->FBOffset >> 3); WRITE_DPR(pSmi, 0x44, pSmi->FBOffset >> 3); } + CHECK_SECONDARY(pSmi); SMI_DisableClipping(pScrn); @@ -162,6 +183,11 @@ SMI_SetClippingRectangle(ScrnInfoPtr pScrn, int left, int top, int right, } } + if (IS_MSOC(pSmi)) { + ++right; + ++bottom; + } + pSmi->ScissorsLeft = (top << 16) | (left & 0xFFFF) | 0x2000; pSmi->ScissorsRight = (bottom << 16) | (right & 0xFFFF); |