diff options
author | Jerome Glisse <glisse@freedesktop.org> | 2008-06-25 10:28:26 +0200 |
---|---|---|
committer | Jerome Glisse <glisse@freedesktop.org> | 2008-06-25 10:28:26 +0200 |
commit | 8c9b8de0373797cba6f0a27e6b6f461e1070fef9 (patch) | |
tree | ce1f9504f0061470037b1abcdc6383715ca06a86 /src/radeon_accelfuncs.c | |
parent | b416e97a1f16ef700ba1aaca317dee82b7a3cf64 (diff) |
radeon: flush & wait for 2d & dma idle after 2d blit
This should help to avoid 2d & 3d engine to step on each
other dma transaction.
Diffstat (limited to 'src/radeon_accelfuncs.c')
-rw-r--r-- | src/radeon_accelfuncs.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/radeon_accelfuncs.c b/src/radeon_accelfuncs.c index 3c0b8a0f..56793cd0 100644 --- a/src/radeon_accelfuncs.c +++ b/src/radeon_accelfuncs.c @@ -151,6 +151,11 @@ FUNC_NAME(RADEONSetupForSolidFill)(ScrnInfoPtr pScrn, | RADEON_DST_Y_TOP_TO_BOTTOM)); FINISH_ACCEL(); + BEGIN_ACCEL(2); + OUT_ACCEL_REG(RADEON_DSTCACHE_CTLSTAT, RADEON_RB2D_DC_FLUSH_ALL); + OUT_ACCEL_REG(RADEON_WAIT_UNTIL, + RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_DMA_GUI_IDLE); + FINISH_ACCEL(); } /* Subsequent XAA SolidFillRect @@ -205,6 +210,11 @@ FUNC_NAME(RADEONSetupForSolidLine)(ScrnInfoPtr pScrn, OUT_ACCEL_REG(RADEON_DP_WRITE_MASK, planemask); FINISH_ACCEL(); + BEGIN_ACCEL(2); + OUT_ACCEL_REG(RADEON_DSTCACHE_CTLSTAT, RADEON_RB2D_DC_FLUSH_ALL); + OUT_ACCEL_REG(RADEON_WAIT_UNTIL, + RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_DMA_GUI_IDLE); + FINISH_ACCEL(); } /* Subsequent XAA solid horizontal and vertical lines */ @@ -324,6 +334,11 @@ FUNC_NAME(RADEONSetupForDashedLine)(ScrnInfoPtr pScrn, OUT_ACCEL_REG(RADEON_BRUSH_DATA0, pat); FINISH_ACCEL(); + BEGIN_ACCEL(2); + OUT_ACCEL_REG(RADEON_DSTCACHE_CTLSTAT, RADEON_RB2D_DC_FLUSH_ALL); + OUT_ACCEL_REG(RADEON_WAIT_UNTIL, + RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_DMA_GUI_IDLE); + FINISH_ACCEL(); } /* Helper function to draw last point for dashed lines */ @@ -358,6 +373,11 @@ FUNC_NAME(RADEONDashedLastPel)(ScrnInfoPtr pScrn, OUT_ACCEL_REG(RADEON_DP_BRUSH_FRGD_CLR, info->dash_fg); FINISH_ACCEL(); + BEGIN_ACCEL(2); + OUT_ACCEL_REG(RADEON_DSTCACHE_CTLSTAT, RADEON_RB2D_DC_FLUSH_ALL); + OUT_ACCEL_REG(RADEON_WAIT_UNTIL, + RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_DMA_GUI_IDLE); + FINISH_ACCEL(); } /* Subsequent XAA dashed line */ @@ -461,6 +481,11 @@ FUNC_NAME(RADEONSetupForScreenToScreenCopy)(ScrnInfoPtr pScrn, (ydir >= 0 ? RADEON_DST_Y_TOP_TO_BOTTOM : 0))); FINISH_ACCEL(); + BEGIN_ACCEL(2); + OUT_ACCEL_REG(RADEON_DSTCACHE_CTLSTAT, RADEON_RB2D_DC_FLUSH_ALL); + OUT_ACCEL_REG(RADEON_WAIT_UNTIL, + RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_DMA_GUI_IDLE); + FINISH_ACCEL(); info->trans_color = trans_color; FUNC_NAME(RADEONSetTransparency)(pScrn, trans_color); @@ -553,6 +578,11 @@ FUNC_NAME(RADEONSetupForMono8x8PatternFill)(ScrnInfoPtr pScrn, #endif FINISH_ACCEL(); + BEGIN_ACCEL(2); + OUT_ACCEL_REG(RADEON_DSTCACHE_CTLSTAT, RADEON_RB2D_DC_FLUSH_ALL); + OUT_ACCEL_REG(RADEON_WAIT_UNTIL, + RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_DMA_GUI_IDLE); + FINISH_ACCEL(); } /* Subsequent XAA 8x8 pattern color expansion. Because they are used in @@ -1086,6 +1116,11 @@ FUNC_NAME(RADEONSetClippingRectangle)(ScrnInfoPtr pScrn, OUT_ACCEL_REG(RADEON_SC_BOTTOM_RIGHT, tmp2); FINISH_ACCEL(); + BEGIN_ACCEL(2); + OUT_ACCEL_REG(RADEON_DSTCACHE_CTLSTAT, RADEON_RB2D_DC_FLUSH_ALL); + OUT_ACCEL_REG(RADEON_WAIT_UNTIL, + RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_DMA_GUI_IDLE); + FINISH_ACCEL(); FUNC_NAME(RADEONSetTransparency)(pScrn, info->trans_color); } @@ -1105,6 +1140,11 @@ FUNC_NAME(RADEONDisableClipping)(ScrnInfoPtr pScrn) RADEON_DEFAULT_SC_BOTTOM_MAX)); FINISH_ACCEL(); + BEGIN_ACCEL(2); + OUT_ACCEL_REG(RADEON_DSTCACHE_CTLSTAT, RADEON_RB2D_DC_FLUSH_ALL); + OUT_ACCEL_REG(RADEON_WAIT_UNTIL, + RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_DMA_GUI_IDLE); + FINISH_ACCEL(); FUNC_NAME(RADEONSetTransparency)(pScrn, info->trans_color); } |