I think we have a problem with the EnableDisableFBAccess paths,
but I'm not 100% sure how to fix it. However I don't believe the
swapped out flag should be hit for driver pixmaps at all.

The problem is on VT enter, the wrapped EDFBA function, does an 
if (set_disable) disable, call wrap, if (set_enabled) enable, however inside
the call wrap we get an exposure generation and we end up doing a bunch
of pointless sw rendering when clearly we could avoid it.

But I'm not sure what the logic behind the wrap calling sequence.

I've attached a patch that avoids hitting swapped out flag for driver pixmaps
and this makes fast user switch on radeon/kms actually fast.

Dave.
>From ddf5bfc66b8a6078fe8649e39627b78e2139c7ec Mon Sep 17 00:00:00 2001
From: Dave Airlie <[email protected]>
Date: Thu, 16 Apr 2009 10:28:36 +1000
Subject: [PATCH] exa: avoid offscreen pixmap swapped out flag for driver pixmaps

---
 exa/exa_offscreen.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/exa/exa_offscreen.c b/exa/exa_offscreen.c
index 4aaa2c1..d7198cb 100644
--- a/exa/exa_offscreen.c
+++ b/exa/exa_offscreen.c
@@ -371,6 +371,9 @@ exaEnableDisableFBAccess (int index, Bool enable)
     ScreenPtr pScreen = screenInfo.screens[index];
     ExaScreenPriv (pScreen);
 
+    if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS)
+	return;
+
     if (!enable && pExaScr->disableFbCount++ == 0) {
 	if (pExaScr->info->exa_minor < 1)
 	    ExaOffscreenSwapOut (pScreen);
-- 
1.6.0.6

_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to