xf86-video-r128: Branch 'master'

Connor Behan cbehan at kemper.freedesktop.org
Wed Mar 12 00:38:43 PDT 2014


 src/r128_dri.c        |    6 +++++-
 src/r128_exa_render.c |    7 +------
 2 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 5ef5812a7a272aa08543cfd9b633f33c35e34dbd
Author: Connor Behan <connor.behan at gmail.com>
Date:   Tue Mar 4 01:43:00 2014 -0800

    Remove overuse of COMPOSITE_SETUP()
    
    COMPOSITE_SETUP() involves expensive register writes so
    R128EnterServer() should call it once when there are 3D windows and 0
    times when there are no 3D windows.
    
    Instead the code was calling it once when there were no 3D windows and
    arbitrarily many times when there were 3D windows.
    
    Signed-off-by: Connor Behan <connor.behan at gmail.com>
    Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>

diff --git a/src/r128_dri.c b/src/r128_dri.c
index ff7bbc2..2c905a4 100644
--- a/src/r128_dri.c
+++ b/src/r128_dri.c
@@ -308,7 +308,11 @@ static void R128EnterServer(ScreenPtr pScreen)
 #endif
 #ifdef USE_EXA
     if (info->ExaDriver) exaMarkSync(pScreen);
-    info->state_2d.composite_setup = FALSE;
+    /* EXA and DRI are fighting over control of the texture hardware.
+     * That means we need to setup compositing when the server wakes
+     * up if a 3D app is running.
+     */
+    if (info->have3DWindows) info->state_2d.composite_setup = FALSE;
 #endif
 }
 
diff --git a/src/r128_exa_render.c b/src/r128_exa_render.c
index cb9f929..f00daf7 100644
--- a/src/r128_exa_render.c
+++ b/src/r128_exa_render.c
@@ -458,12 +458,7 @@ R128CCEPrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture,
 
     if (!info->state_2d.composite_setup) {
         COMPOSITE_SETUP();
-	/* DRI and EXA are fighting over control of the texture hardware.
-	 * That means we need to set up the compositing hardware every time
-	 * while a 3D app is running and once after it closes.
-	 */
-	if (!info->have3DWindows)
-	    info->state_2d.composite_setup = TRUE;
+        info->state_2d.composite_setup = TRUE;
     }
 
     /* We cannot guarantee that this register will stay zero - DRI needs it too. */


More information about the xorg-commit mailing list