From 9234d8045c5fefbd1a781209409e55a13e3e5370 Mon Sep 17 00:00:00 2001 From: David Airlie Date: Mon, 5 Feb 2007 11:53:18 +1100 Subject: remove all the locking glxgears runs fine over screen changes without it --- src/radeon_display.c | 22 +--------------------- src/radeon_randr.c | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/radeon_display.c b/src/radeon_display.c index 4f31cdbf..c1467858 100644 --- a/src/radeon_display.c +++ b/src/radeon_display.c @@ -2277,7 +2277,6 @@ radeon_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, radeon_crtc->lut_b[i] = blue[i] >> 8; } - ErrorF("Loading lut %d\n", radeon_crtc->crtc_id); radeon_crtc_load_lut(crtc); } @@ -2287,14 +2286,7 @@ radeon_crtc_lock(xf86CrtcPtr crtc) ScrnInfoPtr pScrn = crtc->scrn; RADEONInfoPtr info = RADEONPTR(pScrn); Bool CPStarted = info->CPStarted; - if (info->accelOn) - RADEON_SYNC(info, pScrn); -#ifdef XF86DRI - if (info->CPStarted) { - DRILock(pScrn->pScreen, 0); - RADEONCP_STOP(pScrn, info); - } -#endif + return FALSE; } @@ -2304,18 +2296,6 @@ radeon_crtc_unlock(xf86CrtcPtr crtc) ScrnInfoPtr pScrn = crtc->scrn; RADEONInfoPtr info = RADEONPTR(pScrn); - if (info->accelOn) { - RADEON_SYNC(info, pScrn); - RADEONEngineRestore(pScrn); - -} -#ifdef XF86DRI - if (info->CPStarted) { - RADEONCP_START(pScrn, info); - DRIUnlock(pScrn->pScreen); - } -#endif - } static const xf86CrtcFuncsRec radeon_crtc_funcs = { diff --git a/src/radeon_randr.c b/src/radeon_randr.c index 925a01fd..679831f2 100644 --- a/src/radeon_randr.c +++ b/src/radeon_randr.c @@ -628,7 +628,13 @@ xf86RandR12CrtcSet (ScreenPtr pScreen, RADEONInfoPtr info = RADEONPTR(pScrn); RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private; crtc->enabled = mode != NULL; - + +#if 0//def XF86DRI + if (info->CPStarted) { + DRILock(pScrn->pScreen, 0); + RADEONCP_STOP(pScrn, info); + } +#endif if (info->accelOn) RADEON_SYNC(info, pScrn); @@ -659,7 +665,18 @@ xf86RandR12CrtcSet (ScreenPtr pScreen, } if (info->DispPriority) RADEONInitDispBandwidth(pScrn); - + + if (info->accelOn) { + RADEON_SYNC(info, pScrn); +// RADEONEngineRestore(pScrn); + } + +#if 0 //ef XF86DRI + if (info->CPStarted) { + RADEONCP_START(pScrn, info); + DRIUnlock(pScrn->pScreen); + } +#endif } if (changed && mode) RADEONCrtcSetBase(crtc, x, y); -- cgit v1.2.3