xserver: Branch 'server-1.19-branch' - 3 commits

Adam Jackson ajax at kemper.freedesktop.org
Fri Mar 10 16:15:30 UTC 2017


 configure.ac      |    2 +-
 dix/pixmap.c      |   16 ++++------------
 present/present.c |   16 ++++++++++++++++
 3 files changed, 21 insertions(+), 13 deletions(-)

New commits:
commit db1326cd6625747e4036e6cdc75bc7a0e1b0426b
Author: Qiang Yu <Qiang.Yu at amd.com>
Date:   Thu Jan 26 18:13:53 2017 +0800

    present: disable page flip only when a slave crtc is active
    
    This prevents the tearing of moving window in a composite WM
    desktop when output slave is attached but none of its crtc is
    really active.
    
    [1.19: Also fix DMX_LIBS= in configure.ac so it still links - ajax]
    
    Signed-off-by: Qiang Yu <Qiang.Yu at amd.com>
    Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
    (cherry picked from commit bb9128fdc86decd6f6e3b0e145011a8c08b1d2b5)

diff --git a/configure.ac b/configure.ac
index a265ab5..e9fa1c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2334,7 +2334,7 @@ if test "x$DMX" = xyes; then
 	fi
 	DMX_INCLUDES="$XEXT_INC $RENDER_INC $RECORD_INC"
 	XDMX_CFLAGS="$DMXMODULES_CFLAGS"
-	XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $COMPOSITE_LIB $DAMAGE_LIB $MAIN_LIB $DIX_LIB $RANDR_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB"
+	XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $PRESENT_LIB $RANDR_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $DRI3_LIB $MIEXT_SYNC_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $COMPOSITE_LIB $DAMAGE_LIB $MAIN_LIB $DIX_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB"
 	XDMX_SYS_LIBS="$DMXMODULES_LIBS"
 	AC_SUBST([XDMX_CFLAGS])
 	AC_SUBST([XDMX_LIBS])
diff --git a/present/present.c b/present/present.c
index ef89045..c9c68dc 100644
--- a/present/present.c
+++ b/present/present.c
@@ -118,6 +118,18 @@ present_flip_pending_pixmap(ScreenPtr screen)
 }
 
 static Bool
+present_check_output_slaves_active(ScreenPtr pScreen)
+{
+    ScreenPtr pSlave;
+
+    xorg_list_for_each_entry(pSlave, &pScreen->slave_list, slave_head) {
+        if (RRHasScanoutPixmap(pSlave))
+            return TRUE;
+    }
+    return FALSE;
+}
+
+static Bool
 present_check_flip(RRCrtcPtr    crtc,
                    WindowPtr    window,
                    PixmapPtr    pixmap,
@@ -145,7 +157,7 @@ present_check_flip(RRCrtcPtr    crtc,
         return FALSE;
 
     /* Fail to flip if we have slave outputs */
-    if (screen->output_slaves)
+    if (screen->output_slaves && present_check_output_slaves_active(screen))
         return FALSE;
 
     /* Make sure the window hasn't been redirected with Composite */
commit 1097bc9c184db4c722d5a8d2c5a4c0da9cdc70f5
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Mar 9 11:25:34 2017 +0000

    Revert "prime: Sync shared pixmap from root window instead of screen pixmap"
    
    This reverts commit b5b292896f647c85f03f53b20b2f03c0e94de428.
    
    This breaks the concept of the screen->pixmap_dirty_list as it no longer
    tracks the relationship between the PixmapDirtyUpdate src and slave_dst,
    for the supposed convenience of not tracking present flips.
    
    Bugzilla: https://bugs.freedesktop.org/100086
    Reviewed-by: Adam Jackson <ajax at redhat.com>

diff --git a/dix/pixmap.c b/dix/pixmap.c
index b67a2e8..7a64024 100644
--- a/dix/pixmap.c
+++ b/dix/pixmap.c
@@ -241,8 +241,7 @@ PixmapStartDirtyTracking(PixmapPtr src,
     RegionUnion(damageregion, damageregion, &dstregion);
     RegionUninit(&dstregion);
 
-    DamageRegister(screen->root ? &screen->root->drawable : &src->drawable,
-                   dirty_update->damage);
+    DamageRegister(&src->drawable, dirty_update->damage);
     xorg_list_add(&dirty_update->ent, &screen->pixmap_dirty_list);
     return TRUE;
 }
@@ -270,7 +269,6 @@ PixmapDirtyCopyArea(PixmapPtr dst,
                     RegionPtr dirty_region)
 {
     ScreenPtr pScreen = dirty->src->drawable.pScreen;
-    DrawablePtr src = pScreen->root ? &pScreen->root->drawable : &dirty->src->drawable;
     int n;
     BoxPtr b;
     GCPtr pGC;
@@ -278,13 +276,7 @@ PixmapDirtyCopyArea(PixmapPtr dst,
     n = RegionNumRects(dirty_region);
     b = RegionRects(dirty_region);
 
-    pGC = GetScratchGC(src->depth, pScreen);
-    if (pScreen->root) {
-        ChangeGCVal subWindowMode;
-
-        subWindowMode.val = IncludeInferiors;
-        ChangeGC(NullClient, pGC, GCSubwindowMode, &subWindowMode);
-    }
+    pGC = GetScratchGC(dirty->src->drawable.depth, pScreen);
     ValidateGC(&dst->drawable, pGC);
 
     while (n--) {
@@ -295,7 +287,7 @@ PixmapDirtyCopyArea(PixmapPtr dst,
         w = dst_box.x2 - dst_box.x1;
         h = dst_box.y2 - dst_box.y1;
 
-        pGC->ops->CopyArea(src, &dst->drawable, pGC,
+        pGC->ops->CopyArea(&dirty->src->drawable, &dst->drawable, pGC,
                            dirty->x + dst_box.x1, dirty->y + dst_box.y1, w, h,
                            dirty->dst_x + dst_box.x1,
                            dirty->dst_y + dst_box.y1);
@@ -318,7 +310,7 @@ PixmapDirtyCompositeRotate(PixmapPtr dst_pixmap,
     int error;
 
     src = CreatePicture(None,
-                        &pScreen->root->drawable,
+                        &dirty->src->drawable,
                         format,
                         CPSubwindowMode,
                         &include_inferiors, serverClient, &error);
commit 0ec92f06d4b3bad2e62da24ee7fb64fc88a75820
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Mar 10 10:54:17 2017 -0500

    Revert "present: Allow flipping with PRIME slave outputs"
    
    This reverts commit 5c1dd4eba833ecf4ea789c8319b4e25ea1e1fab9.
    
    Bugzilla: https://bugs.freedesktop.org/100086
    Reviewed-by: Adam Jackson <ajax at redhat.com>

diff --git a/present/present.c b/present/present.c
index aa9c041..ef89045 100644
--- a/present/present.c
+++ b/present/present.c
@@ -144,6 +144,10 @@ present_check_flip(RRCrtcPtr    crtc,
     if (!screen_priv->info->flip)
         return FALSE;
 
+    /* Fail to flip if we have slave outputs */
+    if (screen->output_slaves)
+        return FALSE;
+
     /* Make sure the window hasn't been redirected with Composite */
     window_pixmap = screen->GetWindowPixmap(window);
     if (window_pixmap != screen->GetScreenPixmap(screen) &&


More information about the xorg-commit mailing list