diff options
author | David Airlie <airlied@linux.ie> | 2007-02-01 16:43:38 +1100 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-02-02 15:34:13 +1100 |
commit | 720730b1b0de632488d3b9818210ec5e9c7f07ae (patch) | |
tree | 3d488c979919ec53cc10b11d024efb307f58acd4 | |
parent | 6748732658850ea506f623a3622aa7135513ffd0 (diff) |
add locks for crtcs and some missing lines from intel update
-rw-r--r-- | src/radeon_display.c | 23 | ||||
-rw-r--r-- | src/radeon_randr.c | 9 |
2 files changed, 26 insertions, 6 deletions
diff --git a/src/radeon_display.c b/src/radeon_display.c index a8df1063..0b13d496 100644 --- a/src/radeon_display.c +++ b/src/radeon_display.c @@ -2289,8 +2289,16 @@ radeon_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, static Bool 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 - /* TODO */ + if (info->CPStarted) { + DRILock(pScrn->pScreen, 0); + RADEONCP_STOP(pScrn, info); + } #endif return FALSE; } @@ -2298,8 +2306,19 @@ radeon_crtc_lock(xf86CrtcPtr crtc) static void radeon_crtc_unlock(xf86CrtcPtr crtc) { + ScrnInfoPtr pScrn = crtc->scrn; + RADEONInfoPtr info = RADEONPTR(pScrn); + + if (info->accelOn) { + RADEON_SYNC(info, pScrn); + RADEONEngineRestore(pScrn); + +} #ifdef XF86DRI - /* TODO */ + if (info->CPStarted) { + RADEONCP_START(pScrn, info); + DRIUnlock(pScrn->pScreen); + } #endif } diff --git a/src/radeon_randr.c b/src/radeon_randr.c index 97c9295a..d9683ecd 100644 --- a/src/radeon_randr.c +++ b/src/radeon_randr.c @@ -586,7 +586,6 @@ xf86RandR12CrtcSet (ScreenPtr pScreen, xf86CrtcPtr crtc = randr_crtc->devPrivate; DisplayModePtr mode = randr_mode ? randr_mode->devPrivate : NULL; Bool changed = FALSE; - Bool pos_changed; int o, ro; xf86CrtcPtr *save_crtcs; Bool save_enabled = crtc->enabled; @@ -598,9 +597,8 @@ xf86RandR12CrtcSet (ScreenPtr pScreen, else if (mode && !xf86ModesEqual (&crtc->mode, mode)) changed = TRUE; - pos_changed = changed; if (x != crtc->x || y != crtc->y) - pos_changed = TRUE; + changed = TRUE; for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; @@ -649,6 +647,9 @@ xf86RandR12CrtcSet (ScreenPtr pScreen, return FALSE; } crtc->desiredMode = *mode; + crtc->desiredRotation = rotation; + crtc->desiredX = x; + crtc->desiredY = y; RADEONDisableUnusedFunctions(pScrn); RADEONBlank(pScrn); @@ -660,7 +661,7 @@ xf86RandR12CrtcSet (ScreenPtr pScreen, RADEONInitDispBandwidth(pScrn); } - if (pos_changed && mode) + if (changed && mode) RADEONCrtcSetBase(crtc, x, y); DEALLOCATE_LOCAL(save_crtcs); return xf86RandR12CrtcNotify (randr_crtc); |