xserver: Branch 'server-1.7-branch' - 6 commits

Peter Hutterer whot at kemper.freedesktop.org
Sun Sep 27 05:10:51 PDT 2009


 Xi/exevents.c               |    2 +-
 configure.ac                |   28 ++++++++++++++++++----------
 exa/exa_migration_classic.c |   26 ++++++++++++++------------
 hw/dmx/Makefile.am          |    5 +----
 hw/dmx/dmx-config.h         |   13 -------------
 hw/dmx/input/dmxevents.c    |    8 ++++----
 mi/miinitext.c              |   12 ++++++++++++
 7 files changed, 50 insertions(+), 44 deletions(-)

New commits:
commit 0c6423b3d52af85cd990811f7be982c0b6ed7c32
Author: Michel Dänzer <daenzer at vmware.com>
Date:   Sun Sep 27 02:08:10 2009 +0200

    EXA: Fix mixed pixmaps crash with missing / failing UploadToScreen hook.
    
    For the recent mixed pixmaps changes, I failed to realize (or hit in my
    testing) a problem which can occur if the driver doesn't provide an
    UploadToScreen hook or provides one which can fail: There can be a crash
    in exaMemcpyBox() because exaCopyDirtyToFb() passes pExaPixmap->fb_ptr to
    exaCopyDirty(), but that's normally NULL with driver allocated pixmaps.
    
    The solution is to make exaCopyDirty*() no longer rely on pExaPixmap->fb_ptr
    but use pPixmap->devPrivate.ptr after PrepareAccess instead.
    
    Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24167 .
    (cherry picked from commit 73ae547d5e687ef10dea45801fc627e10ac4b659)

diff --git a/exa/exa_migration_classic.c b/exa/exa_migration_classic.c
index 0032f02..4819af8 100644
--- a/exa/exa_migration_classic.c
+++ b/exa/exa_migration_classic.c
@@ -104,9 +104,8 @@ exaPixmapShouldBeInFB (PixmapPtr pPix)
 static void
 exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
 	     Bool (*transfer) (PixmapPtr pPix, int x, int y, int w, int h,
-			       char *sys, int sys_pitch), CARD8 *fallback_src,
-	     CARD8 *fallback_dst, int fallback_srcpitch, int fallback_dstpitch,
-	     int fallback_index, void (*sync) (ScreenPtr pScreen))
+			       char *sys, int sys_pitch), int fallback_index,
+	     void (*sync) (ScreenPtr pScreen))
 {
     PixmapPtr pPixmap = migrate->pPix;
     ExaPixmapPriv (pPixmap);
@@ -228,9 +227,15 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
 		ExaDoPrepareAccess(pPixmap, fallback_index);
 		access_prepared = TRUE;
 	    }
-	    exaMemcpyBox (pPixmap, pBox,
-			  fallback_src, fallback_srcpitch,
-			  fallback_dst, fallback_dstpitch);
+	    if (fallback_index == EXA_PREPARE_DEST) {
+		exaMemcpyBox (pPixmap, pBox,
+			      pExaPixmap->sys_ptr, pExaPixmap->sys_pitch,
+			      pPixmap->devPrivate.ptr, pPixmap->devKind);
+	    } else {
+		exaMemcpyBox (pPixmap, pBox,
+			      pPixmap->devPrivate.ptr, pPixmap->devKind,
+			      pExaPixmap->sys_ptr, pExaPixmap->sys_pitch);
+	    }
 	} else
 	    need_sync = TRUE;
 
@@ -271,9 +276,8 @@ exaCopyDirtyToSys (ExaMigrationPtr migrate)
     ExaPixmapPriv (pPixmap);
 
     exaCopyDirty(migrate, &pExaPixmap->validSys, &pExaPixmap->validFB,
-		 pExaScr->info->DownloadFromScreen, pExaPixmap->fb_ptr,
-		 pExaPixmap->sys_ptr, pExaPixmap->fb_pitch,
-		 pExaPixmap->sys_pitch, EXA_PREPARE_SRC, exaWaitSync);
+		 pExaScr->info->DownloadFromScreen, EXA_PREPARE_SRC,
+		 exaWaitSync);
 }
 
 /**
@@ -289,9 +293,7 @@ exaCopyDirtyToFb (ExaMigrationPtr migrate)
     ExaPixmapPriv (pPixmap);
 
     exaCopyDirty(migrate, &pExaPixmap->validFB, &pExaPixmap->validSys,
-		 pExaScr->info->UploadToScreen, pExaPixmap->sys_ptr,
-		 pExaPixmap->fb_ptr, pExaPixmap->sys_pitch,
-		 pExaPixmap->fb_pitch, EXA_PREPARE_DEST, NULL);
+		 pExaScr->info->UploadToScreen, EXA_PREPARE_DEST, NULL);
 }
 
 /**
commit bb7c26e38c262614c5d1c21fc7a04c71a9028e51
Author: Kevin E Martin <kem at redhat.com>
Date:   Sat Sep 26 13:10:54 2009 +1000

    dmx: undefine MITSHM, move undefs to miinitext.c.
    
    This patch undefines MITSHM for dmx - we don't support the required
    screen->ModifyPixmapHeaders. All undefines are moved from dmx-config to
    miinitext.c, where they belong.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    (cherry picked from commit c9ec2bab2f258798fd6e6676698c732f09571a60)

diff --git a/hw/dmx/dmx-config.h b/hw/dmx/dmx-config.h
index 5b7b605..9791dc0 100644
--- a/hw/dmx/dmx-config.h
+++ b/hw/dmx/dmx-config.h
@@ -72,17 +72,4 @@
 /* Enable the DMX extension */
 #define DMXEXT
 
-/* Disable the extensions that are not currently supported */
-#undef MULTIBUFFER
-#undef XV
-#undef DBE
-#undef XF86VIDMODE
-#undef XFreeXDGA
-#undef XF86DRI
-#undef SCREENSAVER
-#undef RANDR
-#undef XFIXES
-#undef DAMAGE
-#undef COMPOSITE
-
 #endif /* DMX_CONFIG_H */
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 7f59126..0dca390 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -55,6 +55,18 @@ SOFTWARE.
 
 #ifdef HAVE_DMX_CONFIG_H
 #include <dmx-config.h>
+#undef MULTIBUFFER
+#undef XV
+#undef DBE
+#undef XF86VIDMODE
+#undef XFreeXDGA
+#undef XF86DRI
+#undef SCREENSAVER
+#undef RANDR
+#undef XFIXES
+#undef DAMAGE
+#undef COMPOSITE
+#undef MITSHM
 #endif
 
 #ifdef HAVE_XNEST_CONFIG_H
commit 72f0194be1558f244bad85197ccc50e17561df50
Author: Kevin E Martin <kem at redhat.com>
Date:   Sat Sep 26 13:09:52 2009 +1000

    dmx: reshuffle linker order to avoid errors when MITSHM is undefined.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    (cherry picked from commit fc9d733bab3ff0e4e51b19c73b66196dca563a70)

diff --git a/configure.ac b/configure.ac
index 6cdb8cf..422ef0b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1805,7 +1805,7 @@ if test "x$DMX" = xyes; then
 	fi
 	DMX_INCLUDES="$XEXT_INC $RENDER_INC $RECORD_INC"
 	XDMX_CFLAGS="$DMXMODULES_CFLAGS"
-	XDMX_LIBS="$XEXT_LIB $FB_LIB $CONFIG_LIB $FIXES_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB"
+	XDMX_LIBS="$FB_LIB $MI_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $XEXT_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/hw/dmx/Makefile.am b/hw/dmx/Makefile.am
index b31fbb8..3c59320 100644
--- a/hw/dmx/Makefile.am
+++ b/hw/dmx/Makefile.am
@@ -84,10 +84,7 @@ XDMX_LIBS = \
 	@XDMX_LIBS@ \
 	$(GLX_LIBS) \
         input/libdmxinput.a \
-        config/libdmxconfig.a \
-	$(MAIN_LIB) \
-	$(XSERVER_LIBS) \
-	$(top_builddir)/xfixes/libxfixes.la
+        config/libdmxconfig.a
 
 Xdmx_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
 Xdmx_DEPENDENCIES= $(XDMX_LIBS)
commit e4edb4f2e6ca960b68629783459920faa86d8671
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Sep 25 14:53:33 2009 +1000

    dmx: core events are always in screen coordinates when passed to GPE.
    
    This fixes input in dmx, the pointer appears at the right positions to the
    clients now.
    
    Also mark the spot where we pass in the button state as valuator to GPE
    with a FIXME. (??)
    
    Tested-by: Kevin Martin
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    (cherry picked from commit e7c2598f565e8252dd66ee3e6212b310856476cb)

diff --git a/hw/dmx/input/dmxevents.c b/hw/dmx/input/dmxevents.c
index 5c3d792..70737b4 100644
--- a/hw/dmx/input/dmxevents.c
+++ b/hw/dmx/input/dmxevents.c
@@ -183,7 +183,7 @@ static void enqueueMotion(DevicePtr pDev, int x, int y)
 
     GetEventList(&events);
     nevents = GetPointerEvents(events, p, MotionNotify, detail,
-                               POINTER_ABSOLUTE, 0, 2, valuators);
+                               POINTER_ABSOLUTE | POINTER_SCREEN, 0, 2, valuators);
     for (i = 0; i < nevents; i++)
        mieqEnqueue(p, (InternalEvent*)(events + i)->event);
     return;
@@ -688,7 +688,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
         detail = dmxGetButtonMapping(dmxLocal, detail);
         GetEventList(&events);
         nevents = GetPointerEvents(events, p, type, detail,
-                                   POINTER_ABSOLUTE,
+                                   POINTER_ABSOLUTE | POINTER_SCREEN,
                                    0,   /* first_valuator = 0 */
                                    0,   /* num_valuators = 0 */
                                    valuators);
@@ -700,9 +700,9 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
         GetEventList(&events);
         valuators[0] = e->xmotion.x;
         valuators[1] = e->xmotion.y;
-        valuators[2] = e->xmotion.state;
+        valuators[2] = e->xmotion.state; /* FIXME: WTF?? */
         nevents = GetPointerEvents(events, p, type, detail, 
-                                   POINTER_ABSOLUTE, 0, 3, valuators);
+                                   POINTER_ABSOLUTE | POINTER_SCREEN, 0, 3, valuators);
         for (i = 0; i < nevents; i++)
             mieqEnqueue(p, (InternalEvent*)(events + i)->event);
         return;
commit 7c9e0b07780b664ebbcee2d6be4bce645cb8c5b2
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Sep 24 14:07:26 2009 +1000

    Xi: update axisVals with the right subpixel data.
    
    Subpixel data in data_frac is stored as FP32.32, hence we need to get that
    down again before adding it to the current value.
    
    Reported-by: Thomas Jaeger
    Tested-by: Thomas Jaeger
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    (cherry picked from commit 9bd08c690fc687c4d69bb70536f3079a9184476d)

diff --git a/Xi/exevents.c b/Xi/exevents.c
index b0e0ede..2673552 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -805,7 +805,7 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event)
         {
             /* XXX: Relative/Absolute mode */
             v->axisVal[i] = event->valuators.data[i];
-            v->axisVal[i] += event->valuators.data_frac[i];
+            v->axisVal[i] += (event->valuators.data_frac[i] * 1.0f / (1 << 16) / (1 << 16));
         }
     }
 
commit 1745808c2939d7dc08d3d8acae425e5eeb6a16ca
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Wed Sep 23 21:49:11 2009 +1000

    configure: Unify all library defines that require a specific version.
    
    This patch moves all libraries that require a specific version into a single
    location instead or duplicating them across the configure.ac file.
    Libraries that do not require specific versions are left where they are.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    (cherry picked from commit 43a2eb794f19a2ba56d653f465fc5f6b2ff0d3d3)

diff --git a/configure.ac b/configure.ac
index 469c374..6cdb8cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -738,7 +738,15 @@ dnl Core modules for most extensions, et al.
 REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.11] [fixesproto >= 4.1] [damageproto >= 1.1] [xcmiscproto >= 1.2.0] [xextproto >= 7.0.99.3] [xproto >= 7.0.13] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] fontsproto [inputproto >= 1.9.99.902] [kbproto >= 1.0.3]"
 REQUIRED_LIBS="xfont xau [pixman-1 >= 0.15.20]"
 
+dnl List of libraries that require a specific version
+LIBAPPLEWM="applewm >= 1.4"
+LIBDRI="dri >= 7.1.0"
+LIBDRM="libdrm >= 2.3.0"
+LIBGL="gl >= 7.1.0"
 LIBXEXT="xext >= 1.0.99.4"
+LIBXI="xi >= 1.2.99.1"
+LIBPCIACCESS="pciaccess >= 0.8.0"
+LIBGLIB="glib-2.0 >= 2.16"
 
 dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas
 dnl CONFIG_DBUS_API is true if we want to enable the D-Bus config
@@ -903,7 +911,7 @@ fi
 
 if test "x$GLX" = xyes; then
 	PKG_CHECK_MODULES([XLIB], [x11])
-	PKG_CHECK_MODULES([GL], $GLPROTO [gl >= 7.1.0])
+	PKG_CHECK_MODULES([GL], $GLPROTO $LIBGL)
 	AC_SUBST(XLIB_CFLAGS)
 	AC_DEFINE(GLXEXT, 1, [Build GLX extension])
 	GLX_LIBS='$(top_builddir)/glx/libglx.la'
@@ -930,7 +938,7 @@ AM_CONDITIONAL(DRI, test "x$DRI" = xyes)
 if test "x$DRI" = xyes; then
 	AC_DEFINE(XF86DRI, 1, [Build DRI extension])
 	PKG_CHECK_MODULES([DRIPROTO], [$DRIPROTO])
-	PKG_CHECK_MODULES([DRI], $GLPROTO [dri >= 7.1.0])
+	PKG_CHECK_MODULES([DRI], $GLPROTO $LIBDRI)
 	AC_SUBST(DRIPROTO_CFLAGS)
 fi
 
@@ -948,7 +956,7 @@ esac
 AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes)
 
 if test "x$DRI" = xyes || test "x$DRI2" = xyes; then
-	PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.3.0])
+	PKG_CHECK_MODULES([LIBDRM], $LIBDRM)
 	AC_SUBST(LIBDRM_CFLAGS)
 	AC_SUBST(LIBDRM_LIBS)
 fi
@@ -1195,7 +1203,7 @@ AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes])
 
 # If unittests aren't explicitly disabled, check for required support
 if test "x$UNITTESTS" != xno ; then
-       PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16],
+       PKG_CHECK_MODULES([GLIB], $LIBGLIB,
                          [HAVE_GLIB=yes], [HAVE_GLIB=no])
 
        # Check if linker supports -wrap, passed via compiler flags
@@ -1442,7 +1450,7 @@ if test "x$XORG" = xyes; then
 	AC_SUBST([symbol_visibility])
 	dnl ===================================================================
 
-	PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
+	PKG_CHECK_MODULES([PCIACCESS], $LIBPCIACCESS)
 	SAVE_LIBS=$LIBS
 	SAVE_CFLAGS=$CFLAGS
 	CFLAGS=$PCIACCESS_CFLAGS
@@ -1748,7 +1756,7 @@ if test "x$XQUARTZ" = xyes; then
 
 	CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA"
 
-	PKG_CHECK_MODULES(XPBPROXY, $APPLEWMPROTO [applewm >= 1.4] xfixes x11)
+	PKG_CHECK_MODULES(XPBPROXY, $APPLEWMPROTO $LIBAPPLEWM xfixes x11)
 
         if test "x$XQUARTZ_SPARKLE" = xyes ; then
                 AC_DEFINE(XQUARTZ_SPARKLE,1,[Support application updating through sparkle.])
@@ -1777,7 +1785,7 @@ AM_CONDITIONAL(STANDALONE_XPBPROXY, [test "x$STANDALONE_XPBPROXY" = xyes])
 dnl DMX DDX
 
 PKG_CHECK_MODULES([DMXMODULES],
-    [xmuu $LIBXEXT x11 xrender xfixes xfont xi >= 1.2.99.1 $DMXPROTO xau $XDMCP_MODULES],
+    [xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES],
     [have_dmx=yes], [have_dmx=no])
 AC_MSG_CHECKING([whether to build Xdmx DDX])
 if test "x$DMX" = xauto; then
@@ -1816,7 +1824,7 @@ dnl Linux sources in DMX require <linux/keyboard.h>
 	AC_SUBST(DMXEXAMPLES_DEP_LIBS)
 	PKG_CHECK_MODULES([DMXXMUEXAMPLES_DEP], [dmx xmu $LIBXEXT x11])
 	AC_SUBST(DMXXMUEXAMPLES_DEP_LIBS)
-	PKG_CHECK_MODULES([DMXXIEXAMPLES_DEP], [dmx xi $LIBXEXT x11])
+	PKG_CHECK_MODULES([DMXXIEXAMPLES_DEP], [dmx $LIBXI $LIBXEXT x11])
 	AC_SUBST(DMXXIEXAMPLES_DEP_LIBS)
 	PKG_CHECK_MODULES([XTSTEXAMPLES_DEP], [xtst $LIBXEXT x11])
 	AC_SUBST(XTSTEXAMPLES_DEP_LIBS)
@@ -1896,7 +1904,7 @@ if test "$KDRIVE" = yes; then
         XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xv"
     fi
     if test "x$DRI" = xyes && test "x$GLX" = xyes; then
-        XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS gl libdrm"
+        XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS $LIBGL libdrm"
     fi
 
     PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [xephyr="yes"], [xephyr="no"])


More information about the xorg-commit mailing list