Update to xserver 1.20.8. ok jsg@ robert@

This commit is contained in:
matthieu 2020-04-13 08:06:58 +00:00
parent b8fd44900b
commit 9064f8eee5
43 changed files with 646 additions and 112 deletions

View File

@ -1,3 +1,414 @@
commit f84ad082557f9cde6b8faa373eca6a0a89ba7d56
Author: Matt Turner <mattst88@gmail.com>
Date: Sun Mar 29 13:02:03 2020 -0700
xserver 1.20.8
Signed-off-by: Matt Turner <mattst88@gmail.com>
commit 8837279869309317c110afb6f2f3c24484c77657
Author: Jon Turney <jon.turney@dronecode.org.uk>
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 <jon.turney@dronecode.org.uk>
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 <mdaenzer@redhat.com>
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 <ofourdan@redhat.com>
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit 5e91587302e85fd6f0e8d5ffbe30182e18c6913f)
commit a033571644d277dc49a489f7ae32c4ad92856543
Author: Jonas Ådahl <jadahl@gmail.com>
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 <jadahl@gmail.com>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
(cherry picked from commit edf964434eac10ffbe27cc883e3ab95505669aee)
commit 3c48bd50ad33f2a533ac76afa38d6e3906ebc28a
Author: Arthur Williams <taaparthur@gmail.com>
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 <taaparthur@gmail.com>
(cherry picked from commit e693c9657f98c334e9921ca2f8ebf710497c0c6a)
commit 1610ef1d6b5ba99da9d1a639f3b65b2e61514a7d
Author: David Seifert <soap@gentoo.org>
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 <mattst88@gmail.com>
commit 2a185dd22ddb5b0d7d2ef5948591028766bb9530
Author: Michel Dänzer <mdaenzer@redhat.com>
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 <ofourdan@redhat.com>
(cherry picked from commit 9b31358c52e951883bf7c01c953a9da080542244)
commit 99a6d6b15e0757a4652a569a1b2070c76a00b567
Author: Michel Dänzer <mdaenzer@redhat.com>
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 <ofourdan@redhat.com>
(cherry picked from commit c5067feaeea115761f0a72f37407c6e5e943d1a1)
commit 915cc107767624bd7914c962347bab9c2e21cdff
Author: Michel Dänzer <mdaenzer@redhat.com>
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 <ofourdan@redhat.com>
(cherry picked from commit f80eea0529b2cfb805a9c7d4994a4235451131e3)
commit 94dad4f05133171805ee94095bbcd20ece754eba
Author: Dor Askayo <dor.askayo@gmail.com>
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 <dor.askayo@gmail.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/636
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
(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 <mdaenzer@redhat.com>
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 <mdaenzer@redhat.com>
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 <ajax@redhat.com>
(cherry picked from commit f88d9b1f779835302e02e255fcd45989db7f488d)
commit 1ba5e528d52ed9d7d67eb45c5d3e04b6f5d22b05
Author: Maarten Lankhorst <dev@mblankhorst.nl>
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 <maarten.lankhorst@linux.intel.com>
(cherry picked from commit f0d78b47ac49977a6007f5fe081f00c6eb19a12e)
commit d44bbb4710961651dcf10701bc562f1f01509010
Author: Eric Anholt <eric@anholt.net>
Date: Mon Feb 10 10:22:34 2020 +0100
glamor: Fix a compiler warning since the recent OOM fixes.
Signed-off-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 3b26b90cb787a14fa5f8bb2033eab8ab6562a9a5)
commit d2a6c8708ca4f27c8d9aade6db2c4e7f2d8c624f
Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
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 <paul.kocialkowski@bootlin.com>
(cherry picked from commit 8c4e8d9eff03cefc987f13c900b0a47403946127)
commit ca034c2f2cfff8e49b816b8ecbaa96215b796e36
Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
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 <paul.kocialkowski@bootlin.com>
(cherry picked from commit de6b3fac1f26075ce915006c914c4a4755617715)
commit a7b165d994d74131778a5a9bcffec957f1d1cacb
Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
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 <paul.kocialkowski@bootlin.com>
(cherry picked from commit bc2e12239f86e5a4acd220744f42eb83ba55d328)
commit 428b5ce4da99a43bfa0c1933ec447f7feb3639a1
Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
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 <paul.kocialkowski@bootlin.com>
(cherry picked from commit c98c7709c67d8ed6b7455ec700a49b58c396ec2c)
commit 948afd768398955f043fef8e14d7d154cea25f85
Author: Dave Airlie <airlied@redhat.com>
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 <mdaenzer@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 1cfdd1a96580733df3625bcea3384ffee3dc92df)
commit 1c3e51dabadbf65e7fdedbebbdcd19a85fb03e34
Author: Michel Dänzer <mdaenzer@redhat.com>
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 <ofourdan@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 6a5e47c57d16de8b6a6a2636f3cbad1aebec32e2)
commit af2fd88b1019f63fe3ce871f9e99b3e1e4608b25
Author: Daniel Llewellyn <daniel@bowlhat.net>
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 <diddledan@ubuntu.com>
(cherry picked from commit 578371616e09364318c9fb2371a693d438b31b29)
commit e5293f1c5d7b20d98ed4975dc29a6f88c8bc6a0d
Author: Adam Jackson <ajax@redhat.com>
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 <gmmatsumura01@bvsd.org>
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 <gmmatsumura01@bvsd.org>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
(cherry picked from commit 83826075e59c0393c16d2a2482dc5c9f2fdf4564)
commit c2ef88c4d3a551ff7646bfb86550cae32b02a510
Author: Michel Dänzer <mdaenzer@redhat.com>
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 <kenneth@whitecape.org>
(cherry picked from commit a24a786fc8490fda08b15c3dab6fa6750f008ecb)
commit ad7364d8d7f936b9b08195e47d2f6ee9329ff687
Author: Kenneth Graunke <kenneth@whitecape.org>
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 <mdaenzer@redhat.com> [v1]
Reviewed-by: Eric Engestrom <eric@engestrom.ch> [v1]
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 25ca99df38a2c28c25ab20a917e68442285f2353)
commit 489f4191f3c881c6c8acce97ec612167a4ae0f33 commit 489f4191f3c881c6c8acce97ec612167a4ae0f33
Author: Matt Turner <mattst88@gmail.com> Author: Matt Turner <mattst88@gmail.com>
Date: Mon Jan 13 14:47:48 2020 -0800 Date: Mon Jan 13 14:47:48 2020 -0800

30
xserver/configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # 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>. # Report bugs to <https://gitlab.freedesktop.org/xorg/xserver/issues>.
# #
@ -651,8 +651,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='xorg-server' PACKAGE_NAME='xorg-server'
PACKAGE_TARNAME='xorg-server' PACKAGE_TARNAME='xorg-server'
PACKAGE_VERSION='1.20.7' PACKAGE_VERSION='1.20.8'
PACKAGE_STRING='xorg-server 1.20.7' PACKAGE_STRING='xorg-server 1.20.8'
PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/xserver/issues' PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/xserver/issues'
PACKAGE_URL='' 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. # 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. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF 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]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -2115,7 +2115,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in 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 esac
cat <<\_ACEOF cat <<\_ACEOF
@ -2310,10 +2310,10 @@ Optional Packages:
org.x) org.x)
--with-bundle-version=VERSION --with-bundle-version=VERSION
Version to use for X11.app's CFBundleVersion Version to use for X11.app's CFBundleVersion
(default: 1.20.7) (default: 1.20.8)
--with-bundle-version-string=VERSION --with-bundle-version-string=VERSION
Version to use for X11.app's Version to use for X11.app's
CFBundleShortVersionString (default: 1.20.7) CFBundleShortVersionString (default: 1.20.8)
--with-sparkle-feed-url=URL --with-sparkle-feed-url=URL
URL for the Sparkle feed (default: URL for the Sparkle feed (default:
https://www.xquartz.org/releases/sparkle/release.xml) https://www.xquartz.org/releases/sparkle/release.xml)
@ -2568,7 +2568,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
xorg-server configure 1.20.7 xorg-server configure 1.20.8
generated by GNU Autoconf 2.69 generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc. Copyright (C) 2012 Free Software Foundation, Inc.
@ -3277,7 +3277,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. 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 generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@ $ $0 $@
@ -3625,8 +3625,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_compiler_gnu=$ac_cv_c_compiler_gnu
RELEASE_DATE="2020-01-13" RELEASE_DATE="2020-03-29"
RELEASE_NAME="Stuffed French Toast" RELEASE_NAME="Chicken Parmigiana"
am__api_version='1.12' am__api_version='1.12'
@ -4105,7 +4105,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='xorg-server' PACKAGE='xorg-server'
VERSION='1.20.7' VERSION='1.20.8'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -23034,7 +23034,7 @@ _ACEOF
if test "${with_bundle_version+set}" = set; then : if test "${with_bundle_version+set}" = set; then :
withval=$with_bundle_version; BUNDLE_VERSION="${withval}" withval=$with_bundle_version; BUNDLE_VERSION="${withval}"
else else
BUNDLE_VERSION="1.20.7" BUNDLE_VERSION="1.20.8"
fi fi
@ -32961,7 +32961,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" 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 generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -33027,7 +33027,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ 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, configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"

View File

@ -26,9 +26,9 @@ dnl
dnl Process this file with autoconf to create configure. dnl Process this file with autoconf to create configure.
AC_PREREQ(2.60) AC_PREREQ(2.60)
AC_INIT([xorg-server], 1.20.7, [https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server) AC_INIT([xorg-server], 1.20.8, [https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server)
RELEASE_DATE="2020-01-13" RELEASE_DATE="2020-03-29"
RELEASE_NAME="Stuffed French Toast" RELEASE_NAME="Chicken Parmigiana"
AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_INIT_AUTOMAKE([foreign dist-bzip2])

View File

@ -2656,7 +2656,7 @@ GetPairedDevice(DeviceIntPtr dev)
if (!IsMaster(dev) && !IsFloating(dev)) if (!IsMaster(dev) && !IsFloating(dev))
dev = GetMaster(dev, MASTER_ATTACHED); dev = GetMaster(dev, MASTER_ATTACHED);
return dev->spriteInfo->paired; return dev->spriteInfo? dev->spriteInfo->paired: NULL;
} }
/** /**

View File

@ -1037,7 +1037,7 @@ exaFillRegionSolid(DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel,
if (pExaPixmap->pDamage && if (pExaPixmap->pDamage &&
pExaPixmap->sys_ptr && pDrawable->type == DRAWABLE_PIXMAP && pExaPixmap->sys_ptr && pDrawable->type == DRAWABLE_PIXMAP &&
pDrawable->width == 1 && pDrawable->height == 1 && pDrawable->width == 1 && pDrawable->height == 1 &&
pDrawable->bitsPerPixel != 24) { pDrawable->bitsPerPixel != 24 && alu == GXcopy) {
RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage); RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
switch (pDrawable->bitsPerPixel) { switch (pDrawable->bitsPerPixel) {

View File

@ -128,6 +128,21 @@ glamor_set_pixmap_texture(PixmapPtr pixmap, unsigned int tex)
glamor_pixmap_attach_fbo(pixmap, fbo); 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 uint32_t
glamor_get_pixmap_texture(PixmapPtr pixmap) glamor_get_pixmap_texture(PixmapPtr pixmap)
{ {

View File

@ -115,6 +115,9 @@ extern _X_EXPORT void glamor_set_pixmap_texture(PixmapPtr pixmap,
extern _X_EXPORT void glamor_set_pixmap_type(PixmapPtr pixmap, extern _X_EXPORT void glamor_set_pixmap_type(PixmapPtr pixmap,
glamor_pixmap_type_t type); 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 void glamor_block_handler(ScreenPtr screen);
extern _X_EXPORT PixmapPtr glamor_create_pixmap(ScreenPtr screen, int w, int h, extern _X_EXPORT PixmapPtr glamor_create_pixmap(ScreenPtr screen, int w, int h,

View File

@ -221,7 +221,9 @@ glamor_copy_cpu_fbo(DrawablePtr src,
goto bail; goto bail;
glamor_make_current(glamor_priv); 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); glamor_get_drawable_deltas(dst, dst_pixmap, &dst_xoff, &dst_yoff);
@ -309,7 +311,9 @@ glamor_copy_fbo_cpu(DrawablePtr src,
goto bail; goto bail;
glamor_make_current(glamor_priv); 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); glamor_get_drawable_deltas(src, src_pixmap, &src_xoff, &src_yoff);

View File

@ -239,6 +239,18 @@ glamor_create_fbo_array(glamor_screen_private *glamor_priv,
return NULL; 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_fbo *
glamor_pixmap_detach_fbo(glamor_pixmap_private *pixmap_priv) glamor_pixmap_detach_fbo(glamor_pixmap_private *pixmap_priv)
{ {

View File

@ -340,8 +340,10 @@ glamor_upload_picture_to_texture(PicturePtr picture)
else else
iformat = format; 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; goto fail;
}
glPixelStorei(GL_UNPACK_ALIGNMENT, 4); glPixelStorei(GL_UNPACK_ALIGNMENT, 4);

View File

@ -88,11 +88,29 @@ glamor_prep_pixmap_box(PixmapPtr pixmap, glamor_access_t access, BoxPtr box)
gl_usage = GL_STREAM_READ; gl_usage = GL_STREAM_READ;
glamor_priv->suppress_gl_out_of_memory_logging = true;
glBindBuffer(GL_PIXEL_PACK_BUFFER, priv->pbo); glBindBuffer(GL_PIXEL_PACK_BUFFER, priv->pbo);
glBufferData(GL_PIXEL_PACK_BUFFER, glBufferData(GL_PIXEL_PACK_BUFFER,
pixmap->devKind * pixmap->drawable.height, NULL, pixmap->devKind * pixmap->drawable.height, NULL,
gl_usage); 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->devPrivate.ptr = xallocarray(pixmap->devKind,
pixmap->drawable.height); pixmap->drawable.height);
if (!pixmap->devPrivate.ptr) if (!pixmap->devPrivate.ptr)
@ -106,7 +124,7 @@ glamor_prep_pixmap_box(PixmapPtr pixmap, glamor_access_t access, BoxPtr box)
RegionUninit(&region); RegionUninit(&region);
if (glamor_priv->has_rw_pbo) { if (priv->pbo) {
if (priv->map_access == GLAMOR_ACCESS_RW) if (priv->map_access == GLAMOR_ACCESS_RW)
gl_access = GL_READ_WRITE; gl_access = GL_READ_WRITE;
else else
@ -128,8 +146,6 @@ glamor_prep_pixmap_box(PixmapPtr pixmap, glamor_access_t access, BoxPtr box)
static void static void
glamor_fini_pixmap(PixmapPtr pixmap) 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); glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap);
if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(priv)) if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(priv))
@ -138,7 +154,7 @@ glamor_fini_pixmap(PixmapPtr pixmap)
if (!priv->prepared) if (!priv->prepared)
return; return;
if (glamor_priv->has_rw_pbo) { if (priv->pbo) {
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, priv->pbo); glBindBuffer(GL_PIXEL_UNPACK_BUFFER, priv->pbo);
glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER); glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
pixmap->devPrivate.ptr = NULL; pixmap->devPrivate.ptr = NULL;
@ -153,7 +169,7 @@ glamor_fini_pixmap(PixmapPtr pixmap)
RegionUninit(&priv->prepare_region); RegionUninit(&priv->prepare_region);
if (glamor_priv->has_rw_pbo) { if (priv->pbo) {
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
glDeleteBuffers(1, &priv->pbo); glDeleteBuffers(1, &priv->pbo);
priv->pbo = 0; priv->pbo = 0;

View File

@ -289,6 +289,7 @@ typedef struct glamor_screen_private {
Bool suppress_gl_out_of_memory_logging; Bool suppress_gl_out_of_memory_logging;
Bool logged_any_fbo_allocation_failure; Bool logged_any_fbo_allocation_failure;
Bool logged_any_pbo_allocation_failure;
/* xv */ /* xv */
glamor_program xv_prog; glamor_program xv_prog;
@ -538,6 +539,7 @@ void glamor_destroy_fbo(glamor_screen_private *glamor_priv,
glamor_pixmap_fbo *fbo); glamor_pixmap_fbo *fbo);
void glamor_pixmap_destroy_fbo(PixmapPtr pixmap); void glamor_pixmap_destroy_fbo(PixmapPtr pixmap);
Bool glamor_pixmap_fbo_fixup(ScreenPtr screen, 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 */ /* Return whether 'picture' is alpha-only */
static inline Bool glamor_picture_is_alpha(PicturePtr picture) static inline Bool glamor_picture_is_alpha(PicturePtr picture)

View File

@ -295,7 +295,7 @@ __glXDRIcontextWait(__GLXcontext * baseContext,
} }
if (ret) { if (ret) {
*error = -1; *error = cl->client->noClientException;
return TRUE; return TRUE;
} }

View File

@ -72,7 +72,7 @@ typedef struct DMXConfigCmdStruct {
DMXConfigList *xinputs; DMXConfigList *xinputs;
} DMXConfigCmd, *DMXConfigCmdPtr; } DMXConfigCmd, *DMXConfigCmdPtr;
DMXConfigEntryPtr dmxConfigEntry; extern DMXConfigEntryPtr dmxConfigEntry;
static DMXConfigCmd dmxConfigCmd; static DMXConfigCmd dmxConfigCmd;
static int dmxDisplaysFromCommandLine; static int dmxDisplaysFromCommandLine;

View File

@ -65,7 +65,7 @@ extern FILE *yyin;
#define DMX_CANVAS_WIDTH 400 #define DMX_CANVAS_WIDTH 400
#define DMX_CANVAS_HEIGHT 500 #define DMX_CANVAS_HEIGHT 500
DMXConfigEntryPtr dmxConfigEntry; extern DMXConfigEntryPtr dmxConfigEntry;
static DMXConfigVirtualPtr dmxConfigCurrent, dmxConfigNewVirtual; static DMXConfigVirtualPtr dmxConfigCurrent, dmxConfigNewVirtual;
static DMXConfigDisplayPtr dmxConfigCurrentDisplay, dmxConfigNewDisplay; static DMXConfigDisplayPtr dmxConfigCurrentDisplay, dmxConfigNewDisplay;
static int dmxConfigGrabbed, dmxConfigGrabbedFine; static int dmxConfigGrabbed, dmxConfigGrabbedFine;

View File

@ -47,8 +47,6 @@
#include "extinit.h" #include "extinit.h"
#include "glx_extinit.h" #include "glx_extinit.h"
int noGlxExtension;
/* /*
** Forward declarations. ** Forward declarations.
*/ */

View File

@ -137,6 +137,7 @@ static const OptionInfoRec Options[] = {
{OPTION_PAGEFLIP, "PageFlip", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_PAGEFLIP, "PageFlip", OPTV_BOOLEAN, {0}, FALSE},
{OPTION_ZAPHOD_HEADS, "ZaphodHeads", OPTV_STRING, {0}, FALSE}, {OPTION_ZAPHOD_HEADS, "ZaphodHeads", OPTV_STRING, {0}, FALSE},
{OPTION_DOUBLE_SHADOW, "DoubleShadow", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_DOUBLE_SHADOW, "DoubleShadow", OPTV_BOOLEAN, {0}, FALSE},
{OPTION_ATOMIC, "Atomic", OPTV_BOOLEAN, {0}, FALSE},
{-1, NULL, OPTV_NONE, {0}, FALSE} {-1, NULL, OPTV_NONE, {0}, FALSE}
}; };
@ -1044,8 +1045,12 @@ PreInit(ScrnInfoPtr pScrn, int flags)
#endif #endif
} }
ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 1); if (xf86ReturnOptValBool(ms->drmmode.Options, OPTION_ATOMIC, FALSE)) {
ms->atomic_modeset = (ret == 0); ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 1);
ms->atomic_modeset = (ret == 0);
} else {
ms->atomic_modeset = FALSE;
}
ms->kms_has_modifiers = FALSE; ms->kms_has_modifiers = FALSE;
ret = drmGetCap(ms->fd, DRM_CAP_ADDFB2_MODIFIERS, &value); ret = drmGetCap(ms->fd, DRM_CAP_ADDFB2_MODIFIERS, &value);

View File

@ -51,6 +51,7 @@ typedef enum {
OPTION_PAGEFLIP, OPTION_PAGEFLIP,
OPTION_ZAPHOD_HEADS, OPTION_ZAPHOD_HEADS,
OPTION_DOUBLE_SHADOW, OPTION_DOUBLE_SHADOW,
OPTION_ATOMIC,
} modesettingOpts; } modesettingOpts;
typedef struct typedef struct

View File

@ -3735,7 +3735,7 @@ drmmode_handle_uevents(int fd, void *closure)
goto out; goto out;
if (mode_res->count_crtcs != config->num_crtc) { 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; goto out_free_res;
} }
@ -3784,15 +3784,16 @@ drmmode_handle_uevents(int fd, void *closure)
drmmode_output_init(scrn, drmmode, mode_res, i, TRUE, 0); drmmode_output_init(scrn, drmmode, mode_res, i, TRUE, 0);
} }
/* Check to see if a lessee has disappeared */
drmmode_validate_leases(scrn);
if (changed) { if (changed) {
RRSetChanged(xf86ScrnToScreen(scrn)); RRSetChanged(xf86ScrnToScreen(scrn));
RRTellChanged(xf86ScrnToScreen(scrn)); RRTellChanged(xf86ScrnToScreen(scrn));
} }
out_free_res: out_free_res:
/* Check to see if a lessee has disappeared */
drmmode_validate_leases(scrn);
drmModeFreeResources(mode_res); drmModeFreeResources(mode_res);
out: out:
RRGetInfo(xf86ScrnToScreen(scrn), TRUE); RRGetInfo(xf86ScrnToScreen(scrn), TRUE);

View File

@ -176,7 +176,7 @@ xf86RotateRedisplay(ScreenPtr pScreen)
DamagePtr damage = xf86_config->rotation_damage; DamagePtr damage = xf86_config->rotation_damage;
RegionPtr region; RegionPtr region;
if (!damage) if (!damage || !pScreen->root)
return FALSE; return FALSE;
xf86RotatePrepare(pScreen); xf86RotatePrepare(pScreen);
region = DamageRegion(damage); region = DamageRegion(damage);

View File

@ -780,7 +780,7 @@ xf86UseMsg(void)
} }
void void
xf86OSInputThreadInit() xf86OSInputThreadInit(void)
{ {
return; return;
} }

View File

@ -89,7 +89,7 @@ xf86CloseConsole()
} }
void void
xf86OSInputThreadInit() xf86OSInputThreadInit(void)
{ {
return; return;
} }

View File

@ -399,7 +399,7 @@ xf86UseMsg(void)
} }
void void
xf86OSInputThreadInit() xf86OSInputThreadInit(void)
{ {
return; return;
} }

View File

@ -74,7 +74,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
/***************************************************************************/ /***************************************************************************/
void void
xf86OSInputThreadInit() xf86OSInputThreadInit(void)
{ {
/* /*
* Need to enable in input thread as well, as Solaris kernel tracks * Need to enable in input thread as well, as Solaris kernel tracks

View File

@ -24,3 +24,9 @@ void
xf86UseMsg(void) xf86UseMsg(void)
{ {
} }
void
xf86OSInputThreadInit(void)
{
return;
}

View File

@ -242,8 +242,12 @@ xwl_glamor_gbm_create_pixmap(ScreenPtr screen,
if (bo) { if (bo) {
pixmap = xwl_glamor_gbm_create_pixmap_for_bo(screen, bo, depth); pixmap = xwl_glamor_gbm_create_pixmap_for_bo(screen, bo, depth);
if (!pixmap) if (!pixmap) {
gbm_bo_destroy(bo); gbm_bo_destroy(bo);
}
else if (xwl_screen->rootless && hint == CREATE_PIXMAP_USAGE_BACKING_PIXMAP) {
glamor_clear_pixmap(pixmap);
}
} }
} }
@ -794,6 +798,10 @@ xwl_dmabuf_handle_modifier(void *data, struct zwp_linux_dmabuf_v1 *dmabuf,
struct xwl_format *xwl_format = NULL; struct xwl_format *xwl_format = NULL;
int i; 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++) { for (i = 0; i < xwl_screen->num_formats; i++) {
if (xwl_screen->formats[i].format == format) { if (xwl_screen->formats[i].format == format) {
xwl_format = &xwl_screen->formats[i]; xwl_format = &xwl_screen->formats[i];

View File

@ -60,6 +60,7 @@ xwl_present_window_get_priv(WindowPtr window)
xwl_present_window->msc = 1; xwl_present_window->msc = 1;
xwl_present_window->ust = GetTimeInMicros(); 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->event_list);
xorg_list_init(&xwl_present_window->release_queue); xorg_list_init(&xwl_present_window->release_queue);
@ -96,7 +97,7 @@ xwl_present_reset_timer(struct xwl_present_window *xwl_present_window)
if (xwl_present_has_events(xwl_present_window)) { if (xwl_present_has_events(xwl_present_window)) {
CARD32 timeout; CARD32 timeout;
if (xwl_present_window->frame_callback) if (!xorg_list_is_empty(&xwl_present_window->frame_callback_list))
timeout = TIMER_LEN_FLIP; timeout = TIMER_LEN_FLIP;
else else
timeout = TIMER_LEN_COPY; timeout = TIMER_LEN_COPY;
@ -119,10 +120,7 @@ xwl_present_cleanup(WindowPtr window)
if (!xwl_present_window) if (!xwl_present_window)
return; return;
if (xwl_present_window->frame_callback) { xorg_list_del(&xwl_present_window->frame_callback_list);
wl_callback_destroy(xwl_present_window->frame_callback);
xwl_present_window->frame_callback = NULL;
}
if (xwl_present_window->sync_callback) { if (xwl_present_window->sync_callback) {
wl_callback_destroy(xwl_present_window->sync_callback); wl_callback_destroy(xwl_present_window->sync_callback);
@ -244,7 +242,10 @@ xwl_present_timer_callback(OsTimerPtr timer,
{ {
struct xwl_present_window *xwl_present_window = arg; 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_msc_bump(xwl_present_window);
xwl_present_reset_timer(xwl_present_window); xwl_present_reset_timer(xwl_present_window);
@ -252,20 +253,10 @@ xwl_present_timer_callback(OsTimerPtr timer,
return 0; return 0;
} }
static void void
xwl_present_frame_callback(void *data, xwl_present_frame_callback(struct xwl_present_window *xwl_present_window)
struct wl_callback *callback,
uint32_t time)
{ {
struct xwl_present_window *xwl_present_window = data; xorg_list_del(&xwl_present_window->frame_callback_list);
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;
}
xwl_present_msc_bump(xwl_present_window); xwl_present_msc_bump(xwl_present_window);
@ -275,10 +266,6 @@ xwl_present_frame_callback(void *data,
xwl_present_reset_timer(xwl_present_window); xwl_present_reset_timer(xwl_present_window);
} }
static const struct wl_callback_listener xwl_present_frame_listener = {
xwl_present_frame_callback
};
static void static void
xwl_present_sync_callback(void *data, xwl_present_sync_callback(void *data,
struct wl_callback *callback, struct wl_callback *callback,
@ -360,6 +347,7 @@ xwl_present_queue_vblank(WindowPtr present_window,
uint64_t msc) uint64_t msc)
{ {
struct xwl_present_window *xwl_present_window = xwl_present_window_get_priv(present_window); 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; struct xwl_present_event *event;
event = malloc(sizeof *event); event = malloc(sizeof *event);
@ -372,7 +360,15 @@ xwl_present_queue_vblank(WindowPtr present_window,
xorg_list_append(&event->list, &xwl_present_window->event_list); 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); xwl_present_reset_timer(xwl_present_window);
return Success; return Success;
@ -488,15 +484,15 @@ xwl_present_flip(WindowPtr present_window,
/* We can flip directly to the main surface (full screen window without clips) */ /* We can flip directly to the main surface (full screen window without clips) */
wl_surface_attach(xwl_window->surface, buffer, 0, 0); wl_surface_attach(xwl_window->surface, buffer, 0, 0);
if (!xwl_present_window->frame_callback) { if (!xwl_window->frame_callback)
xwl_present_window->frame_callback = wl_surface_frame(xwl_window->surface); xwl_window_create_frame_callback(xwl_window);
wl_callback_add_listener(xwl_present_window->frame_callback,
&xwl_present_frame_listener, if (xorg_list_is_empty(&xwl_present_window->frame_callback_list)) {
xwl_present_window); xorg_list_add(&xwl_present_window->frame_callback_list,
&xwl_window->frame_callback_list);
} }
/* Realign timer */ /* Realign timer */
xwl_present_window->frame_timer_firing = FALSE;
xwl_present_reset_timer(xwl_present_window); xwl_present_reset_timer(xwl_present_window);
wl_surface_damage(xwl_window->surface, 0, 0, wl_surface_damage(xwl_window->surface, 0, 0,
@ -528,18 +524,12 @@ xwl_present_flips_stop(WindowPtr window)
} }
void 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 pending frame callback may never be called, so drop it and shorten
* the frame timer interval. * the frame timer interval.
*/ */
wl_callback_destroy(xwl_present_window->frame_callback); xorg_list_del(&xwl_present_window->frame_callback_list);
xwl_present_window->frame_callback = NULL;
xwl_present_reset_timer(xwl_present_window); xwl_present_reset_timer(xwl_present_window);
} }

View File

@ -40,7 +40,11 @@
#ifdef XF86VIDMODE #ifdef XF86VIDMODE
#include <X11/extensions/xf86vmproto.h> #include <X11/extensions/xf86vmproto.h>
_X_EXPORT Bool noXFree86VidModeExtension; extern _X_EXPORT Bool noXFree86VidModeExtension;
#endif
#ifdef XWL_HAS_GLAMOR
#include <glamor.h>
#endif #endif
void void
@ -596,6 +600,10 @@ ensure_surface_for_window(WindowPtr window)
dixSetPrivate(&window->devPrivates, &xwl_window_private_key, xwl_window); dixSetPrivate(&window->devPrivates, &xwl_window_private_key, xwl_window);
xorg_list_init(&xwl_window->link_damage); 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); xwl_window_init_allow_commits(xwl_window);
return TRUE; return TRUE;
@ -680,11 +688,6 @@ xwl_unrealize_window(WindowPtr window)
xwl_screen->UnrealizeWindow = screen->UnrealizeWindow; xwl_screen->UnrealizeWindow = screen->UnrealizeWindow;
screen->UnrealizeWindow = xwl_unrealize_window; 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); xwl_window = xwl_window_get(window);
if (!xwl_window) if (!xwl_window)
return ret; return ret;
@ -696,6 +699,18 @@ xwl_unrealize_window(WindowPtr window)
if (xwl_window->frame_callback) if (xwl_window->frame_callback)
wl_callback_destroy(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); free(xwl_window);
dixSetPrivate(&window->devPrivates, &xwl_window_private_key, NULL); dixSetPrivate(&window->devPrivates, &xwl_window_private_key, NULL);
@ -737,12 +752,32 @@ frame_callback(void *data,
wl_callback_destroy (xwl_window->frame_callback); wl_callback_destroy (xwl_window->frame_callback);
xwl_window->frame_callback = NULL; 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 = { static const struct wl_callback_listener frame_listener = {
frame_callback 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 static Bool
xwl_destroy_window(WindowPtr window) xwl_destroy_window(WindowPtr window)
{ {
@ -813,19 +848,17 @@ xwl_window_post_damage(struct xwl_window *xwl_window)
box->x2 - box->x1, box->y2 - box->y1); box->x2 - box->x1, box->y2 - box->y1);
} }
xwl_window->frame_callback = wl_surface_frame(xwl_window->surface); xwl_window_create_frame_callback(xwl_window);
wl_callback_add_listener(xwl_window->frame_callback, &frame_listener, xwl_window);
wl_surface_commit(xwl_window->surface);
DamageEmpty(window_get_damage(xwl_window->window)); DamageEmpty(window_get_damage(xwl_window->window));
xorg_list_del(&xwl_window->link_damage);
} }
static void static void
xwl_screen_post_damage(struct xwl_screen *xwl_screen) xwl_screen_post_damage(struct xwl_screen *xwl_screen)
{ {
struct xwl_window *xwl_window, *next_xwl_window; 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, xorg_list_for_each_entry_safe(xwl_window, next_xwl_window,
&xwl_screen->damage_window_list, link_damage) { &xwl_screen->damage_window_list, link_damage) {
@ -843,6 +876,24 @@ xwl_screen_post_damage(struct xwl_screen *xwl_screen)
#endif #endif
xwl_window_post_damage(xwl_window); 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);
} }
} }

View File

@ -183,6 +183,7 @@ struct xwl_window {
struct wl_callback *frame_callback; struct wl_callback *frame_callback;
Bool allow_commits; Bool allow_commits;
#ifdef GLAMOR_HAS_GBM #ifdef GLAMOR_HAS_GBM
struct xorg_list frame_callback_list;
Bool present_flipped; Bool present_flipped;
#endif #endif
}; };
@ -192,15 +193,13 @@ struct xwl_present_window {
struct xwl_screen *xwl_screen; struct xwl_screen *xwl_screen;
struct xwl_present_event *sync_flip; struct xwl_present_event *sync_flip;
WindowPtr window; WindowPtr window;
struct xorg_list link; struct xorg_list frame_callback_list;
uint64_t msc; uint64_t msc;
uint64_t ust; uint64_t ust;
OsTimerPtr frame_timer; OsTimerPtr frame_timer;
Bool frame_timer_firing;
struct wl_callback *frame_callback;
struct wl_callback *sync_callback; struct wl_callback *sync_callback;
struct xorg_list event_list; struct xorg_list event_list;
@ -378,6 +377,8 @@ struct xwl_output {
Bool xdg_output_done; Bool xdg_output_done;
}; };
void xwl_window_create_frame_callback(struct xwl_window *xwl_window);
void xwl_sync_events (struct xwl_screen *xwl_screen); void xwl_sync_events (struct xwl_screen *xwl_screen);
Bool xwl_screen_init_cursor(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_window *xwl_window);
void xwl_glamor_egl_make_current(struct xwl_screen *xwl_screen); void xwl_glamor_egl_make_current(struct xwl_screen *xwl_screen);
#ifdef GLAMOR_HAS_GBM #ifdef GLAMOR_HAS_GBM
void xwl_present_frame_callback(struct xwl_present_window *xwl_present_window);
Bool xwl_present_init(ScreenPtr screen); Bool xwl_present_init(ScreenPtr screen);
void xwl_present_cleanup(WindowPtr window); 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 */ #endif /* GLAMOR_HAS_GBM */
#ifdef XV #ifdef XV

View File

@ -557,6 +557,11 @@ void
ResetCurrentRequest(ClientPtr client) ResetCurrentRequest(ClientPtr client)
{ {
OsCommPtr oc = (OsCommPtr) client->osPrivate; OsCommPtr oc = (OsCommPtr) client->osPrivate;
/* ignore dying clients */
if (!oc)
return;
register ConnectionInputPtr oci = oc->input; register ConnectionInputPtr oci = oc->input;
register xReq *request; register xReq *request;
int gotnow, needed; int gotnow, needed;

View File

@ -33,7 +33,7 @@
#include "tests-common.h" #include "tests-common.h"
ScreenInfo screenInfo; extern ScreenInfo screenInfo;
static void static void
dix_version_compare(void) dix_version_compare(void)

View File

@ -37,7 +37,7 @@
#include "protocol-common.h" #include "protocol-common.h"
ClientRec client_window; extern ClientRec client_window;
static ClientRec client_request; static ClientRec client_request;
static void static void

View File

@ -45,6 +45,8 @@ static ClientRec server_client;
void *global_userdata; void *global_userdata;
void (*reply_handler) (ClientPtr client, int len, char *data, void *userdata);
int enable_GrabButton_wrap = 1; int enable_GrabButton_wrap = 1;
int enable_XISetEventMask_wrap = 1; int enable_XISetEventMask_wrap = 1;

View File

@ -99,7 +99,7 @@ extern void *global_userdata;
* The reply handler called from WriteToClient. Set this handler if you need * The reply handler called from WriteToClient. Set this handler if you need
* to check the reply values. * 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(). * The default screen used for the windows. Initialized by init_simple().

View File

@ -46,7 +46,7 @@ static struct {
int win; int win;
} test_data; } test_data;
ClientRec client_window; extern ClientRec client_window;
static ClientRec client_request; static ClientRec client_request;
static void static void

View File

@ -60,7 +60,7 @@ static struct {
int mask_len; int mask_len;
} test_data; } test_data;
ClientRec client_window; extern ClientRec client_window;
/* AddResource is called from XISetSEventMask, we don't need this */ /* AddResource is called from XISetSEventMask, we don't need this */
Bool Bool

View File

@ -41,7 +41,7 @@
#include "protocol-common.h" #include "protocol-common.h"
ClientRec client_window; extern ClientRec client_window;
static ClientRec client_request; static ClientRec client_request;
#define N_MODS 7 #define N_MODS 7

View File

@ -54,7 +54,7 @@ struct test_data {
int num_devices_in_reply; int num_devices_in_reply;
}; };
ClientRec client_window; extern ClientRec client_window;
static void reply_XIQueryDevice_data(ClientPtr client, int len, char *data, static void reply_XIQueryDevice_data(ClientPtr client, int len, char *data,
void *closure); void *closure);

View File

@ -41,7 +41,7 @@
#include "protocol-common.h" #include "protocol-common.h"
ClientRec client_window; extern ClientRec client_window;
static ClientRec client_request; static ClientRec client_request;
static void reply_XIQueryPointer_data(ClientPtr client, int len, static void reply_XIQueryPointer_data(ClientPtr client, int len,
char *data, void *closure); char *data, void *closure);

View File

@ -58,7 +58,7 @@ struct test_data {
int minor_expected; int minor_expected;
}; };
ClientRec client_window; extern ClientRec client_window;
static void static void
reply_XIQueryVersion(ClientPtr client, int len, char *data, void *closure) reply_XIQueryVersion(ClientPtr client, int len, char *data, void *closure)

View File

@ -62,7 +62,7 @@
static unsigned char *data[4096 * 20]; /* the request data buffer */ static unsigned char *data[4096 * 20]; /* the request data buffer */
ClientRec client_window; extern ClientRec client_window;
int int
__real_XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client, __real_XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client,

View File

@ -48,7 +48,7 @@
#include "protocol-common.h" #include "protocol-common.h"
ClientRec client_window; extern ClientRec client_window;
static ClientRec client_request; static ClientRec client_request;
static void static void

View File

@ -44,7 +44,7 @@
static int expected_x = SPRITE_X; static int expected_x = SPRITE_X;
static int expected_y = SPRITE_Y; static int expected_y = SPRITE_Y;
ClientRec client_window; extern ClientRec client_window;
/** /**
* This function overrides the one in the screen rec. * This function overrides the one in the screen rec.