From 7cde00f49649e25fd5816927c7a5e28b608fabcd Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Thu, 12 Feb 2009 17:39:44 -0500 Subject: R6xx/R7xx: switch to drm for wait for idle THIS REQUIRES AN UPDATED DRM --- src/r600_exa.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'src/r600_exa.c') diff --git a/src/r600_exa.c b/src/r600_exa.c index 8a16b7a0..5b17dcba 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -2123,23 +2123,6 @@ static void R600DoneComposite(PixmapPtr pDst) R600CPFlushIndirect(pScrn, accel_state->ib); } -/* really would be better to wait on a timestamp shadowed in memory, - * but this will do for now. - */ -static Bool -R600WaitforIdlePoll(ScrnInfoPtr pScrn) -{ - RADEONInfoPtr info = RADEONPTR(pScrn); - unsigned char *RADEONMMIO = info->MMIO; - uint32_t i; - - for (i = 0; i < 1000000; i++) { - if ((INREG(GRBM_STATUS) & GUI_ACTIVE_bit) == 0) - return TRUE; - } - return FALSE; -} - Bool R600CopyToVRAM(ScrnInfoPtr pScrn, char *src, int src_pitch, @@ -2186,7 +2169,7 @@ R600CopyToVRAM(ScrnInfoPtr pScrn, scratch_offset = scratch->total/2 - scratch_offset; dst = (char *)scratch->address + scratch_offset; // wait for the engine to be idle - R600WaitforIdlePoll(pScrn); + RADEONWaitForIdleCP(pScrn); //memcopy from sys to scratch while (temph--) { memcpy (dst, src, wpass); @@ -2281,7 +2264,7 @@ R600DownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, } // wait for the engine to be idle - R600WaitforIdlePoll(pScrn); + RADEONWaitForIdleCP(pScrn); //memcopy from scratch to sys while (oldhpass--) { memcpy (dst, src, wpass); @@ -2315,7 +2298,7 @@ R600Sync(ScreenPtr pScreen, int marker) struct radeon_accel_state *accel_state = info->accel_state; if (accel_state->exaMarkerSynced != marker) { - R600WaitforIdlePoll(pScrn); + RADEONWaitForIdleCP(pScrn); accel_state->exaMarkerSynced = marker; } -- cgit v1.2.3