xserver: Branch 'server-1.17-branch' - 2 commits

Adam Jackson ajax at kemper.freedesktop.org
Mon Oct 26 08:42:55 PDT 2015


 glx/glxdriswrast.c |    5 +++--
 present/present.c  |   14 ++++++++------
 2 files changed, 11 insertions(+), 8 deletions(-)

New commits:
commit 23d52080a5d9c03dc2707e71f6d878c58d000a55
Author: Fredrik Höglund <fredrik at kde.org>
Date:   Thu Sep 10 23:33:20 2015 +0200

    present: Don't stash the MSC value when present_get_ust_msc fails
    
    Otherwise we stash an uninitalized value, and later use it to compute
    the msc_offset for the window.  Also initialize ust and crtc_msc so we
    never use uninitalized values when present_get_ust_msc fails.
    
    This fixes clients getting stuck waiting indefinitely for an idle
    event when a CRTC is turned off.
    
    Signed-off-by: Fredrik Höglund <fredrik at kde.org>
    Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
    (cherry picked from commit f6ce23fbfc8804204fa103f98b94478387b94040)

diff --git a/present/present.c b/present/present.c
index a634601..7ddffbd 100644
--- a/present/present.c
+++ b/present/present.c
@@ -710,9 +710,9 @@ present_pixmap(WindowPtr window,
                present_notify_ptr notifies,
                int num_notifies)
 {
-    uint64_t                    ust;
+    uint64_t                    ust = 0;
     uint64_t                    target_msc;
-    uint64_t                    crtc_msc;
+    uint64_t                    crtc_msc = 0;
     int                         ret;
     present_vblank_ptr          vblank, tmp;
     ScreenPtr                   screen = window->drawable.pScreen;
@@ -734,13 +734,15 @@ present_pixmap(WindowPtr window,
             target_crtc = present_get_crtc(window);
     }
 
-    present_get_ust_msc(screen, target_crtc, &ust, &crtc_msc);
+    ret = present_get_ust_msc(screen, target_crtc, &ust, &crtc_msc);
 
     target_msc = present_window_to_crtc_msc(window, target_crtc, window_msc, crtc_msc);
 
-    /* Stash the current MSC away in case we need it later
-     */
-    window_priv->msc = crtc_msc;
+    if (ret == Success) {
+        /* Stash the current MSC away in case we need it later
+         */
+        window_priv->msc = crtc_msc;
+    }
 
     /* Adjust target_msc to match modulus
      */
commit 2a561fac70c8b04305eab6372298a128e6553d3f
Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Sep 23 11:19:00 2015 +1000

    glx: fix regression with copy sub buffer disappearing
    
    So copy sub buffer isn't a core extensions it's a driver extension
    which means we are using totally the wrong interface to query for it
    here, which means bad things happen when you roll out this code,
    for instance MESA_copy_sub_buffer stops working.
    
    This is just the hack I'm sticking in Fedora to avoid the regression
    for now, but hopefully will inspire us.
    
    Reviewed-by: Adam Jackson <ajax at redhat.com>
    Signed-off-by: Dave Airlie <airlied at redhat.com>
    (cherry picked from commit 6da3f5d04f6a1cda0c858280f9561f9fbc323275)

diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c
index e25ca47..938d5bd 100644
--- a/glx/glxdriswrast.c
+++ b/glx/glxdriswrast.c
@@ -396,6 +396,9 @@ initializeExtensions(__GLXDRIscreen * screen)
     const __DRIextension **extensions;
     int i;
 
+    __glXEnableExtension(screen->glx_enable_bits, "GLX_MESA_copy_sub_buffer");
+    LogMessage(X_INFO, "AIGLX: enabled GLX_MESA_copy_sub_buffer\n");
+
     if (screen->swrast->base.version >= 3) {
         __glXEnableExtension(screen->glx_enable_bits,
                              "GLX_ARB_create_context");
@@ -416,8 +419,6 @@ initializeExtensions(__GLXDRIscreen * screen)
         if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0) {
             screen->copySubBuffer =
                 (const __DRIcopySubBufferExtension *) extensions[i];
-            __glXEnableExtension(screen->glx_enable_bits,
-                                 "GLX_MESA_copy_sub_buffer");
         }
 
         if (strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) {


More information about the xorg-commit mailing list