summaryrefslogtreecommitdiff
path: root/src/radeon_dri.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-02-26 10:01:32 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-02-26 10:01:32 +0000
commit1574b41a0f894f9b6e30d3ee94e596695a4c64f0 (patch)
tree58cfbe51f9472948fee175b43481011874c19ac9 /src/radeon_dri.c
parent1f43a584a684af8078631425886cce236500e0e6 (diff)
Fix page flipping with XAA. The new code ended up calling ShadowFBInit()
before XAAInit(), which breaks ShadowFB.
Diffstat (limited to 'src/radeon_dri.c')
-rw-r--r--src/radeon_dri.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/src/radeon_dri.c b/src/radeon_dri.c
index 755635d2..544bca24 100644
--- a/src/radeon_dri.c
+++ b/src/radeon_dri.c
@@ -1600,18 +1600,32 @@ Bool RADEONDRIFinishScreenInit(ScreenPtr pScreen)
pRADEONDRI->perctx_sarea_size = info->perctx_sarea_size;
#endif
- /* Have shadowfb run only while there is 3d active. */
- if (!info->useEXA && info->allowPageFlip /* && info->drmMinor >= 3 */) {
- ShadowFBInit( pScreen, RADEONDRIRefreshArea );
- } else {
- info->allowPageFlip = 0;
- }
-
info->directRenderingInited = TRUE;
return TRUE;
}
+void RADEONDRIInitPageFlip(ScreenPtr pScreen)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+
+ /* Have shadowfb run only while there is 3d active. This must happen late,
+ * after XAAInit has been called
+ */
+ if (!info->useEXA /* && info->drmMinor >= 3 */) {
+ if (!ShadowFBInit( pScreen, RADEONDRIRefreshArea )) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "ShadowFB init failed, Page Flipping disabled\n");
+ info->allowPageFlip = 0;
+ } else
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "ShadowFB initialized for Page Flipping\n");
+ } else {
+ info->allowPageFlip = 0;
+ }
+}
+
/**
* This function will attempt to get the Radeon hardware back into shape
* after a resume from disc.