xserver: Branch 'server-1.13-branch' - 4 commits

Matt Dew marcoz at kemper.freedesktop.org
Sun Dec 30 14:28:20 PST 2012


 hw/vfb/InitOutput.c        |   19 +++++++++++++++++++
 hw/xquartz/darwin.c        |   16 +++++++++-------
 hw/xquartz/xpr/dri.c       |    6 ++++++
 hw/xquartz/xpr/xprFrame.c  |   28 ++++++++++++++++++++++++++++
 hw/xquartz/xpr/xprScreen.c |    5 +++++
 5 files changed, 67 insertions(+), 7 deletions(-)

New commits:
commit 65642ccb78aa2d4c4e17b9ac42e4ef625c4a6e8b
Author: Raphael Kubo da Costa <raphael.kubo.da.costa at intel.com>
Date:   Fri Nov 16 19:51:58 2012 +0200

    vfb: Initialize the GLX extension again.
    
    This should fix a regression in the 1.13.0 release: commit
    5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86 removed a code path used by Xvfb
    and made it use the default one when initializing extensions. However, this
    meant the GLX extension was not initialized anymore since it is not part of
    the `staticExtensions' array.
    
    Since it is not possible to just add it to that array after commit
    aad428b8e21c77397c623b78706eb64b1fea77c9, adopt an approach similar to
    xwin's and xquartz's and initialize the extension from vfb's `InitOutput'.
    
    Signed-off-by: Raphael Kubo da Costa <raphael.kubo.da.costa at intel.com>
    Reviewed-by: Daniel Stone <daniel at fooishbar.org>

diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index 955624f..5f20a1e 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -66,6 +66,7 @@ from The Open Group.
 #endif                          /* HAS_SHM */
 #include "dix.h"
 #include "miline.h"
+#include "glx_extinit.h"
 
 #define VFB_DEFAULT_WIDTH      1280
 #define VFB_DEFAULT_HEIGHT     1024
@@ -885,12 +886,30 @@ vfbScreenInit(ScreenPtr pScreen, int argc, char **argv)
 
 }                               /* end vfbScreenInit */
 
+static const ExtensionModule vfbExtensions[] = {
+#ifdef GLXEXT
+    { GlxExtensionInit, "GLX", &noGlxExtension },
+#endif
+};
+
+static
+void vfbExtensionInit(void)
+{
+    int i;
+
+    for (i = 0; i < ARRAY_SIZE(vfbExtensions); i++)
+        LoadExtension(&vfbExtensions[i], TRUE);
+}
+
 void
 InitOutput(ScreenInfo * screenInfo, int argc, char **argv)
 {
     int i;
     int NumFormats = 0;
 
+    if (serverGeneration == 1)
+        vfbExtensionInit();
+
     /* initialize pixmap formats */
 
     /* must have a pixmap depth to match every screen depth */
commit e348e4afc5323779b686ee8ff2f094359664c42e
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Tue Dec 18 01:29:12 2012 -0800

    XQuartz: Don't add the 15bit visual any more
    
    Mountain Lion only supports 32bit backing stores, so don't use 15bit visuals until libXplugin adapts
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
    (cherry picked from commit ba4bb3bc1b87eb57cc34d2ad1f302c9d2a15c847)

diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index d26f18a..b3a1fb3 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -231,13 +231,15 @@ DarwinScreenInit(ScreenPtr pScreen, int argc, char **argv)
     }
 
     // TODO: Make PseudoColor visuals not suck in TrueColor mode
-    //    if(dfb->depth > 8)
-    //        miSetVisualTypesAndMasks(8, PseudoColorMask, 8, PseudoColor, 0, 0, 0);
-    if (dfb->depth > 15)
-        miSetVisualTypesAndMasks(15, TrueColorMask, 5, TrueColor,
-                                 RM_ARGB(0, 5, 5, 5), GM_ARGB(0, 5, 5,
-                                                              5),
-                                 BM_ARGB(0, 5, 5, 5));
+    // if(dfb->depth > 8)
+    //    miSetVisualTypesAndMasks(8, PseudoColorMask, 8, PseudoColor, 0, 0, 0);
+    //
+    // TODO: Re-add support for 15bit
+    // if (dfb->depth > 15)
+    //    miSetVisualTypesAndMasks(15, TrueColorMask, 5, TrueColor,
+    //                             RM_ARGB(0, 5, 5, 5), GM_ARGB(0, 5, 5,
+    //                                                          5),
+    //                             BM_ARGB(0, 5, 5, 5));
     if (dfb->depth > 24)
         miSetVisualTypesAndMasks(24, TrueColorMask, 8, TrueColor,
                                  RM_ARGB(0, 8, 8, 8), GM_ARGB(0, 8, 8,
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index efe2aa8..e376019 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -359,6 +359,10 @@ have_depth:
         dfb->blueMask = 0;
         break;
 
+#if 0
+    // Removed because Mountain Lion removed support for
+    // 15bit backing stores.  We can possibly re-add
+    // this once libXplugin is updated to work around it.
     case 15:
         dfb->visuals = TrueColorMask;     //LARGE_VISUALS;
         dfb->preferredCVC = TrueColor;
@@ -369,6 +373,7 @@ have_depth:
         dfb->greenMask = GM_ARGB(0, 5, 5, 5);
         dfb->blueMask = BM_ARGB(0, 5, 5, 5);
         break;
+#endif
 
     //        case 24:
     default:
commit 34fb39a960898f5a0bcc67f76f385ba8a91ea2ba
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Thu Sep 20 21:11:21 2012 -0700

    XQuartz: Add some verbose logging to debug xp_lock_window being unbalanced
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
    (cherry picked from commit f54987de97720200ee94eba1c7a737d4ad8c55c8)

diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c
index 01f1def..aad375b 100644
--- a/hw/xquartz/xpr/xprFrame.c
+++ b/hw/xquartz/xpr/xprFrame.c
@@ -49,6 +49,10 @@
 #include <pthread.h>
 #endif
 
+#ifdef DEBUG_XP_LOCK_WINDOW
+#include <execinfo.h>
+#endif
+
 #define DEFINE_ATOM_HELPER(func, atom_name)                      \
     static Atom func(void) {                                       \
         static int generation;                                      \
@@ -376,6 +380,18 @@ xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
     unsigned int rowbytes[2];
     xp_error err;
 
+#ifdef DEBUG_XP_LOCK_WINDOW
+    void* callstack[128];
+    int i, frames = backtrace(callstack, 128);
+    char** strs = backtrace_symbols(callstack, frames);
+
+    ErrorF("=== LOCK %d ===\n", (int)x_cvt_vptr_to_uint(wid));
+    for (i = 0; i < frames; ++i) {
+        ErrorF("    %s\n", strs[i]);
+    }
+    free(strs);
+#endif
+
     err = xp_lock_window(x_cvt_vptr_to_uint(
                              wid), NULL, NULL, data, rowbytes, NULL);
     if (err != Success)
@@ -395,6 +411,18 @@ xprStopDrawing(RootlessFrameID wid, Bool flush)
 {
     xp_error err;
 
+#ifdef DEBUG_XP_LOCK_WINDOW
+    void* callstack[128];
+    int i, frames = backtrace(callstack, 128);
+    char** strs = backtrace_symbols(callstack, frames);
+
+    ErrorF("=== UNLOCK %d ===\n", (int)x_cvt_vptr_to_uint(wid));
+    for (i = 0; i < frames; ++i) {
+        ErrorF("    %s\n", strs[i]);
+    }
+    free(strs);
+#endif
+
     err = xp_unlock_window(x_cvt_vptr_to_uint(wid), flush);
     /* This should be a FatalError, but we started tripping over it.  Make it a
      * FatalError after http://xquartz.macosforge.org/trac/ticket/482 is fixed.
commit 06e2ecd0df9b81dd518ae6017ec42765520e2e93
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Thu Sep 20 21:49:40 2012 -0700

    XQuartz: Avoid a possible deadlock with DRI on OS X 10.7.5 and OS X 10.8.2
    
    <rdar://problem/12338921>
    http://bugs.winehq.org/show_bug.cgi?id=31751
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
    (cherry picked from commit 25d26875bc9bd6fd23ae1b5280f015abf1b033b7)

diff --git a/hw/xquartz/xpr/dri.c b/hw/xquartz/xpr/dri.c
index 03af163..adba69c 100644
--- a/hw/xquartz/xpr/dri.c
+++ b/hw/xquartz/xpr/dri.c
@@ -64,6 +64,7 @@
 #include "mi.h"
 #include "mipointer.h"
 #include "rootless.h"
+#include "rootlessCommon.h"
 #include "x-hash.h"
 #include "x-hook.h"
 #include "driWrap.h"
@@ -380,6 +381,11 @@ DRICreateSurface(ScreenPtr pScreen, Drawable id,
     DRIDrawablePrivPtr pDRIDrawablePriv;
 
     if (pDrawable->type == DRAWABLE_WINDOW) {
+        /* <rdar://problem/12338921>
+         * http://bugs.winehq.org/show_bug.cgi?id=31751
+         */
+        RootlessStopDrawing((WindowPtr)pDrawable, FALSE);
+
         pDRIDrawablePriv = CreateSurfaceForWindow(pScreen,
                                                   (WindowPtr)pDrawable, &wid);
 


More information about the xorg-commit mailing list