diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2006-09-30 19:25:20 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2006-09-30 19:25:20 +0200 |
commit | d43ad88fa3913437f6987ab5ab46a38f0cb555a8 (patch) | |
tree | ecf6c5c7334fc3a7fd16a8fd65bd24a2c6d582bb /src/radeon_driver.c | |
parent | 146ea328b7962f56c6ab47fbe2adc7561b36189c (diff) |
radeon: Add support for page flipping with EXA.
Also use the damage layer directly instead of via shadowfb and blit dirty
rectangles to the second page in LeaveServer in order to try and improve the
tradeoff between performance and correctness.
Diffstat (limited to 'src/radeon_driver.c')
-rw-r--r-- | src/radeon_driver.c | 50 |
1 files changed, 16 insertions, 34 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 60725da5..bb1e070c 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -55,7 +55,7 @@ * This server does not yet support these XFree86 4.0 features: * !!!! FIXME !!!! * DDC1 & DDC2 - * shadowfb (Note: dri uses shadowfb for another purpose in radeon_dri.c) + * shadowfb * overlay planes * * Modified by Marc Aurele La France (tsi@xfree86.org) for ATI driver merge. @@ -360,11 +360,6 @@ static const char *driSymbols[] = { "DRICreatePCIBusID", NULL }; - -static const char *driShadowFBSymbols[] = { - "ShadowFBInit", - NULL -}; #endif static const char *vbeSymbols[] = { @@ -411,7 +406,6 @@ void RADEONLoaderRefSymLists(void) #ifdef XF86DRI drmSymbols, driSymbols, - driShadowFBSymbols, #endif fbdevHWSymbols, vbeSymbols, @@ -3214,6 +3208,7 @@ static Bool RADEONPreInitDRI(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); MessageType from; + char *reason; info->directRenderingEnabled = FALSE; info->directRenderingInited = FALSE; @@ -3389,30 +3384,25 @@ static Bool RADEONPreInitDRI(ScrnInfoPtr pScrn) OPTION_NO_BACKBUFFER, FALSE); -#ifdef XF86DRI + info->allowPageFlip = 0; + +#ifdef DAMAGE if (info->noBackBuffer) { - info->allowPageFlip = 0; - } else if (!xf86LoadSubModule(pScrn, "shadowfb")) { - info->allowPageFlip = 0; - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Couldn't load shadowfb module:\n"); + from = X_DEFAULT; + reason = " because back buffer disabled"; } else { - xf86LoaderReqSymLists(driShadowFBSymbols, NULL); - - info->allowPageFlip = xf86ReturnOptValBool(info->Options, - OPTION_PAGE_FLIP, - FALSE); - if (info->allowPageFlip && info->useEXA) { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Page flipping not allowed with EXA, disabling.\n"); - info->allowPageFlip = FALSE; - } + from = xf86GetOptValBool(info->Options, OPTION_PAGE_FLIP, + &info->allowPageFlip) ? X_CONFIG : X_DEFAULT; + reason = ""; } - - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Page flipping %sabled\n", - info->allowPageFlip ? "en" : "dis"); +#else + from = X_DEFAULT; + reason = " because Damage layer not available at build time"; #endif + xf86DrvMsg(pScrn->scrnIndex, from, "Page Flipping %sabled%s\n", + info->allowPageFlip ? "en" : "dis", reason); + info->DMAForXv = TRUE; from = xf86GetOptValBool(info->Options, OPTION_XV_DMA, &info->DMAForXv) ? X_CONFIG : X_INFO; @@ -4835,14 +4825,6 @@ _X_EXPORT Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen, info->accelOn = FALSE; } -#ifdef XF86DRI - /* Init page flipping if enabled now */ - if (info->allowPageFlip) { - RADEONTRACE(("Initializing Page Flipping\n")); - RADEONDRIInitPageFlip(pScreen); - } -#endif - /* Init DPMS */ RADEONTRACE(("Initializing DPMS\n")); xf86DPMSInit(pScreen, RADEONDisplayPowerManagementSet, 0); |