[PATCH r128] Remove overuse of COMPOSITE_SETUP()

Connor Behan connor.behan at gmail.com
Mon Mar 3 00:30:43 PST 2014

Some expensive register writes must be done in COMPOSITE_SETUP() for
render ops to work. They only needed to be written again if the 3D
driver uses them or if there is a VT switch. Resetting the
composite_setup variable was mistakenly put in R128EnterServer. This
causes the registers to be written for every render op even if there are
no 3D windows because the server context is re-entered every time the
indirect buffer is submitted to the kernel. R128DRITransitionTo3d should
be used instead.

Signed-off-by: Connor Behan <connor.behan at gmail.com>
 src/r128_dri.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/r128_dri.c b/src/r128_dri.c
index ff7bbc2..f03147a 100644
--- a/src/r128_dri.c
+++ b/src/r128_dri.c
@@ -308,7 +308,6 @@ static void R128EnterServer(ScreenPtr pScreen)
 #ifdef USE_EXA
     if (info->ExaDriver) exaMarkSync(pScreen);
-    info->state_2d.composite_setup = FALSE;
@@ -1521,6 +1520,9 @@ static void R128DRITransitionTo3d(ScreenPtr pScreen)
     info->have3DWindows = 1;
+#ifdef USE_EXA
+    info->state_2d.composite_setup = FALSE;
     if (info->cursor_start)
         xf86ForceHWCursor(pScreen, TRUE);

More information about the xorg-driver-ati mailing list