From 0eb35f2065314807a604a44e571bbb898db23543 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Fri, 29 Aug 2008 19:20:54 -0300 Subject: 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. --- src/smi_accel.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/smi_accel.c') 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); -- cgit v1.2.3