aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-11-07 08:26:06 +0100
committermarha <marha@users.sourceforge.net>2013-11-07 08:27:25 +0100
commitc97d11aec40d8fa07d6b456bf8694133a77d35f4 (patch)
tree9e14e6f970a86af9f7107053c5c709e2e440d032 /xorg-server
parent51c3a4e7b08aa904ff2af52a9f6f7adc748b361f (diff)
parentf7050e0ff2d1dd147ff5ef45f8ff7d8d7833db48 (diff)
downloadvcxsrv-c97d11aec40d8fa07d6b456bf8694133a77d35f4.tar.gz
vcxsrv-c97d11aec40d8fa07d6b456bf8694133a77d35f4.tar.bz2
vcxsrv-c97d11aec40d8fa07d6b456bf8694133a77d35f4.zip
Merge remote-tracking branch 'origin/released'
* origin/released: xextproto fontconfig libxcb mesa xserver git update 7 Nov 2013 Conflicts: xorg-server/include/servermd.h
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/Xext/sync.c8
-rw-r--r--xorg-server/configure.ac49
-rw-r--r--xorg-server/dri3/dri3.h6
-rw-r--r--xorg-server/hw/xfree86/Makefile.am7
-rw-r--r--xorg-server/hw/xfree86/common/compiler.h2
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_video.c3
-rw-r--r--xorg-server/hw/xfree86/sdksyms.sh3
-rw-r--r--xorg-server/include/dix-config.h.in3
-rw-r--r--xorg-server/include/servermd.h14
-rw-r--r--xorg-server/include/xorg-config.h.in3
-rw-r--r--xorg-server/include/xorg-server.h.in3
-rw-r--r--xorg-server/miext/sync/Makefile.am7
-rw-r--r--xorg-server/os/utils.c2
13 files changed, 102 insertions, 8 deletions
diff --git a/xorg-server/Xext/sync.c b/xorg-server/Xext/sync.c
index b956c9ec8..cd3f53e38 100644
--- a/xorg-server/Xext/sync.c
+++ b/xorg-server/Xext/sync.c
@@ -917,6 +917,7 @@ SyncCreate(ClientPtr client, XID id, unsigned char type)
int
SyncCreateFenceFromFD(ClientPtr client, DrawablePtr pDraw, XID id, int fd, BOOL initially_triggered)
{
+#if HAVE_XSHMFENCE
SyncFence *pFence;
int status;
@@ -934,12 +935,19 @@ SyncCreateFenceFromFD(ClientPtr client, DrawablePtr pDraw, XID id, int fd, BOOL
return BadAlloc;
return Success;
+#else
+ return BadImplementation;
+#endif
}
int
SyncFDFromFence(ClientPtr client, DrawablePtr pDraw, SyncFence *pFence)
{
+#if HAVE_XSHMFENCE
return miSyncFDFromFence(pDraw, pFence);
+#else
+ return BadImplementation;
+#endif
}
static SyncCounter *
diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac
index 0d855f250..6925df814 100644
--- a/xorg-server/configure.ac
+++ b/xorg-server/configure.ac
@@ -792,6 +792,7 @@ DMXPROTO="dmxproto >= 2.2.99.1"
VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1"
WINDOWSWMPROTO="windowswmproto"
APPLEWMPROTO="applewmproto >= 1.4"
+XSHMFENCE="xshmfence"
dnl Required modules
XPROTO="xproto >= 7.0.22"
@@ -1074,7 +1075,7 @@ if test "x$GLX" = xyes; then
AC_SUBST(XLIB_CFLAGS)
AC_DEFINE(GLXEXT, 1, [Build GLX extension])
GLX_LIBS='$(top_builddir)/glx/libglx.la'
- GLX_SYS_LIBS="$GLX_SYS_LIBS -lGL"
+ GLX_SYS_LIBS="$GLX_SYS_LIBS $GL_LIBS"
else
GLX=no
fi
@@ -1119,17 +1120,60 @@ AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes)
PKG_CHECK_MODULES([DRI3PROTO], $DRI3PROTO,
[HAVE_DRI3PROTO=yes], [HAVE_DRI3PROTO=no])
+
case "$DRI3,$HAVE_DRI3PROTO" in
+ yes,yes | auto,yes)
+ ;;
yes,no)
AC_MSG_ERROR([DRI3 requested, but dri3proto not found.])
+ DRI3=no
+ ;;
+ no,*)
+ ;;
+ *)
+ AC_MSG_NOTICE([DRI3 disabled because dri3proto not found.])
+ DRI3=no
;;
+esac
+
+PKG_CHECK_MODULES([XSHMFENCE], $XSHMFENCE,
+ [HAVE_XSHMFENCE=yes], [HAVE_XSHMFENCE=no])
+
+AM_CONDITIONAL(XSHMFENCE, test "x$HAVE_XSHMFENCE" = xyes)
+
+case x"$HAVE_XSHMFENCE" in
+ xyes)
+ AC_DEFINE(HAVE_XSHMFENCE, 1, [Have X Shared Memory Fence library])
+ REQUIRED_LIBS="$REQUIRED_LIBS xshmfence"
+ ;;
+esac
+
+
+case "$DRI3,$HAVE_XSHMFENCE" in
yes,yes | auto,yes)
- AC_DEFINE(DRI3, 1, [Build DRI3 extension])
+ ;;
+ yes,no)
+ AC_MSG_ERROR("DRI3 requested, but xshmfence not found.])
+ DRI3=no
+ ;;
+ no,*)
+ ;;
+ *)
+ AC_MSG_NOTICE([DRI3 disabled because xshmfence not found.])
+ DRI3=no
+ ;;
+esac
+
+case x"$DRI3" in
+ xyes|xauto)
DRI3=yes
+ AC_DEFINE(DRI3, 1, [Build DRI3 extension])
DRI3_LIB='$(top_builddir)/dri3/libdri3.la'
SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI3PROTO"
+ AC_MSG_NOTICE([DRI3 enabled]);
;;
esac
+
AM_CONDITIONAL(DRI3, test "x$DRI3" = xyes)
if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$DRI3" = xyes || test "x$CONFIG_UDEV_KMS" = xyes; then
@@ -1333,7 +1377,6 @@ if test "x$XDMAUTH" = xyes; then
XDMCP_MODULES="xdmcp"
fi
fi
-REQUIRED_LIBS="$REQUIRED_LIBS xshmfence"
AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path])
AC_DEFINE_DIR(SERVER_MISC_CONFIG_PATH, SERVERCONFIG, [Server miscellaneous config path])
diff --git a/xorg-server/dri3/dri3.h b/xorg-server/dri3/dri3.h
index 7774c8757..7c0c33018 100644
--- a/xorg-server/dri3/dri3.h
+++ b/xorg-server/dri3/dri3.h
@@ -23,6 +23,10 @@
#ifndef _DRI3_H_
#define _DRI3_H_
+#include <xorg-server.h>
+
+#ifdef DRI3
+
#include <X11/extensions/dri3proto.h>
#include <randrstr.h>
@@ -56,4 +60,6 @@ typedef struct dri3_screen_info {
extern _X_EXPORT Bool
dri3_screen_init(ScreenPtr screen, dri3_screen_info_ptr info);
+#endif
+
#endif /* _DRI3_H_ */
diff --git a/xorg-server/hw/xfree86/Makefile.am b/xorg-server/hw/xfree86/Makefile.am
index eea16a851..485386fc5 100644
--- a/xorg-server/hw/xfree86/Makefile.am
+++ b/xorg-server/hw/xfree86/Makefile.am
@@ -9,6 +9,11 @@ DRI2_SUBDIR = dri2
DRI2_LIB = dri2/libdri2.la
endif
+if DRI3
+DRI3_BUILDDIR = $(top_builddir)/dri3
+DRI3_LIB = $(DRI3_BUILDDIR)/libdri3.la
+endif
+
if XF86UTILS
XF86UTILS_SUBDIR = utils
endif
@@ -59,7 +64,7 @@ LOCAL_LIBS = \
dixmods/libxorgxkb.la \
$(DRI_LIB) \
$(DRI2_LIB) \
- $(top_builddir)/dri3/libdri3.la \
+ $(DRI3_LIB) \
$(top_builddir)/miext/sync/libsync.la \
$(top_builddir)/mi/libmi.la \
$(top_builddir)/os/libos.la
diff --git a/xorg-server/hw/xfree86/common/compiler.h b/xorg-server/hw/xfree86/common/compiler.h
index dc6f77318..afde9f9d3 100644
--- a/xorg-server/hw/xfree86/common/compiler.h
+++ b/xorg-server/hw/xfree86/common/compiler.h
@@ -1351,7 +1351,7 @@ stl_u(unsigned long val, unsigned int *p)
#else /* ix86 */
#if !defined(__SUNPRO_C)
-#if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__m32r__)
+#if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__m32r__) && !defined(__aarch64__)
#ifdef GCCUSESGAS
/*
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c
index d9a5da184..43d0a364a 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c
@@ -58,7 +58,8 @@ static Bool ExtendedEnabled = FALSE;
!defined(__sparc__) && \
!defined(__mips__) && \
!defined(__nds32__) && \
- !defined(__arm__)
+ !defined(__arm__) && \
+ !defined(__aarch64__)
/*
* Due to conflicts with "compiler.h", don't rely on <sys/io.h> to declare
diff --git a/xorg-server/hw/xfree86/sdksyms.sh b/xorg-server/hw/xfree86/sdksyms.sh
index 7c9734c07..d7f259d28 100644
--- a/xorg-server/hw/xfree86/sdksyms.sh
+++ b/xorg-server/hw/xfree86/sdksyms.sh
@@ -44,6 +44,9 @@ cat > sdksyms.c << EOF
/* miext/sync/Makefile.am */
#include "misync.h"
#include "misyncstr.h"
+#if HAVE_XSHMFENCE
+#include "misyncshm.h"
+#endif
/* Xext/Makefile.am -- half is module, half is builtin */
#ifdef XV
diff --git a/xorg-server/include/dix-config.h.in b/xorg-server/include/dix-config.h.in
index 397ee967a..156383bf8 100644
--- a/xorg-server/include/dix-config.h.in
+++ b/xorg-server/include/dix-config.h.in
@@ -449,4 +449,7 @@
#include "dix-config-apple-verbatim.h"
#endif
+/* Have support for X shared memory fence library (xshmfence) */
+#undef HAVE_XSHMFENCE
+
#endif /* _DIX_CONFIG_H_ */
diff --git a/xorg-server/include/servermd.h b/xorg-server/include/servermd.h
index be3963f4e..a7b9a686d 100644
--- a/xorg-server/include/servermd.h
+++ b/xorg-server/include/servermd.h
@@ -286,6 +286,20 @@ SOFTWARE.
#define GLYPHPADBYTES 4
#endif /* linux/s390 */
+#ifdef __aarch64__
+
+#ifdef __AARCH64EL__
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#endif
+#ifdef __AARCH64EB__
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#endif
+#define GLYPHPADBYTES 4
+
+#endif /* __aarch64__ */
+
#ifdef WIN32
#define IMAGE_BYTE_ORDER LSBFirst
#define BITMAP_BIT_ORDER LSBFirst
diff --git a/xorg-server/include/xorg-config.h.in b/xorg-server/include/xorg-config.h.in
index 487d7addb..e3444da91 100644
--- a/xorg-server/include/xorg-config.h.in
+++ b/xorg-server/include/xorg-config.h.in
@@ -145,4 +145,7 @@
/* Support APM/ACPI power management in the server */
#undef XF86PM
+/* Have support for X shared memory fence library (xshmfence) */
+#undef HAVE_XSHMFENCE
+
#endif /* _XORG_CONFIG_H_ */
diff --git a/xorg-server/include/xorg-server.h.in b/xorg-server/include/xorg-server.h.in
index 1281b3e5e..960817e68 100644
--- a/xorg-server/include/xorg-server.h.in
+++ b/xorg-server/include/xorg-server.h.in
@@ -218,4 +218,7 @@
#define _XSERVER64 1
#endif
+/* Have support for X shared memory fence library (xshmfence) */
+#undef HAVE_XSHMFENCE
+
#endif /* _XORG_SERVER_H_ */
diff --git a/xorg-server/miext/sync/Makefile.am b/xorg-server/miext/sync/Makefile.am
index e25ceacb0..ac13c52e2 100644
--- a/xorg-server/miext/sync/Makefile.am
+++ b/xorg-server/miext/sync/Makefile.am
@@ -8,8 +8,13 @@ if XORG
sdk_HEADERS = misync.h misyncstr.h misyncshm.h
endif
+XSHMFENCE_SRCS = misyncshm.c
+
libsync_la_SOURCES = \
misync.c \
misync.h \
- misyncshm.c \
misyncstr.h
+
+if XSHMFENCE
+libsync_la_SOURCES += $(XSHMFENCE_SRCS)
+endif
diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c
index 202e5da06..c40a938f7 100644
--- a/xorg-server/os/utils.c
+++ b/xorg-server/os/utils.c
@@ -501,7 +501,7 @@ GetTimeInMicros(void)
else
clockid = ~0L;
}
- if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
+ if (clockid != ~0L && clock_gettime(clockid, &tp) == 0)
return (CARD64) tp.tv_sec * (CARD64)1000000 + tp.tv_nsec / 1000;
#endif