Hi,
The patch below updates the X server to version 1.20.8.
Apply the patch in ${XSRCDIR}/xserver with patch -p0 -E and then
rebuild Xenocara according to release(8).
Comments, ok ?
Index: ChangeLog
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/ChangeLog,v
retrieving revision 1.35
diff -u -p -u -r1.35 ChangeLog
--- ChangeLog 26 Jan 2020 13:48:54 -0000 1.35
+++ ChangeLog 2 Apr 2020 17:59:06 -0000
@@ -1,3 +1,414 @@
+commit f84ad082557f9cde6b8faa373eca6a0a89ba7d56
+Author: Matt Turner <[email protected]>
+Date: Sun Mar 29 13:02:03 2020 -0700
+
+ xserver 1.20.8
+
+ Signed-off-by: Matt Turner <[email protected]>
+
+commit 8837279869309317c110afb6f2f3c24484c77657
+Author: Jon Turney <[email protected]>
+Date: Wed Apr 17 11:37:11 2019 +0100
+
+ Fix old-style definition warning for xf86OSInputThreadInit()
+
+ ../hw/xfree86/os-support/stub/stub_init.c: In function
‘xf86OSInputThreadInit’:
+ ../hw/xfree86/os-support/stub/stub_init.c:29:1: warning: old-style
function definition [-Wold-style-definition]
+
+ (cherry picked from commit 7c266cafed14b38c039091651069ae9888c3a8ae)
+
+commit 0c012f968b4e02a2bc892ce71f7bea9bd3f7fb22
+Author: Jon Turney <[email protected]>
+Date: Wed Mar 13 14:57:14 2019 +0000
+
+ Add xf86OSInputThreadInit to stub os-support as well
+
+ stub os support also needs to provide xf86OSInputThreadInit, omitted in
+ ea1527a8
+
+ (cherry picked from commit c020769dbfb965740c8441d8242b738ef572a7c9)
+
+commit b259485975078087fe6bde2b9e1eccf4ae14120c
+Author: Michel Dänzer <[email protected]>
+Date: Tue Mar 17 11:45:22 2020 +0100
+
+ xwayland: Delete all frame_callback_list nodes in xwl_unrealize_window
+
+ We were only calling xwl_present_unrealize_window for the toplevel
+ window, but the list can contain entries from child windows as well,
+ in which case we were leaving dangling pointers to freed memory.
+
+ Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/1000
+ Fixes: c5067feaeea1 "xwayland: Use single frame callback for Present
+ flips and normal updates"
+ Reviewed-by: Olivier Fourdan <[email protected]>
+ Tested-by: Olivier Fourdan <[email protected]>
+ (cherry picked from commit 5e91587302e85fd6f0e8d5ffbe30182e18c6913f)
+
+commit a033571644d277dc49a489f7ae32c4ad92856543
+Author: Jonas Ådahl <[email protected]>
+Date: Fri Sep 13 17:11:27 2019 +0200
+
+ xwayland/glamor-gbm: Handle DRM_FORMAT_MOD_INVALID gracefully
+
+ The compositor may send DRM_FORMAT_MOD_INVALID instead of a list of
+ modifiers for various reasons. Handle this gracefully by ignoring it.
+
+ Without this, if a compositor would send DRM_FORMAT_MOD_INVALID, it'd
+ result in empty windows provided by Xwayland.
+
+ Signed-off-by: Jonas Ådahl <[email protected]>
+ Reviewed-by: Olivier Fourdan <[email protected]>
+ Reviewed-by: Michel Dänzer <[email protected]>
+ (cherry picked from commit edf964434eac10ffbe27cc883e3ab95505669aee)
+
+commit 3c48bd50ad33f2a533ac76afa38d6e3906ebc28a
+Author: Arthur Williams <[email protected]>
+Date: Sun Oct 6 18:55:35 2019 +0000
+
+ dix: Check for NULL spriteInfo in GetPairedDevice
+
+ There is a race when reseting the XServer that causes spriteInfo to be
+ NULL in GetPairedDevice resulting a segfault and subsequent crash. The
+ problem was noticed when opening a connection, creating master devices,
+ destroying master devices and closing the connection during testing.
+
+ Signed-off-by: Arthur Williams <[email protected]>
+
+
+ (cherry picked from commit e693c9657f98c334e9921ca2f8ebf710497c0c6a)
+
+commit 1610ef1d6b5ba99da9d1a639f3b65b2e61514a7d
+Author: David Seifert <[email protected]>
+Date: Fri Jan 24 12:49:44 2020 +0100
+
+ Fix building with `-fno-common`
+
+ * GCC 10 will switch the default to `-fno-common`.
+ https://gcc.gnu.org/PR85678
+
+ Bug: https://bugs.gentoo.org/705880
+ Signed-off-by: Matt Turner <[email protected]>
+
+commit 2a185dd22ddb5b0d7d2ef5948591028766bb9530
+Author: Michel Dänzer <[email protected]>
+Date: Mon Mar 2 18:09:31 2020 +0100
+
+ xwayland: Use frame callbacks for Present vblank events
+
+ Instead of only the fallback timer.
+
+ Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/854
+
+ v2:
+ * Drop unused frame_callback member of struct xwl_present_window
+ (Olivier Fourdan)
+
+ Reviewed-by: Olivier Fourdan <[email protected]>
+ (cherry picked from commit 9b31358c52e951883bf7c01c953a9da080542244)
+
+commit 99a6d6b15e0757a4652a569a1b2070c76a00b567
+Author: Michel Dänzer <[email protected]>
+Date: Wed Nov 27 18:04:06 2019 +0100
+
+ xwayland: Use single frame callback for Present flips and normal updates
+
+ Using a list of Present windows that need to be called back.
+
+ This prepares for the following change, there should be no change in
+ observed behaviour.
+
+ v2:
+ * Use xwl_window_create_frame_callback instead of making the
+ frame_listener struct non-static (Olivier Fourdan)
+
+ Reviewed-by: Olivier Fourdan <[email protected]>
+ (cherry picked from commit c5067feaeea115761f0a72f37407c6e5e943d1a1)
+
+commit 915cc107767624bd7914c962347bab9c2e21cdff
+Author: Michel Dänzer <[email protected]>
+Date: Fri Dec 13 18:26:35 2019 +0100
+
+ xwayland: Add xwl_window_create_frame_callback helper
+
+ This will be used by the following changes. No functional change
+ intended.
+
+ Reviewed-by: Olivier Fourdan <[email protected]>
+ (cherry picked from commit f80eea0529b2cfb805a9c7d4994a4235451131e3)
+
+commit 94dad4f05133171805ee94095bbcd20ece754eba
+Author: Dor Askayo <[email protected]>
+Date: Wed Feb 19 17:22:11 2020 +0100
+
+ xwayland: clear pixmaps after creation in rootless mode
+
+ When a pixmap is created with a backing FBO, the FBO should be cleared
+ to avoid rendering uninitialized memory. This could happen when the
+ pixmap is rendered without being filled in its entirety.
+
+ One example is when a top-level window without a background is
+ resized. The pixmap would be reallocated to prepare for more pixels,
+ but uninitialized memory would be rendered in the resize offset until
+ the client sends a frame that fills these additional pixels.
+
+ Another example is when a new top-level window is created without a
+ background. Uninitialized memory would be rendered after the pixmap is
+ allocated and before the client sends its first frame.
+
+ This issue is only apparent in OpenGL implementations that don't zero
+ the VRAM of allocated buffers by default, such as RadeonSI.
+
+ Signed-off-by: Dor Askayo <[email protected]>
+ Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/636
+ Reviewed-by: Michel Dänzer <[email protected]>
+ (cherry picked from commit 0e9a0c203c2ae4eae12bdbb95428f398211c7bee)
+
+ [ Michel Dänzer:
+ * Squashed in commit ebf549db2d9341d99e0d0847b948dd798d98f7dc
+ * Dropped code related to glamor_format, which only exists on master ]
+
+commit 0238359bced17f9db0e266111897d154ab117d68
+Author: Michel Dänzer <[email protected]>
+Date: Fri Feb 7 12:15:07 2020 +0100
+
+ xwayland: Call glamor_block_handler from xwl_screen_post_damage
+
+ In between the two phases introduced by the previous change. This makes
+ sure all pending drawing to the new buffers is flushed before they're
+ committed to the Wayland server.
+ (cherry picked from commit a542224ea28e2e8ccaf5e0df85bf6c603e97599a)
+
+commit a93bce6bfc6c610676a7fbc76639854c5553cb2c
+Author: Michel Dänzer <[email protected]>
+Date: Fri Feb 7 12:06:39 2020 +0100
+
+ xwayland: Split up xwl_screen_post_damage into two phases
+
+ The first phase sets the new surface properties for all damaged
+ windows, then the second phase commits all surface updates.
+
+ This is preparatory for the next change, there should be no observable
+ change in behaviour (other than the order of Wayland protocol
+ requests).
+
+ Reviewed-by: Adam Jackson <[email protected]>
+ (cherry picked from commit f88d9b1f779835302e02e255fcd45989db7f488d)
+
+commit 1ba5e528d52ed9d7d67eb45c5d3e04b6f5d22b05
+Author: Maarten Lankhorst <[email protected]>
+Date: Thu Apr 25 11:46:41 2019 +0200
+
+ modesetting: Disable atomic support by default
+
+ The atomic driver has issues with modesetting when stealing
+ connectors from a different crtc, a black screen when doing rotation
+ on a different crtc, and in general is just a mapping of the legacy
+ helpers to atomic. This is already done in the kernel, so just
+ fallback to legacy by default until this is fixed.
+
+ Please backport to 1.20, as we don't want to enable it for everyone
+ there. It breaks for existing users.
+
+ The fixes to make the xserver more atomic have been pending on the
+ mailing list for ages.
+
+ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110375
+ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110030
+ References:
https://gitlab.freedesktop.org/xorg/xserver/merge_requests/36/commits
+ Signed-off-by: Maarten Lankhorst <[email protected]>
+ (cherry picked from commit f0d78b47ac49977a6007f5fe081f00c6eb19a12e)
+
+commit d44bbb4710961651dcf10701bc562f1f01509010
+Author: Eric Anholt <[email protected]>
+Date: Mon Feb 10 10:22:34 2020 +0100
+
+ glamor: Fix a compiler warning since the recent OOM fixes.
+
+ Signed-off-by: Eric Anholt <[email protected]>
+ (cherry picked from commit 3b26b90cb787a14fa5f8bb2033eab8ab6562a9a5)
+
+commit d2a6c8708ca4f27c8d9aade6db2c4e7f2d8c624f
+Author: Paul Kocialkowski <[email protected]>
+Date: Mon Feb 10 10:21:02 2020 +0100
+
+ glamor: Fallback to system memory for RW PBO buffer allocation
+
+ We currently support two modes of operation for RW PBO buffers: one
+ that allocates a pack buffer with GL memory and one that uses system
+ memory when the former is not supported.
+
+ Since allocation with system memory is less likely to fail, add a
+ fallback to system memory when GL memory failed instead of bailing
+ out.
+
+ Signed-off-by: Paul Kocialkowski <[email protected]>
+ (cherry picked from commit 8c4e8d9eff03cefc987f13c900b0a47403946127)
+
+commit ca034c2f2cfff8e49b816b8ecbaa96215b796e36
+Author: Paul Kocialkowski <[email protected]>
+Date: Mon Feb 10 10:20:30 2020 +0100
+
+ glamor: Propagate glamor_prepare_access failures in copy helpers
+
+ glamor_prepare_access can fail for a few reasons, especially when
+ failing to allocate a PBO buffer. Take this in account and bail in
+ the copy helpers that call the helper when a failure happens.
+
+ Signed-off-by: Paul Kocialkowski <[email protected]>
+ (cherry picked from commit de6b3fac1f26075ce915006c914c4a4755617715)
+
+commit a7b165d994d74131778a5a9bcffec957f1d1cacb
+Author: Paul Kocialkowski <[email protected]>
+Date: Mon Feb 10 10:20:04 2020 +0100
+
+ glamor: Error out on out-of-memory when allocating PBO for FBO access
+
+ Packed buffer allocation (which happens at glBufferData time with the
+ buffer bound) can fail when there is no GL memory left.
+
+ Pick up the error when it happens, print a proper error message, do
+ some cleanup and bail.
+
+ Signed-off-by: Paul Kocialkowski <[email protected]>
+ (cherry picked from commit bc2e12239f86e5a4acd220744f42eb83ba55d328)
+
+commit 428b5ce4da99a43bfa0c1933ec447f7feb3639a1
+Author: Paul Kocialkowski <[email protected]>
+Date: Mon Feb 10 10:19:18 2020 +0100
+
+ glamor: Propagate FBO allocation failure for picture to texture upload
+
+ When uploading a picture to a texture, glamor_upload_picture_to_texture
+ calls glamor_pixmap_ensure_fbo to ensure that there is backing FBO.
+ The FBO will be allocated if the picture's drawable pixmap does not have
+ one already, which can fail when there is no GL memory left.
+
+ glamor_upload_picture_to_texture checks that the call succeeded and will
+ enter the failure path if it did not. However, unlike many other
+ functions in glamor, this one has ret set to TRUE initially, so it needs
+ to be set to FALSE when a failure happens.
+
+ Otherwise, the error is not propagated and the failure path return TRUE.
+ This leads to a fault when trying to access the FBO pointer later on.
+
+ Signed-off-by: Paul Kocialkowski <[email protected]>
+ (cherry picked from commit c98c7709c67d8ed6b7455ec700a49b58c396ec2c)
+
+commit 948afd768398955f043fef8e14d7d154cea25f85
+Author: Dave Airlie <[email protected]>
+Date: Thu Feb 6 17:59:08 2020 +0100
+
+ modesetting: remove unnecessary error message, fix zaphod leases
+
+ I introduced this error with the MST hotplug code, but it can trigger
+ on zaphod setups, and is perfectly fine. There is no support for
+ MST/hotplug on zaphod setups currently, so we can just skip over
+ the dynamic connector handling here. However we shouldn't skip
+ over the lease handling so move it into the codepath.
+
+ Fixes: 9257b1252da9 ("modesetting: add dynamic connector hotplug support
(MST) (v3)")
+ Reviewed-by: Michel Dänzer <[email protected]>
+ Signed-off-by: Dave Airlie <[email protected]>
+ (cherry picked from commit 1cfdd1a96580733df3625bcea3384ffee3dc92df)
+
+commit 1c3e51dabadbf65e7fdedbebbdcd19a85fb03e34
+Author: Michel Dänzer <[email protected]>
+Date: Thu Feb 6 17:57:16 2020 +0100
+
+ xfree86/modes: Bail from xf86RotateRedisplay if pScreen->root is NULL
+
+ Avoids a crash in xf86RotatePrepare -> DamageRegister during
+ CreateScreenResources if rotation or another transform is configured for
+ any connected RandR output in xorg.conf. The generic rotation/transform
+ code generally can't work without the root window currently.
+
+ Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/969
+ Fixes: 094f42cdfe5d "xfree86/modes: Call xf86RotateRedisplay from
+ xf86CrtcRotate"
+ Acked-by: Olivier Fourdan <[email protected]>
+ Reviewed-by: Adam Jackson <[email protected]>
+ (cherry picked from commit 6a5e47c57d16de8b6a6a2636f3cbad1aebec32e2)
+
+commit af2fd88b1019f63fe3ce871f9e99b3e1e4608b25
+Author: Daniel Llewellyn <[email protected]>
+Date: Thu Feb 6 17:56:12 2020 +0100
+
+ os: Ignore dying client in ResetCurrentRequest
+
+ You might as well, it's harmless. Better, some cleanup code (like DRI2
+ swap wait) needs to run both normally and at client exit, so it
+ simplifies the callers to not need to check first. See 4308f5d3 for a
+ similar example.
+
+ Props: @ajax (Adam Jackson)
+
+ Fixes: xorg/xserver#211
+
+ Signed-off-by: Daniel Llewellyn <[email protected]>
+ (cherry picked from commit 578371616e09364318c9fb2371a693d438b31b29)
+
+commit e5293f1c5d7b20d98ed4975dc29a6f88c8bc6a0d
+Author: Adam Jackson <[email protected]>
+Date: Thu Feb 6 17:55:25 2020 +0100
+
+ Revert "dri2: Don't make reference to noClientException"
+
+ It's true that the value would always be -1, if it's not zero, but it's
+ usually zero is the problem. As a result we return failure from
+ otherwise successful indirect GLX paths, which isn't very nice of us.
+
+ This reverts commit 7d33ab0f8c7958b205076f71e4b47c24aace77fd.
+
+ Fixes: https://gitlab.freedesktop.org/xorg/xserver/issues/211
+ (cherry picked from commit e1fa3beb2fe2519e69f859f0acdc68e5a770de27)
+
+commit d845ceae53bb425695e6a185b51ae1b432dd4672
+Author: George Matsumura <[email protected]>
+Date: Thu Feb 6 17:54:36 2020 +0100
+
+ Restrict 1x1 pixmap filling optimization to GXcopy
+
+ This restricts an optimization whereby the filling of 1x1 pixmaps
+ went around the driver-provided function to cases where the
+ source color is meant to be directly copied to the destination,
+ as opposed to other operations which should produce different
+ destination values than just the foreground color.
+
+ Signed-off-by: George Matsumura <[email protected]>
+ Reviewed-by: Michel Dänzer <[email protected]>
+ (cherry picked from commit 83826075e59c0393c16d2a2482dc5c9f2fdf4564)
+
+commit c2ef88c4d3a551ff7646bfb86550cae32b02a510
+Author: Michel Dänzer <[email protected]>
+Date: Tue Jan 14 09:23:34 2020 +0100
+
+ modesetting: Explicitly #include "mi.h"
+
+ For the miClearDrawable prototype. Apparently it doesn't get pulled in
+ for some build configurations, breaking the build.
+
+ Reviewed-by: Kenneth Graunke <[email protected]>
+ (cherry picked from commit a24a786fc8490fda08b15c3dab6fa6750f008ecb)
+
+commit ad7364d8d7f936b9b08195e47d2f6ee9329ff687
+Author: Kenneth Graunke <[email protected]>
+Date: Mon Jan 13 23:34:49 2020 -0800
+
+ configure: Define GLAMOR_HAS_EGL_QUERY_DRIVER when available
+
+ Commit 195c2ef8f9f07b9bdabc0f554a9033b7857b99c7 added this to the Meson
+ build but neglected to add it to autotools.
+
+ v2: Also update dix-config.h.in
+
+ Fixes: 195c2ef8f ("glamor: Add a function to get the driver name via
EGL_MESA_query_driver")
+
+ Reviewed-by: Michel Dänzer <[email protected]> [v1]
+ Reviewed-by: Eric Engestrom <[email protected]> [v1]
+ Reviewed-by: Matt Turner <[email protected]>
+ (cherry picked from commit 25ca99df38a2c28c25ab20a917e68442285f2353)
+
commit 489f4191f3c881c6c8acce97ec612167a4ae0f33
Author: Matt Turner <[email protected]>
Date: Mon Jan 13 14:47:48 2020 -0800
Index: configure
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/configure,v
retrieving revision 1.73
diff -u -p -u -r1.73 configure
--- configure 26 Jan 2020 13:48:54 -0000 1.73
+++ configure 2 Apr 2020 17:59:11 -0000
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for xorg-server 1.20.7.
+# Generated by GNU Autoconf 2.69 for xorg-server 1.20.8.
#
# Report bugs to <https://gitlab.freedesktop.org/xorg/xserver/issues>.
#
@@ -651,8 +651,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='xorg-server'
PACKAGE_TARNAME='xorg-server'
-PACKAGE_VERSION='1.20.7'
-PACKAGE_STRING='xorg-server 1.20.7'
+PACKAGE_VERSION='1.20.8'
+PACKAGE_STRING='xorg-server 1.20.8'
PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/xserver/issues'
PACKAGE_URL=''
@@ -2045,7 +2045,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures xorg-server 1.20.7 to adapt to many kinds of systems.
+\`configure' configures xorg-server 1.20.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -2115,7 +2115,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of xorg-server 1.20.7:";;
+ short | recursive ) echo "Configuration of xorg-server 1.20.8:";;
esac
cat <<\_ACEOF
@@ -2310,10 +2310,10 @@ Optional Packages:
org.x)
--with-bundle-version=VERSION
Version to use for X11.app's CFBundleVersion
- (default: 1.20.7)
+ (default: 1.20.8)
--with-bundle-version-string=VERSION
Version to use for X11.app's
- CFBundleShortVersionString (default: 1.20.7)
+ CFBundleShortVersionString (default: 1.20.8)
--with-sparkle-feed-url=URL
URL for the Sparkle feed (default:
https://www.xquartz.org/releases/sparkle/release.xml)
@@ -2568,7 +2568,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-xorg-server configure 1.20.7
+xorg-server configure 1.20.8
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -3277,7 +3277,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by xorg-server $as_me 1.20.7, which was
+It was created by xorg-server $as_me 1.20.8, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3625,8 +3625,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLA
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-RELEASE_DATE="2020-01-13"
-RELEASE_NAME="Stuffed French Toast"
+RELEASE_DATE="2020-03-29"
+RELEASE_NAME="Chicken Parmigiana"
am__api_version='1.12'
@@ -4105,7 +4105,7 @@ fi
# Define the identity of the package.
PACKAGE='xorg-server'
- VERSION='1.20.7'
+ VERSION='1.20.8'
cat >>confdefs.h <<_ACEOF
@@ -23034,7 +23034,7 @@ _ACEOF
if test "${with_bundle_version+set}" = set; then :
withval=$with_bundle_version; BUNDLE_VERSION="${withval}"
else
- BUNDLE_VERSION="1.20.7"
+ BUNDLE_VERSION="1.20.8"
fi
@@ -32961,7 +32961,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by xorg-server $as_me 1.20.7, which was
+This file was extended by xorg-server $as_me 1.20.8, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -33027,7 +33027,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //;
s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-xorg-server config.status 1.20.7
+xorg-server config.status 1.20.8
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Index: configure.ac
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/configure.ac,v
retrieving revision 1.68
diff -u -p -u -r1.68 configure.ac
--- configure.ac 26 Jan 2020 13:48:55 -0000 1.68
+++ configure.ac 2 Apr 2020 17:59:11 -0000
@@ -26,9 +26,9 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.60)
-AC_INIT([xorg-server], 1.20.7,
[https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server)
-RELEASE_DATE="2020-01-13"
-RELEASE_NAME="Stuffed French Toast"
+AC_INIT([xorg-server], 1.20.8,
[https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server)
+RELEASE_DATE="2020-03-29"
+RELEASE_NAME="Chicken Parmigiana"
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
Index: dix/devices.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/dix/devices.c,v
retrieving revision 1.25
diff -u -p -u -r1.25 devices.c
--- dix/devices.c 27 Jul 2019 07:57:09 -0000 1.25
+++ dix/devices.c 2 Apr 2020 17:59:11 -0000
@@ -2656,7 +2656,7 @@ GetPairedDevice(DeviceIntPtr dev)
if (!IsMaster(dev) && !IsFloating(dev))
dev = GetMaster(dev, MASTER_ATTACHED);
- return dev->spriteInfo->paired;
+ return dev->spriteInfo? dev->spriteInfo->paired: NULL;
}
/**
Index: exa/exa_accel.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/exa/exa_accel.c,v
retrieving revision 1.13
diff -u -p -u -r1.13 exa_accel.c
--- exa/exa_accel.c 29 May 2016 12:02:35 -0000 1.13
+++ exa/exa_accel.c 2 Apr 2020 17:59:12 -0000
@@ -1037,7 +1037,7 @@ exaFillRegionSolid(DrawablePtr pDrawable
if (pExaPixmap->pDamage &&
pExaPixmap->sys_ptr && pDrawable->type == DRAWABLE_PIXMAP &&
pDrawable->width == 1 && pDrawable->height == 1 &&
- pDrawable->bitsPerPixel != 24) {
+ pDrawable->bitsPerPixel != 24 && alu == GXcopy) {
RegionPtr pending_damage =
DamagePendingRegion(pExaPixmap->pDamage);
switch (pDrawable->bitsPerPixel) {
Index: glamor/glamor.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/glamor/glamor.c,v
retrieving revision 1.9
diff -u -p -u -r1.9 glamor.c
--- glamor/glamor.c 26 Jan 2020 13:48:55 -0000 1.9
+++ glamor/glamor.c 2 Apr 2020 17:59:12 -0000
@@ -128,6 +128,21 @@ glamor_set_pixmap_texture(PixmapPtr pixm
glamor_pixmap_attach_fbo(pixmap, fbo);
}
+_X_EXPORT void
+glamor_clear_pixmap(PixmapPtr pixmap)
+{
+ ScreenPtr screen = pixmap->drawable.pScreen;
+ glamor_screen_private *glamor_priv;
+ glamor_pixmap_private *pixmap_priv;
+
+ glamor_priv = glamor_get_screen_private(screen);
+ pixmap_priv = glamor_get_pixmap_private(pixmap);
+
+ assert(pixmap_priv->fbo != NULL);
+
+ glamor_pixmap_clear_fbo(glamor_priv, pixmap_priv->fbo);
+}
+
uint32_t
glamor_get_pixmap_texture(PixmapPtr pixmap)
{
Index: glamor/glamor.h
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/glamor/glamor.h,v
retrieving revision 1.7
diff -u -p -u -r1.7 glamor.h
--- glamor/glamor.h 26 Jan 2020 13:48:55 -0000 1.7
+++ glamor/glamor.h 2 Apr 2020 17:59:12 -0000
@@ -115,6 +115,9 @@ extern _X_EXPORT void glamor_set_pixmap_
extern _X_EXPORT void glamor_set_pixmap_type(PixmapPtr pixmap,
glamor_pixmap_type_t type);
+
+extern _X_EXPORT void glamor_clear_pixmap(PixmapPtr pixmap);
+
extern _X_EXPORT void glamor_block_handler(ScreenPtr screen);
extern _X_EXPORT PixmapPtr glamor_create_pixmap(ScreenPtr screen, int w, int h,
Index: glamor/glamor_copy.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/glamor/glamor_copy.c,v
retrieving revision 1.5
diff -u -p -u -r1.5 glamor_copy.c
--- glamor/glamor_copy.c 27 Jul 2019 07:57:10 -0000 1.5
+++ glamor/glamor_copy.c 2 Apr 2020 17:59:12 -0000
@@ -221,7 +221,9 @@ glamor_copy_cpu_fbo(DrawablePtr src,
goto bail;
glamor_make_current(glamor_priv);
- glamor_prepare_access(src, GLAMOR_ACCESS_RO);
+
+ if (!glamor_prepare_access(src, GLAMOR_ACCESS_RO))
+ goto bail;
glamor_get_drawable_deltas(dst, dst_pixmap, &dst_xoff, &dst_yoff);
@@ -309,7 +311,9 @@ glamor_copy_fbo_cpu(DrawablePtr src,
goto bail;
glamor_make_current(glamor_priv);
- glamor_prepare_access(dst, GLAMOR_ACCESS_RW);
+
+ if (!glamor_prepare_access(dst, GLAMOR_ACCESS_RW))
+ goto bail;
glamor_get_drawable_deltas(src, src_pixmap, &src_xoff, &src_yoff);
Index: glamor/glamor_fbo.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/glamor/glamor_fbo.c,v
retrieving revision 1.7
diff -u -p -u -r1.7 glamor_fbo.c
--- glamor/glamor_fbo.c 27 Jul 2019 07:57:10 -0000 1.7
+++ glamor/glamor_fbo.c 2 Apr 2020 17:59:12 -0000
@@ -239,6 +239,18 @@ glamor_create_fbo_array(glamor_screen_pr
return NULL;
}
+void
+glamor_pixmap_clear_fbo(glamor_screen_private *glamor_priv, glamor_pixmap_fbo
*fbo)
+{
+ glamor_make_current(glamor_priv);
+
+ assert(fbo->fb != 0 && fbo->tex != 0);
+
+ glamor_set_destination_pixmap_fbo(glamor_priv, fbo, 0, 0, fbo->width,
fbo->height);
+ glClearColor(0.0, 0.0, 0.0, 0.0);
+ glClear(GL_COLOR_BUFFER_BIT);
+}
+
glamor_pixmap_fbo *
glamor_pixmap_detach_fbo(glamor_pixmap_private *pixmap_priv)
{
Index: glamor/glamor_picture.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/glamor/glamor_picture.c,v
retrieving revision 1.4
diff -u -p -u -r1.4 glamor_picture.c
--- glamor/glamor_picture.c 8 Dec 2017 15:02:00 -0000 1.4
+++ glamor/glamor_picture.c 2 Apr 2020 17:59:12 -0000
@@ -340,8 +340,10 @@ glamor_upload_picture_to_texture(Picture
else
iformat = format;
- if (!glamor_pixmap_ensure_fbo(pixmap, iformat, GLAMOR_CREATE_FBO_NO_FBO))
+ if (!glamor_pixmap_ensure_fbo(pixmap, iformat, GLAMOR_CREATE_FBO_NO_FBO)) {
+ ret = FALSE;
goto fail;
+ }
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
Index: glamor/glamor_prepare.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/glamor/glamor_prepare.c,v
retrieving revision 1.3
diff -u -p -u -r1.3 glamor_prepare.c
--- glamor/glamor_prepare.c 29 May 2016 12:02:36 -0000 1.3
+++ glamor/glamor_prepare.c 2 Apr 2020 17:59:12 -0000
@@ -88,11 +88,29 @@ glamor_prep_pixmap_box(PixmapPtr pixmap,
gl_usage = GL_STREAM_READ;
+ glamor_priv->suppress_gl_out_of_memory_logging = true;
+
glBindBuffer(GL_PIXEL_PACK_BUFFER, priv->pbo);
glBufferData(GL_PIXEL_PACK_BUFFER,
pixmap->devKind * pixmap->drawable.height, NULL,
gl_usage);
- } else {
+
+ glamor_priv->suppress_gl_out_of_memory_logging = false;
+
+ if (glGetError() == GL_OUT_OF_MEMORY) {
+ if (!glamor_priv->logged_any_pbo_allocation_failure) {
+ LogMessageVerb(X_WARNING, 0, "glamor: Failed to allocate
%d "
+ "bytes PBO due to GL_OUT_OF_MEMORY.\n",
+ pixmap->devKind * pixmap->drawable.height);
+ glamor_priv->logged_any_pbo_allocation_failure = true;
+ }
+ glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
+ glDeleteBuffers(1, &priv->pbo);
+ priv->pbo = 0;
+ }
+ }
+
+ if (!priv->pbo) {
pixmap->devPrivate.ptr = xallocarray(pixmap->devKind,
pixmap->drawable.height);
if (!pixmap->devPrivate.ptr)
@@ -106,7 +124,7 @@ glamor_prep_pixmap_box(PixmapPtr pixmap,
RegionUninit(®ion);
- if (glamor_priv->has_rw_pbo) {
+ if (priv->pbo) {
if (priv->map_access == GLAMOR_ACCESS_RW)
gl_access = GL_READ_WRITE;
else
@@ -128,8 +146,6 @@ glamor_prep_pixmap_box(PixmapPtr pixmap,
static void
glamor_fini_pixmap(PixmapPtr pixmap)
{
- ScreenPtr screen = pixmap->drawable.pScreen;
- glamor_screen_private *glamor_priv =
glamor_get_screen_private(screen);
glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap);
if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(priv))
@@ -138,7 +154,7 @@ glamor_fini_pixmap(PixmapPtr pixmap)
if (!priv->prepared)
return;
- if (glamor_priv->has_rw_pbo) {
+ if (priv->pbo) {
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, priv->pbo);
glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
pixmap->devPrivate.ptr = NULL;
@@ -153,7 +169,7 @@ glamor_fini_pixmap(PixmapPtr pixmap)
RegionUninit(&priv->prepare_region);
- if (glamor_priv->has_rw_pbo) {
+ if (priv->pbo) {
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
glDeleteBuffers(1, &priv->pbo);
priv->pbo = 0;
Index: glamor/glamor_priv.h
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/glamor/glamor_priv.h,v
retrieving revision 1.7
diff -u -p -u -r1.7 glamor_priv.h
--- glamor/glamor_priv.h 12 Dec 2019 06:05:19 -0000 1.7
+++ glamor/glamor_priv.h 2 Apr 2020 17:59:12 -0000
@@ -289,6 +289,7 @@ typedef struct glamor_screen_private {
Bool suppress_gl_out_of_memory_logging;
Bool logged_any_fbo_allocation_failure;
+ Bool logged_any_pbo_allocation_failure;
/* xv */
glamor_program xv_prog;
@@ -538,6 +539,7 @@ void glamor_destroy_fbo(glamor_screen_pr
glamor_pixmap_fbo *fbo);
void glamor_pixmap_destroy_fbo(PixmapPtr pixmap);
Bool glamor_pixmap_fbo_fixup(ScreenPtr screen, PixmapPtr pixmap);
+void glamor_pixmap_clear_fbo(glamor_screen_private *glamor_priv,
glamor_pixmap_fbo *fbo);
/* Return whether 'picture' is alpha-only */
static inline Bool glamor_picture_is_alpha(PicturePtr picture)
Index: glx/glxdri2.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/glx/glxdri2.c,v
retrieving revision 1.16
diff -u -p -u -r1.16 glxdri2.c
--- glx/glxdri2.c 27 Jul 2019 07:57:10 -0000 1.16
+++ glx/glxdri2.c 2 Apr 2020 17:59:12 -0000
@@ -295,7 +295,7 @@ __glXDRIcontextWait(__GLXcontext * baseC
}
if (ret) {
- *error = -1;
+ *error = cl->client->noClientException;
return TRUE;
}
Index: hw/dmx/config/dmxconfig.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/hw/dmx/config/dmxconfig.c,v
retrieving revision 1.4
diff -u -p -u -r1.4 dmxconfig.c
--- hw/dmx/config/dmxconfig.c 29 May 2016 12:02:36 -0000 1.4
+++ hw/dmx/config/dmxconfig.c 2 Apr 2020 17:59:12 -0000
@@ -72,7 +72,7 @@ typedef struct DMXConfigCmdStruct {
DMXConfigList *xinputs;
} DMXConfigCmd, *DMXConfigCmdPtr;
-DMXConfigEntryPtr dmxConfigEntry;
+extern DMXConfigEntryPtr dmxConfigEntry;
static DMXConfigCmd dmxConfigCmd;
static int dmxDisplaysFromCommandLine;
Index: hw/dmx/config/xdmxconfig.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/hw/dmx/config/xdmxconfig.c,v
retrieving revision 1.6
diff -u -p -u -r1.6 xdmxconfig.c
--- hw/dmx/config/xdmxconfig.c 29 May 2016 12:02:36 -0000 1.6
+++ hw/dmx/config/xdmxconfig.c 2 Apr 2020 17:59:12 -0000
@@ -65,7 +65,7 @@ extern FILE *yyin;
#define DMX_CANVAS_WIDTH 400
#define DMX_CANVAS_HEIGHT 500
-DMXConfigEntryPtr dmxConfigEntry;
+extern DMXConfigEntryPtr dmxConfigEntry;
static DMXConfigVirtualPtr dmxConfigCurrent, dmxConfigNewVirtual;
static DMXConfigDisplayPtr dmxConfigCurrentDisplay, dmxConfigNewDisplay;
static int dmxConfigGrabbed, dmxConfigGrabbedFine;
Index: hw/dmx/glxProxy/glxext.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/hw/dmx/glxProxy/glxext.c,v
retrieving revision 1.12
diff -u -p -u -r1.12 glxext.c
--- hw/dmx/glxProxy/glxext.c 27 Jul 2019 07:57:11 -0000 1.12
+++ hw/dmx/glxProxy/glxext.c 2 Apr 2020 17:59:12 -0000
@@ -47,8 +47,6 @@
#include "extinit.h"
#include "glx_extinit.h"
-int noGlxExtension;
-
/*
** Forward declarations.
*/
Index: hw/xfree86/drivers/modesetting/driver.c
===================================================================
RCS file:
/cvs/OpenBSD/xenocara/xserver/hw/xfree86/drivers/modesetting/driver.c,v
retrieving revision 1.7
diff -u -p -u -r1.7 driver.c
--- hw/xfree86/drivers/modesetting/driver.c 26 Jan 2020 13:48:55 -0000
1.7
+++ hw/xfree86/drivers/modesetting/driver.c 2 Apr 2020 17:59:12 -0000
@@ -137,6 +137,7 @@ static const OptionInfoRec Options[] = {
{OPTION_PAGEFLIP, "PageFlip", OPTV_BOOLEAN, {0}, FALSE},
{OPTION_ZAPHOD_HEADS, "ZaphodHeads", OPTV_STRING, {0}, FALSE},
{OPTION_DOUBLE_SHADOW, "DoubleShadow", OPTV_BOOLEAN, {0}, FALSE},
+ {OPTION_ATOMIC, "Atomic", OPTV_BOOLEAN, {0}, FALSE},
{-1, NULL, OPTV_NONE, {0}, FALSE}
};
@@ -1044,8 +1045,12 @@ PreInit(ScrnInfoPtr pScrn, int flags)
#endif
}
- ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 1);
- ms->atomic_modeset = (ret == 0);
+ if (xf86ReturnOptValBool(ms->drmmode.Options, OPTION_ATOMIC, FALSE)) {
+ ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 1);
+ ms->atomic_modeset = (ret == 0);
+ } else {
+ ms->atomic_modeset = FALSE;
+ }
ms->kms_has_modifiers = FALSE;
ret = drmGetCap(ms->fd, DRM_CAP_ADDFB2_MODIFIERS, &value);
Index: hw/xfree86/drivers/modesetting/driver.h
===================================================================
RCS file:
/cvs/OpenBSD/xenocara/xserver/hw/xfree86/drivers/modesetting/driver.h,v
retrieving revision 1.5
diff -u -p -u -r1.5 driver.h
--- hw/xfree86/drivers/modesetting/driver.h 12 Dec 2019 06:05:19 -0000
1.5
+++ hw/xfree86/drivers/modesetting/driver.h 2 Apr 2020 17:59:12 -0000
@@ -51,6 +51,7 @@ typedef enum {
OPTION_PAGEFLIP,
OPTION_ZAPHOD_HEADS,
OPTION_DOUBLE_SHADOW,
+ OPTION_ATOMIC,
} modesettingOpts;
typedef struct
Index: hw/xfree86/drivers/modesetting/drmmode_display.c
===================================================================
RCS file:
/cvs/OpenBSD/xenocara/xserver/hw/xfree86/drivers/modesetting/drmmode_display.c,v
retrieving revision 1.9
diff -u -p -u -r1.9 drmmode_display.c
--- hw/xfree86/drivers/modesetting/drmmode_display.c 26 Jan 2020 13:48:55
-0000 1.9
+++ hw/xfree86/drivers/modesetting/drmmode_display.c 2 Apr 2020 17:59:13
-0000
@@ -3735,7 +3735,7 @@ drmmode_handle_uevents(int fd, void *clo
goto out;
if (mode_res->count_crtcs != config->num_crtc) {
- ErrorF("number of CRTCs changed - failed to handle, %d vs %d\n",
mode_res->count_crtcs, config->num_crtc);
+ /* this triggers with Zaphod mode where we don't currently support
connector hotplug or MST. */
goto out_free_res;
}
@@ -3784,15 +3784,16 @@ drmmode_handle_uevents(int fd, void *clo
drmmode_output_init(scrn, drmmode, mode_res, i, TRUE, 0);
}
- /* Check to see if a lessee has disappeared */
- drmmode_validate_leases(scrn);
-
if (changed) {
RRSetChanged(xf86ScrnToScreen(scrn));
RRTellChanged(xf86ScrnToScreen(scrn));
}
out_free_res:
+
+ /* Check to see if a lessee has disappeared */
+ drmmode_validate_leases(scrn);
+
drmModeFreeResources(mode_res);
out:
RRGetInfo(xf86ScrnToScreen(scrn), TRUE);
Index: hw/xfree86/modes/xf86Rotate.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/hw/xfree86/modes/xf86Rotate.c,v
retrieving revision 1.19
diff -u -p -u -r1.19 xf86Rotate.c
--- hw/xfree86/modes/xf86Rotate.c 26 Jan 2020 13:48:55 -0000 1.19
+++ hw/xfree86/modes/xf86Rotate.c 2 Apr 2020 17:59:13 -0000
@@ -176,7 +176,7 @@ xf86RotateRedisplay(ScreenPtr pScreen)
DamagePtr damage = xf86_config->rotation_damage;
RegionPtr region;
- if (!damage)
+ if (!damage || !pScreen->root)
return FALSE;
xf86RotatePrepare(pScreen);
region = DamageRegion(damage);
Index: hw/xfree86/os-support/bsd/bsd_init.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/hw/xfree86/os-support/bsd/bsd_init.c,v
retrieving revision 1.23
diff -u -p -u -r1.23 bsd_init.c
--- hw/xfree86/os-support/bsd/bsd_init.c 26 Jan 2020 13:48:56 -0000
1.23
+++ hw/xfree86/os-support/bsd/bsd_init.c 2 Apr 2020 17:59:13 -0000
@@ -780,7 +780,7 @@ xf86UseMsg(void)
}
void
-xf86OSInputThreadInit()
+xf86OSInputThreadInit(void)
{
return;
}
Index: hw/xfree86/os-support/hurd/hurd_init.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/hw/xfree86/os-support/hurd/hurd_init.c,v
retrieving revision 1.5
diff -u -p -u -r1.5 hurd_init.c
--- hw/xfree86/os-support/hurd/hurd_init.c 26 Jan 2020 13:48:56 -0000
1.5
+++ hw/xfree86/os-support/hurd/hurd_init.c 2 Apr 2020 17:59:13 -0000
@@ -89,7 +89,7 @@ xf86CloseConsole()
}
void
-xf86OSInputThreadInit()
+xf86OSInputThreadInit(void)
{
return;
}
Index: hw/xfree86/os-support/linux/lnx_init.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/hw/xfree86/os-support/linux/lnx_init.c,v
retrieving revision 1.16
diff -u -p -u -r1.16 lnx_init.c
--- hw/xfree86/os-support/linux/lnx_init.c 26 Jan 2020 13:48:56 -0000
1.16
+++ hw/xfree86/os-support/linux/lnx_init.c 2 Apr 2020 17:59:13 -0000
@@ -399,7 +399,7 @@ xf86UseMsg(void)
}
void
-xf86OSInputThreadInit()
+xf86OSInputThreadInit(void)
{
return;
}
Index: hw/xfree86/os-support/solaris/sun_vid.c
===================================================================
RCS file:
/cvs/OpenBSD/xenocara/xserver/hw/xfree86/os-support/solaris/sun_vid.c,v
retrieving revision 1.9
diff -u -p -u -r1.9 sun_vid.c
--- hw/xfree86/os-support/solaris/sun_vid.c 26 Jan 2020 13:48:56 -0000
1.9
+++ hw/xfree86/os-support/solaris/sun_vid.c 2 Apr 2020 17:59:13 -0000
@@ -74,7 +74,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
/***************************************************************************/
void
-xf86OSInputThreadInit()
+xf86OSInputThreadInit(void)
{
/*
* Need to enable in input thread as well, as Solaris kernel tracks
Index: hw/xfree86/os-support/stub/stub_init.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/hw/xfree86/os-support/stub/stub_init.c,v
retrieving revision 1.2
diff -u -p -u -r1.2 stub_init.c
--- hw/xfree86/os-support/stub/stub_init.c 7 Jun 2013 17:28:52 -0000
1.2
+++ hw/xfree86/os-support/stub/stub_init.c 2 Apr 2020 17:59:13 -0000
@@ -24,3 +24,9 @@ void
xf86UseMsg(void)
{
}
+
+void
+xf86OSInputThreadInit(void)
+{
+ return;
+}
Index: hw/xwayland/xwayland-glamor-gbm.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/hw/xwayland/xwayland-glamor-gbm.c,v
retrieving revision 1.2
diff -u -p -u -r1.2 xwayland-glamor-gbm.c
--- hw/xwayland/xwayland-glamor-gbm.c 12 Dec 2019 06:05:19 -0000 1.2
+++ hw/xwayland/xwayland-glamor-gbm.c 2 Apr 2020 17:59:14 -0000
@@ -242,8 +242,12 @@ xwl_glamor_gbm_create_pixmap(ScreenPtr s
if (bo) {
pixmap = xwl_glamor_gbm_create_pixmap_for_bo(screen, bo, depth);
- if (!pixmap)
+ if (!pixmap) {
gbm_bo_destroy(bo);
+ }
+ else if (xwl_screen->rootless && hint ==
CREATE_PIXMAP_USAGE_BACKING_PIXMAP) {
+ glamor_clear_pixmap(pixmap);
+ }
}
}
@@ -793,6 +797,10 @@ xwl_dmabuf_handle_modifier(void *data, s
struct xwl_screen *xwl_screen = data;
struct xwl_format *xwl_format = NULL;
int i;
+
+ if (modifier_hi == (DRM_FORMAT_MOD_INVALID >> 32) &&
+ modifier_lo == (DRM_FORMAT_MOD_INVALID & 0xffffffff))
+ return;
for (i = 0; i < xwl_screen->num_formats; i++) {
if (xwl_screen->formats[i].format == format) {
Index: hw/xwayland/xwayland-present.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/hw/xwayland/xwayland-present.c,v
retrieving revision 1.2
diff -u -p -u -r1.2 xwayland-present.c
--- hw/xwayland/xwayland-present.c 26 Jan 2020 13:48:56 -0000 1.2
+++ hw/xwayland/xwayland-present.c 2 Apr 2020 17:59:14 -0000
@@ -60,6 +60,7 @@ xwl_present_window_get_priv(WindowPtr wi
xwl_present_window->msc = 1;
xwl_present_window->ust = GetTimeInMicros();
+ xorg_list_init(&xwl_present_window->frame_callback_list);
xorg_list_init(&xwl_present_window->event_list);
xorg_list_init(&xwl_present_window->release_queue);
@@ -96,7 +97,7 @@ xwl_present_reset_timer(struct xwl_prese
if (xwl_present_has_events(xwl_present_window)) {
CARD32 timeout;
- if (xwl_present_window->frame_callback)
+ if (!xorg_list_is_empty(&xwl_present_window->frame_callback_list))
timeout = TIMER_LEN_FLIP;
else
timeout = TIMER_LEN_COPY;
@@ -119,10 +120,7 @@ xwl_present_cleanup(WindowPtr window)
if (!xwl_present_window)
return;
- if (xwl_present_window->frame_callback) {
- wl_callback_destroy(xwl_present_window->frame_callback);
- xwl_present_window->frame_callback = NULL;
- }
+ xorg_list_del(&xwl_present_window->frame_callback_list);
if (xwl_present_window->sync_callback) {
wl_callback_destroy(xwl_present_window->sync_callback);
@@ -244,7 +242,10 @@ xwl_present_timer_callback(OsTimerPtr ti
{
struct xwl_present_window *xwl_present_window = arg;
- xwl_present_window->frame_timer_firing = TRUE;
+ /* If we were expecting a frame callback for this window, it didn't arrive
+ * in a second. Stop listening to it to avoid double-bumping the MSC
+ */
+ xorg_list_del(&xwl_present_window->frame_callback_list);
xwl_present_msc_bump(xwl_present_window);
xwl_present_reset_timer(xwl_present_window);
@@ -252,20 +253,10 @@ xwl_present_timer_callback(OsTimerPtr ti
return 0;
}
-static void
-xwl_present_frame_callback(void *data,
- struct wl_callback *callback,
- uint32_t time)
+void
+xwl_present_frame_callback(struct xwl_present_window *xwl_present_window)
{
- struct xwl_present_window *xwl_present_window = data;
-
- wl_callback_destroy(xwl_present_window->frame_callback);
- xwl_present_window->frame_callback = NULL;
-
- if (xwl_present_window->frame_timer_firing) {
- /* If the timer is firing, this frame callback is too late */
- return;
- }
+ xorg_list_del(&xwl_present_window->frame_callback_list);
xwl_present_msc_bump(xwl_present_window);
@@ -275,10 +266,6 @@ xwl_present_frame_callback(void *data,
xwl_present_reset_timer(xwl_present_window);
}
-static const struct wl_callback_listener xwl_present_frame_listener = {
- xwl_present_frame_callback
-};
-
static void
xwl_present_sync_callback(void *data,
struct wl_callback *callback,
@@ -360,6 +347,7 @@ xwl_present_queue_vblank(WindowPtr prese
uint64_t msc)
{
struct xwl_present_window *xwl_present_window =
xwl_present_window_get_priv(present_window);
+ struct xwl_window *xwl_window = xwl_window_from_window(present_window);
struct xwl_present_event *event;
event = malloc(sizeof *event);
@@ -372,7 +360,15 @@ xwl_present_queue_vblank(WindowPtr prese
xorg_list_append(&event->list, &xwl_present_window->event_list);
- if (!xwl_present_window->frame_timer)
+ /* If there's a pending frame callback, use that */
+ if (xwl_window && xwl_window->frame_callback &&
+ xorg_list_is_empty(&xwl_present_window->frame_callback_list)) {
+ xorg_list_add(&xwl_present_window->frame_callback_list,
+ &xwl_window->frame_callback_list);
+ }
+
+ if ((xwl_window && xwl_window->frame_callback) ||
+ !xwl_present_window->frame_timer)
xwl_present_reset_timer(xwl_present_window);
return Success;
@@ -488,15 +484,15 @@ xwl_present_flip(WindowPtr present_windo
/* We can flip directly to the main surface (full screen window without
clips) */
wl_surface_attach(xwl_window->surface, buffer, 0, 0);
- if (!xwl_present_window->frame_callback) {
- xwl_present_window->frame_callback =
wl_surface_frame(xwl_window->surface);
- wl_callback_add_listener(xwl_present_window->frame_callback,
- &xwl_present_frame_listener,
- xwl_present_window);
+ if (!xwl_window->frame_callback)
+ xwl_window_create_frame_callback(xwl_window);
+
+ if (xorg_list_is_empty(&xwl_present_window->frame_callback_list)) {
+ xorg_list_add(&xwl_present_window->frame_callback_list,
+ &xwl_window->frame_callback_list);
}
/* Realign timer */
- xwl_present_window->frame_timer_firing = FALSE;
xwl_present_reset_timer(xwl_present_window);
wl_surface_damage(xwl_window->surface, 0, 0,
@@ -528,18 +524,12 @@ xwl_present_flips_stop(WindowPtr window)
}
void
-xwl_present_unrealize_window(WindowPtr window)
+xwl_present_unrealize_window(struct xwl_present_window *xwl_present_window)
{
- struct xwl_present_window *xwl_present_window =
xwl_present_window_priv(window);
-
- if (!xwl_present_window || !xwl_present_window->frame_callback)
- return;
-
/* The pending frame callback may never be called, so drop it and shorten
* the frame timer interval.
*/
- wl_callback_destroy(xwl_present_window->frame_callback);
- xwl_present_window->frame_callback = NULL;
+ xorg_list_del(&xwl_present_window->frame_callback_list);
xwl_present_reset_timer(xwl_present_window);
}
Index: hw/xwayland/xwayland.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/hw/xwayland/xwayland.c,v
retrieving revision 1.8
diff -u -p -u -r1.8 xwayland.c
--- hw/xwayland/xwayland.c 26 Jan 2020 13:48:56 -0000 1.8
+++ hw/xwayland/xwayland.c 2 Apr 2020 17:59:14 -0000
@@ -40,7 +40,11 @@
#ifdef XF86VIDMODE
#include <X11/extensions/xf86vmproto.h>
-_X_EXPORT Bool noXFree86VidModeExtension;
+extern _X_EXPORT Bool noXFree86VidModeExtension;
+#endif
+
+#ifdef XWL_HAS_GLAMOR
+#include <glamor.h>
#endif
void
@@ -596,6 +600,10 @@ ensure_surface_for_window(WindowPtr wind
dixSetPrivate(&window->devPrivates, &xwl_window_private_key, xwl_window);
xorg_list_init(&xwl_window->link_damage);
+#ifdef GLAMOR_HAS_GBM
+ xorg_list_init(&xwl_window->frame_callback_list);
+#endif
+
xwl_window_init_allow_commits(xwl_window);
return TRUE;
@@ -680,11 +688,6 @@ xwl_unrealize_window(WindowPtr window)
xwl_screen->UnrealizeWindow = screen->UnrealizeWindow;
screen->UnrealizeWindow = xwl_unrealize_window;
-#ifdef GLAMOR_HAS_GBM
- if (xwl_screen->present)
- xwl_present_unrealize_window(window);
-#endif
-
xwl_window = xwl_window_get(window);
if (!xwl_window)
return ret;
@@ -696,6 +699,18 @@ xwl_unrealize_window(WindowPtr window)
if (xwl_window->frame_callback)
wl_callback_destroy(xwl_window->frame_callback);
+#ifdef GLAMOR_HAS_GBM
+ if (xwl_screen->present) {
+ struct xwl_present_window *xwl_present_window, *tmp;
+
+ xorg_list_for_each_entry_safe(xwl_present_window, tmp,
+ &xwl_window->frame_callback_list,
+ frame_callback_list) {
+ xwl_present_unrealize_window(xwl_present_window);
+ }
+ }
+#endif
+
free(xwl_window);
dixSetPrivate(&window->devPrivates, &xwl_window_private_key, NULL);
@@ -737,12 +752,32 @@ frame_callback(void *data,
wl_callback_destroy (xwl_window->frame_callback);
xwl_window->frame_callback = NULL;
+
+#ifdef GLAMOR_HAS_GBM
+ if (xwl_window->xwl_screen->present) {
+ struct xwl_present_window *xwl_present_window, *tmp;
+
+ xorg_list_for_each_entry_safe(xwl_present_window, tmp,
+ &xwl_window->frame_callback_list,
+ frame_callback_list) {
+ xwl_present_frame_callback(xwl_present_window);
+ }
+ }
+#endif
}
static const struct wl_callback_listener frame_listener = {
frame_callback
};
+void
+xwl_window_create_frame_callback(struct xwl_window *xwl_window)
+{
+ xwl_window->frame_callback = wl_surface_frame(xwl_window->surface);
+ wl_callback_add_listener(xwl_window->frame_callback, &frame_listener,
+ xwl_window);
+}
+
static Bool
xwl_destroy_window(WindowPtr window)
{
@@ -813,19 +848,17 @@ xwl_window_post_damage(struct xwl_window
box->x2 - box->x1, box->y2 - box->y1);
}
- xwl_window->frame_callback = wl_surface_frame(xwl_window->surface);
- wl_callback_add_listener(xwl_window->frame_callback, &frame_listener,
xwl_window);
-
- wl_surface_commit(xwl_window->surface);
+ xwl_window_create_frame_callback(xwl_window);
DamageEmpty(window_get_damage(xwl_window->window));
-
- xorg_list_del(&xwl_window->link_damage);
}
static void
xwl_screen_post_damage(struct xwl_screen *xwl_screen)
{
struct xwl_window *xwl_window, *next_xwl_window;
+ struct xorg_list commit_window_list;
+
+ xorg_list_init(&commit_window_list);
xorg_list_for_each_entry_safe(xwl_window, next_xwl_window,
&xwl_screen->damage_window_list,
link_damage) {
@@ -843,6 +876,24 @@ xwl_screen_post_damage(struct xwl_screen
#endif
xwl_window_post_damage(xwl_window);
+ xorg_list_del(&xwl_window->link_damage);
+ xorg_list_append(&xwl_window->link_damage, &commit_window_list);
+ }
+
+ if (xorg_list_is_empty(&commit_window_list))
+ return;
+
+#ifdef XWL_HAS_GLAMOR
+ if (xwl_screen->glamor &&
+ xwl_screen->egl_backend == &xwl_screen->gbm_backend) {
+ glamor_block_handler(xwl_screen->screen);
+ }
+#endif
+
+ xorg_list_for_each_entry_safe(xwl_window, next_xwl_window,
+ &commit_window_list, link_damage) {
+ wl_surface_commit(xwl_window->surface);
+ xorg_list_del(&xwl_window->link_damage);
}
}
Index: hw/xwayland/xwayland.h
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/hw/xwayland/xwayland.h,v
retrieving revision 1.7
diff -u -p -u -r1.7 xwayland.h
--- hw/xwayland/xwayland.h 12 Dec 2019 06:05:19 -0000 1.7
+++ hw/xwayland/xwayland.h 2 Apr 2020 17:59:14 -0000
@@ -183,6 +183,7 @@ struct xwl_window {
struct wl_callback *frame_callback;
Bool allow_commits;
#ifdef GLAMOR_HAS_GBM
+ struct xorg_list frame_callback_list;
Bool present_flipped;
#endif
};
@@ -192,15 +193,13 @@ struct xwl_present_window {
struct xwl_screen *xwl_screen;
struct xwl_present_event *sync_flip;
WindowPtr window;
- struct xorg_list link;
+ struct xorg_list frame_callback_list;
uint64_t msc;
uint64_t ust;
OsTimerPtr frame_timer;
- Bool frame_timer_firing;
- struct wl_callback *frame_callback;
struct wl_callback *sync_callback;
struct xorg_list event_list;
@@ -378,6 +377,8 @@ struct xwl_output {
Bool xdg_output_done;
};
+void xwl_window_create_frame_callback(struct xwl_window *xwl_window);
+
void xwl_sync_events (struct xwl_screen *xwl_screen);
Bool xwl_screen_init_cursor(struct xwl_screen *xwl_screen);
@@ -452,9 +453,10 @@ Bool xwl_glamor_allow_commits(struct xwl
void xwl_glamor_egl_make_current(struct xwl_screen *xwl_screen);
#ifdef GLAMOR_HAS_GBM
+void xwl_present_frame_callback(struct xwl_present_window *xwl_present_window);
Bool xwl_present_init(ScreenPtr screen);
void xwl_present_cleanup(WindowPtr window);
-void xwl_present_unrealize_window(WindowPtr window);
+void xwl_present_unrealize_window(struct xwl_present_window
*xwl_present_window);
#endif /* GLAMOR_HAS_GBM */
#ifdef XV
Index: os/io.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/os/io.c,v
retrieving revision 1.17
diff -u -p -u -r1.17 io.c
--- os/io.c 27 Jul 2019 07:57:24 -0000 1.17
+++ os/io.c 2 Apr 2020 17:59:14 -0000
@@ -557,6 +557,11 @@ void
ResetCurrentRequest(ClientPtr client)
{
OsCommPtr oc = (OsCommPtr) client->osPrivate;
+
+ /* ignore dying clients */
+ if (!oc)
+ return;
+
register ConnectionInputPtr oci = oc->input;
register xReq *request;
int gotnow, needed;
Index: test/misc.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/test/misc.c,v
retrieving revision 1.4
diff -u -p -u -r1.4 misc.c
--- test/misc.c 27 Jul 2019 07:57:25 -0000 1.4
+++ test/misc.c 2 Apr 2020 17:59:14 -0000
@@ -33,7 +33,7 @@
#include "tests-common.h"
-ScreenInfo screenInfo;
+extern ScreenInfo screenInfo;
static void
dix_version_compare(void)
Index: test/xi1/protocol-xchangedevicecontrol.c
===================================================================
RCS file:
/cvs/OpenBSD/xenocara/xserver/test/xi1/protocol-xchangedevicecontrol.c,v
retrieving revision 1.2
diff -u -p -u -r1.2 protocol-xchangedevicecontrol.c
--- test/xi1/protocol-xchangedevicecontrol.c 27 Jul 2019 07:57:26 -0000
1.2
+++ test/xi1/protocol-xchangedevicecontrol.c 2 Apr 2020 17:59:14 -0000
@@ -37,7 +37,7 @@
#include "protocol-common.h"
-ClientRec client_window;
+extern ClientRec client_window;
static ClientRec client_request;
static void
Index: test/xi2/protocol-common.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/test/xi2/protocol-common.c,v
retrieving revision 1.9
diff -u -p -u -r1.9 protocol-common.c
--- test/xi2/protocol-common.c 27 Jul 2019 07:57:26 -0000 1.9
+++ test/xi2/protocol-common.c 2 Apr 2020 17:59:14 -0000
@@ -45,6 +45,8 @@ static ClientRec server_client;
void *global_userdata;
+void (*reply_handler) (ClientPtr client, int len, char *data, void *userdata);
+
int enable_GrabButton_wrap = 1;
int enable_XISetEventMask_wrap = 1;
Index: test/xi2/protocol-common.h
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/test/xi2/protocol-common.h,v
retrieving revision 1.6
diff -u -p -u -r1.6 protocol-common.h
--- test/xi2/protocol-common.h 27 Jul 2019 07:57:26 -0000 1.6
+++ test/xi2/protocol-common.h 2 Apr 2020 17:59:14 -0000
@@ -99,7 +99,7 @@ extern void *global_userdata;
* The reply handler called from WriteToClient. Set this handler if you need
* to check the reply values.
*/
-void (*reply_handler) (ClientPtr client, int len, char *data, void *userdata);
+extern void (*reply_handler) (ClientPtr client, int len, char *data, void
*userdata);
/**
* The default screen used for the windows. Initialized by init_simple().
Index: test/xi2/protocol-xigetclientpointer.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/test/xi2/protocol-xigetclientpointer.c,v
retrieving revision 1.5
diff -u -p -u -r1.5 protocol-xigetclientpointer.c
--- test/xi2/protocol-xigetclientpointer.c 27 Jul 2019 07:57:26 -0000
1.5
+++ test/xi2/protocol-xigetclientpointer.c 2 Apr 2020 17:59:14 -0000
@@ -46,7 +46,7 @@ static struct {
int win;
} test_data;
-ClientRec client_window;
+extern ClientRec client_window;
static ClientRec client_request;
static void
Index: test/xi2/protocol-xigetselectedevents.c
===================================================================
RCS file:
/cvs/OpenBSD/xenocara/xserver/test/xi2/protocol-xigetselectedevents.c,v
retrieving revision 1.5
diff -u -p -u -r1.5 protocol-xigetselectedevents.c
--- test/xi2/protocol-xigetselectedevents.c 27 Jul 2019 07:57:26 -0000
1.5
+++ test/xi2/protocol-xigetselectedevents.c 2 Apr 2020 17:59:14 -0000
@@ -60,7 +60,7 @@ static struct {
int mask_len;
} test_data;
-ClientRec client_window;
+extern ClientRec client_window;
/* AddResource is called from XISetSEventMask, we don't need this */
Bool
Index: test/xi2/protocol-xipassivegrabdevice.c
===================================================================
RCS file:
/cvs/OpenBSD/xenocara/xserver/test/xi2/protocol-xipassivegrabdevice.c,v
retrieving revision 1.7
diff -u -p -u -r1.7 protocol-xipassivegrabdevice.c
--- test/xi2/protocol-xipassivegrabdevice.c 27 Jul 2019 07:57:26 -0000
1.7
+++ test/xi2/protocol-xipassivegrabdevice.c 2 Apr 2020 17:59:14 -0000
@@ -41,7 +41,7 @@
#include "protocol-common.h"
-ClientRec client_window;
+extern ClientRec client_window;
static ClientRec client_request;
#define N_MODS 7
Index: test/xi2/protocol-xiquerydevice.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/test/xi2/protocol-xiquerydevice.c,v
retrieving revision 1.6
diff -u -p -u -r1.6 protocol-xiquerydevice.c
--- test/xi2/protocol-xiquerydevice.c 27 Jul 2019 07:57:26 -0000 1.6
+++ test/xi2/protocol-xiquerydevice.c 2 Apr 2020 17:59:14 -0000
@@ -54,7 +54,7 @@ struct test_data {
int num_devices_in_reply;
};
-ClientRec client_window;
+extern ClientRec client_window;
static void reply_XIQueryDevice_data(ClientPtr client, int len, char *data,
void *closure);
Index: test/xi2/protocol-xiquerypointer.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/test/xi2/protocol-xiquerypointer.c,v
retrieving revision 1.7
diff -u -p -u -r1.7 protocol-xiquerypointer.c
--- test/xi2/protocol-xiquerypointer.c 27 Jul 2019 07:57:26 -0000 1.7
+++ test/xi2/protocol-xiquerypointer.c 2 Apr 2020 17:59:14 -0000
@@ -41,7 +41,7 @@
#include "protocol-common.h"
-ClientRec client_window;
+extern ClientRec client_window;
static ClientRec client_request;
static void reply_XIQueryPointer_data(ClientPtr client, int len,
char *data, void *closure);
Index: test/xi2/protocol-xiqueryversion.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/test/xi2/protocol-xiqueryversion.c,v
retrieving revision 1.7
diff -u -p -u -r1.7 protocol-xiqueryversion.c
--- test/xi2/protocol-xiqueryversion.c 27 Jul 2019 07:57:26 -0000 1.7
+++ test/xi2/protocol-xiqueryversion.c 2 Apr 2020 17:59:14 -0000
@@ -58,7 +58,7 @@ struct test_data {
int minor_expected;
};
-ClientRec client_window;
+extern ClientRec client_window;
static void
reply_XIQueryVersion(ClientPtr client, int len, char *data, void *closure)
Index: test/xi2/protocol-xiselectevents.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/test/xi2/protocol-xiselectevents.c,v
retrieving revision 1.5
diff -u -p -u -r1.5 protocol-xiselectevents.c
--- test/xi2/protocol-xiselectevents.c 27 Jul 2019 07:57:26 -0000 1.5
+++ test/xi2/protocol-xiselectevents.c 2 Apr 2020 17:59:14 -0000
@@ -62,7 +62,7 @@
static unsigned char *data[4096 * 20]; /* the request data buffer */
-ClientRec client_window;
+extern ClientRec client_window;
int
__real_XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client,
Index: test/xi2/protocol-xisetclientpointer.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/test/xi2/protocol-xisetclientpointer.c,v
retrieving revision 1.5
diff -u -p -u -r1.5 protocol-xisetclientpointer.c
--- test/xi2/protocol-xisetclientpointer.c 27 Jul 2019 07:57:26 -0000
1.5
+++ test/xi2/protocol-xisetclientpointer.c 2 Apr 2020 17:59:14 -0000
@@ -48,7 +48,7 @@
#include "protocol-common.h"
-ClientRec client_window;
+extern ClientRec client_window;
static ClientRec client_request;
static void
Index: test/xi2/protocol-xiwarppointer.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/test/xi2/protocol-xiwarppointer.c,v
retrieving revision 1.6
diff -u -p -u -r1.6 protocol-xiwarppointer.c
--- test/xi2/protocol-xiwarppointer.c 27 Jul 2019 07:57:26 -0000 1.6
+++ test/xi2/protocol-xiwarppointer.c 2 Apr 2020 17:59:14 -0000
@@ -44,7 +44,7 @@
static int expected_x = SPRITE_X;
static int expected_y = SPRITE_Y;
-ClientRec client_window;
+extern ClientRec client_window;
/**
* This function overrides the one in the screen rec.
--
Matthieu Herrb