Update to xserver 1.20.7 plus 2 extra fixes from upstream. ok jsg@

This commit is contained in:
matthieu 2020-01-26 13:48:54 +00:00
parent f3fa3831bb
commit 40d42722f6
32 changed files with 521 additions and 58 deletions

View File

@ -1,3 +1,271 @@
commit 489f4191f3c881c6c8acce97ec612167a4ae0f33
Author: Matt Turner <mattst88@gmail.com>
Date: Mon Jan 13 14:47:48 2020 -0800
xserver 1.20.7
Signed-off-by: Matt Turner <mattst88@gmail.com>
commit 279789183ed377127073955d21d44ee3b01ac763
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Mon Sep 23 15:12:01 2019 -0700
ospoll: Fix Solaris ports implementation to build on Solaris 11.4
Wrong version got committed, but wasn't noticed since it only builds
with meson, not autoconf.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 0e8c0d2f238e5d50daaf4672bd80ad519673b5e3)
commit cc503031c32496efb28ed81d32a547ded46a0815
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Feb 21 15:38:07 2019 -0800
os-support/solaris: Set IOPL for input thread too
Since the Solaris kernel tracks IOPL per thread, and doesn't inherit
raised IOPL levels when creating a new thread, we need to turn it on
in the input thread for input drivers like vmmouse that need register
access to work correctly.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 12769c516d9356bd92f90e2f53a4853dbfdc4aed)
commit f778e76eb4bc6b9219a8b1a903a2fb1a30c2c92a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Feb 21 15:35:38 2019 -0800
Add xf86OSInputThreadInit call from common layer into os-support layer
Allows os backends to run additional code as necessary to set up the
input thread.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit ea1527a8a662dcc5ac3ed49135740aa5f24f74bc)
commit e3f26605d85d987da434640f52646d728f1fe919
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Feb 21 15:22:57 2019 -0800
Add ddxInputThread call from os layer into ddx layer
Allows ddx's to run additional code as necessary to set up the
input thread.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 4ad21c3247d98ac6c5ad71fa36be60ed04f7c92c)
commit bb405cdc85b6e31c0beef60a07a2cfe5b87dcde6
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Feb 21 14:51:22 2019 -0800
os-support/solaris: Drop ExtendedEnabled global variable
Keeping track of kernel state in user space doesn't buy us anything,
and introduces bugs, as we were keeping global state but the Solaris
kernel tracks IOPL per thread.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 7533fa9bd5a4a0f7743d553be186514d684308c8)
commit 977f3acfceb91f1dd10c8bf84b9d7515b2a59457
Author: Michel Dänzer <mdaenzer@redhat.com>
Date: Fri Dec 20 15:51:00 2019 +0100
glamor: Only use dual blending with GLSL >= 1.30
It can't be used with older GLSL. Fixes a crash when attempting to
anyway.
Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/97
Fixes: e7308b6c7756 "glamor: Add support for CA rendering in a single pass."
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(Cherry picked from commit 5bfca0038e92d61e58d4dc1a54748faef8273023)
commit cfc5e5040c93486323165196550dbe18aec46402
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Thu Dec 26 13:40:17 2019 -0800
modesetting: Check whether RandR was initialized before calling rrGetScrPriv
Calling rrGetScrPriv when RandR isn't initialized causes an assertion
failure that aborts the server:
Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion `key->initialized' failed.
Thread 1 "Xorg" received signal SIGABRT, Aborted.
0x00007ffff78a8f25 in raise () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007ffff78a8f25 in raise () from /usr/lib/libc.so.6
#1 0x00007ffff7892897 in abort () from /usr/lib/libc.so.6
#2 0x00007ffff7892767 in __assert_fail_base.cold () from /usr/lib/libc.so.6
#3 0x00007ffff78a1526 in __assert_fail () from /usr/lib/libc.so.6
#4 0x00007ffff7fb57c1 in dixGetPrivateAddr (privates=0x555555ab1b60, key=0x555555855720 <rrPrivKeyRec>) at ../include/privates.h:121
#5 0x00007ffff7fb5822 in dixGetPrivate (privates=0x555555ab1b60, key=0x555555855720 <rrPrivKeyRec>) at ../include/privates.h:136
#6 0x00007ffff7fb586a in dixLookupPrivate (privates=0x555555ab1b60, key=0x555555855720 <rrPrivKeyRec>) at ../include/privates.h:166
#7 0x00007ffff7fb8445 in CreateScreenResources (pScreen=0x555555ab1790) at ../hw/xfree86/drivers/modesetting/driver.c:1335
#8 0x000055555576c5e4 in xf86CrtcCreateScreenResources (screen=0x555555ab1790) at ../hw/xfree86/modes/xf86Crtc.c:744
#9 0x00005555555d8bb6 in dix_main (argc=4, argv=0x7fffffffead8, envp=0x7fffffffeb00) at ../dix/main.c:214
#10 0x00005555557a4f0b in main (argc=4, argv=0x7fffffffead8, envp=0x7fffffffeb00) at ../dix/stubmain.c:34
This can happen, for example, if the server is configured with Xinerama
and there is more than one X screen:
Section "ServerLayout"
Identifier "crash"
Screen 0 "modesetting"
Screen 1 "dummy" RightOf "modesetting"
Option "Xinerama"
EndSection
Section "Device"
Identifier "modesetting"
Driver "modesetting"
EndSection
Section "Screen"
Identifier "modesetting"
Device "modesetting"
EndSection
Section "Device"
Identifier "dummy"
Driver "dummy"
EndSection
Section "Screen"
Identifier "dummy"
Device "dummy"
EndSection
The problem does not reproduce if there is only one X screen because of
this code in xf86RandR12Init:
#ifdef PANORAMIX
/* XXX disable RandR when using Xinerama */
if (!noPanoramiXExtension) {
if (xf86NumScreens == 1)
noPanoramiXExtension = TRUE;
else
return TRUE;
}
#endif
Fix the problem by checking dixPrivateKeyRegistered(rrPrivKey) before
calling rrGetScrPriv. This is similar to what the xf86-video-amdgpu
driver does:
https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/blob/fd66f5c0bea2b7c22a47bfd5eb1f22d32d166d9c/src/amdgpu_kms.c#L388
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
(cherry picked from commit 4226c6d0329df440551b7b91ae573a82c64a1ac9)
commit fb2540648a293def46bf0afa183e0884fa4496be
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed May 29 16:19:55 2019 +1000
Xi: return AlreadyGrabbed for key grabs > 255
We can't have high keycodes because everything in XKB relies on 8 bits. XI2's
API allows for 32-bit keycodes so we have to take those but nothing in the
server is really ready for this. The effect of this right now is that any high
keycode grab is clipped to 255 and thus ends up grabbing a different key
instead.
https://bugzilla.redhat.com/show_bug.cgi?id=1697804
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit f4cdbf640b6440df4af784ca35e1b1340965cc10)
commit 87ca1bdf6935c4b11b41ca071f1f4b8d8347fee9
Author: Michel Dänzer <mdaenzer@redhat.com>
Date: Tue Dec 3 18:39:40 2019 +0100
xwayland: Do flush GPU work in xwl_present_flush
The Present code sends the idle notification event to the client after
xwl_present_flush returns. If we don't flush our GPU work here, the
client may race to draw another frame to the same buffer, so we may end
up copying (parts of) that new frame instead of the one we meant to.
Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/835
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
(Cherry picked from commit 2a2234ad1a0fe88400c1511fea67741e4ad09f7f)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
commit 8aad09dd79f0504715edac56e21439809a5d529e
Author: Michel Dänzer <mdaenzer@redhat.com>
Date: Tue Nov 26 17:17:12 2019 +0100
modesetting: Clear new screen pixmap storage on RandR resize
Fixes random garbage being visible intermittently.
Reviewed-by: Adam Jackson <ajax@redhat.com>
(Cherry picked from commit 9ba13bac9dd076f166ff0d063fc144b904a40d12)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
commit 094f42cdfe5d4c0b8e329445c529ee1e59278999
Author: Michel Dänzer <mdaenzer@redhat.com>
Date: Tue Nov 26 17:16:37 2019 +0100
xfree86/modes: Call xf86RotateRedisplay from xf86CrtcRotate
If a new rotate buffer was allocated. This makes sure the new buffer
has valid transformed contents when it starts being displayed.
Reviewed-by: Adam Jackson <ajax@redhat.com>
(Cherry picked from commit 327df450ffcf5bda5b4254db0208d355860d1010)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
commit b50175fe867ae067888049318264824524c0616a
Author: Michel Dänzer <mdaenzer@redhat.com>
Date: Tue Nov 26 17:14:46 2019 +0100
modesetting: Call glamor_finish from drmmode_crtc_set_mode
This makes sure any pending drawing to a new scanout buffer will be
visible from the start.
This makes the finish call in drmmode_copy_fb superfluous, so remove it.
Reviewed-by: Adam Jackson <ajax@redhat.com>
(Cherry picked from commit c66c548eabf06835cb0cb906598fb87c7bb30cf4)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
commit 255d8c3c36a9d52b3acc5e016efa0ef0f2371f79
Author: Kenneth Graunke <kenneth@whitecape.org>
Date: Thu Nov 21 23:03:50 2019 -0800
modesetting: Use EGL_MESA_query_driver to select DRI driver if possible
We now ask Glamor to use EGL_MESA_query_driver to obtain the DRI driver
name; if successful, we use that as the DRI driver name. Following the
existing dri2.c logic, we also use the same name for the VDPAU driver,
except for i965 (and now iris), where we switch to the "va_gl" fallback.
This allows us to bypass the PCI ID lists in xserver and centralize the
driver selection mechanism inside Mesa. The hope is that we no longer
have to update these lists for any future hardware.
(backported from commit 8d4be7f6c4f7c673d7ec1a6bfdef944907a3916e)
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
commit 2a1a96d956f4023796737d26a32354e940c8e6cf
Author: Kenneth Graunke <kenneth@whitecape.org>
Date: Thu Nov 21 23:01:28 2019 -0800
glamor: Add a function to get the driver name via EGL_MESA_query_driver
This maps to eglGetDisplayDriverName if EGL_MESA_query_render is
supported, otherwise it returns NULL.
(cherry picked from commit 195c2ef8f9f07b9bdabc0f554a9033b7857b99c7)
commit 6b3fafa9bfa94b9b04a1a44dc52afb7c4bc250ce commit 6b3fafa9bfa94b9b04a1a44dc52afb7c4bc250ce
Author: Matt Turner <mattst88@gmail.com> Author: Matt Turner <mattst88@gmail.com>
Date: Fri Nov 22 17:52:04 2019 -0500 Date: Fri Nov 22 17:52:04 2019 -0500

View File

@ -203,8 +203,14 @@ ProcXIPassiveGrabDevice(ClientPtr client)
&param, XI2, &mask); &param, XI2, &mask);
break; break;
case XIGrabtypeKeycode: case XIGrabtypeKeycode:
status = GrabKey(client, dev, mod_dev, stuff->detail, /* XI2 allows 32-bit keycodes but thanks to XKB we can never
&param, XI2, &mask); * implement this. Just return an error for all keycodes that
* cannot work anyway */
if (stuff->detail > 255)
status = XIAlreadyGrabbed;
else
status = GrabKey(client, dev, mod_dev, stuff->detail,
&param, XI2, &mask);
break; break;
case XIGrabtypeEnter: case XIGrabtypeEnter:
case XIGrabtypeFocusIn: case XIGrabtypeFocusIn:

4
xserver/aclocal.m4 vendored
View File

@ -1345,7 +1345,7 @@ m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4]) m4_include([m4/lt~obsolete.m4])
dnl fontutil.m4. Generated from fontutil.m4.in by configure. dnl fontutil.m4. Generated from fontutil.m4.in by configure.
dnl dnl
dnl This file comes from X.Org's font-util 1.3.1 dnl This file comes from X.Org's font-util 1.3.2
dnl dnl
dnl Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
dnl dnl
@ -1410,7 +1410,7 @@ dnl from the copyright holders.
# See the "minimum version" comment for each macro you use to see what # See the "minimum version" comment for each macro you use to see what
# version you require. # version you require.
m4_defun([XORG_FONT_MACROS_VERSION],[ m4_defun([XORG_FONT_MACROS_VERSION],[
m4_define([vers_have], [1.3.1]) m4_define([vers_have], [1.3.2])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,, m4_if(m4_cmp(maj_have, maj_needed), 0,,

41
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.6. # Generated by GNU Autoconf 2.69 for xorg-server 1.20.7.
# #
# 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.6' PACKAGE_VERSION='1.20.7'
PACKAGE_STRING='xorg-server 1.20.6' PACKAGE_STRING='xorg-server 1.20.7'
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.6 to adapt to many kinds of systems. \`configure' configures xorg-server 1.20.7 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.6:";; short | recursive ) echo "Configuration of xorg-server 1.20.7:";;
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.6) (default: 1.20.7)
--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.6) CFBundleShortVersionString (default: 1.20.7)
--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.6 xorg-server configure 1.20.7
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.6, which was It was created by xorg-server $as_me 1.20.7, 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="2019-11-22" RELEASE_DATE="2020-01-13"
RELEASE_NAME="Enchiladas de Queso" RELEASE_NAME="Stuffed French Toast"
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.6' VERSION='1.20.7'
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.6" BUNDLE_VERSION="1.20.7"
fi fi
@ -29335,6 +29335,17 @@ fi
$as_echo "#define GLAMOR_HAS_EGL_QUERY_DMABUF 1" >>confdefs.h $as_echo "#define GLAMOR_HAS_EGL_QUERY_DMABUF 1" >>confdefs.h
fi
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"epoxy >= 1.5.4\""; } >&5
($PKG_CONFIG --exists --print-errors "epoxy >= 1.5.4") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
$as_echo "#define GLAMOR_HAS_EGL_QUERY_DRIVER 1" >>confdefs.h
fi fi
@ -32950,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.6, which was This file was extended by xorg-server $as_me 1.20.7, 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
@ -33016,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.6 xorg-server config.status 1.20.7
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.6, [https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server) AC_INIT([xorg-server], 1.20.7, [https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server)
RELEASE_DATE="2019-11-22" RELEASE_DATE="2020-01-13"
RELEASE_NAME="Enchiladas de Queso" RELEASE_NAME="Stuffed French Toast"
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])
@ -2122,6 +2122,10 @@ if test "x$GLAMOR" = xyes; then
[AC_DEFINE(GLAMOR_HAS_EGL_QUERY_DMABUF, 1, [Have GLAMOR_HAS_EGL_QUERY_DMABUF])], [AC_DEFINE(GLAMOR_HAS_EGL_QUERY_DMABUF, 1, [Have GLAMOR_HAS_EGL_QUERY_DMABUF])],
[]) [])
PKG_CHECK_EXISTS(epoxy >= 1.5.4,
[AC_DEFINE(GLAMOR_HAS_EGL_QUERY_DRIVER, 1, [Have GLAMOR_HAS_EGL_QUERY_DRIVER])],
[])
PKG_CHECK_MODULES(GBM, "$LIBGBM", [GBM=yes], [GBM=no]) PKG_CHECK_MODULES(GBM, "$LIBGBM", [GBM=yes], [GBM=no])
if test "x$GBM" = xyes; then if test "x$GBM" = xyes; then
AC_DEFINE(GLAMOR_HAS_GBM, 1, AC_DEFINE(GLAMOR_HAS_GBM, 1,

View File

@ -624,6 +624,7 @@ glamor_init(ScreenPtr screen, unsigned int flags)
epoxy_gl_version() >= 30 || epoxy_gl_version() >= 30 ||
epoxy_has_gl_extension("GL_NV_pack_subimage"); epoxy_has_gl_extension("GL_NV_pack_subimage");
glamor_priv->has_dual_blend = glamor_priv->has_dual_blend =
glamor_priv->glsl_version >= 130 &&
epoxy_has_gl_extension("GL_ARB_blend_func_extended"); epoxy_has_gl_extension("GL_ARB_blend_func_extended");
glamor_priv->can_copyplane = (gl_version >= 30); glamor_priv->can_copyplane = (gl_version >= 30);

View File

@ -395,6 +395,8 @@ extern _X_EXPORT Bool
struct gbm_bo *bo, struct gbm_bo *bo,
Bool used_modifiers); Bool used_modifiers);
extern _X_EXPORT const char *glamor_egl_get_driver_name(ScreenPtr screen);
#endif #endif
extern _X_EXPORT void glamor_egl_screen_init(ScreenPtr screen, extern _X_EXPORT void glamor_egl_screen_init(ScreenPtr screen,

View File

@ -688,6 +688,22 @@ glamor_get_modifiers(ScreenPtr screen, uint32_t format,
#endif #endif
} }
_X_EXPORT const char *
glamor_egl_get_driver_name(ScreenPtr screen)
{
#ifdef GLAMOR_HAS_EGL_QUERY_DRIVER
struct glamor_egl_screen_private *glamor_egl;
glamor_egl = glamor_egl_get_screen_private(xf86ScreenToScrn(screen));
if (epoxy_has_egl_extension(glamor_egl->display, "EGL_MESA_query_driver"))
return eglGetDisplayDriverName(glamor_egl->display);
#endif
return NULL;
}
static Bool static Bool
glamor_egl_destroy_pixmap(PixmapPtr pixmap) glamor_egl_destroy_pixmap(PixmapPtr pixmap)
{ {

View File

@ -838,6 +838,15 @@ ddxGiveUp(enum ExitCode error)
AbortDDX(error); AbortDDX(error);
} }
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
}
#endif
/** This function is called in Xserver/os/osinit.c from \a OsInit(). */ /** This function is called in Xserver/os/osinit.c from \a OsInit(). */
void void
OsVendorInit(void) OsVendorInit(void)

View File

@ -100,6 +100,15 @@ CloseInput(void)
KdCloseInput(); KdCloseInput();
} }
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
}
#endif
#ifdef DDXBEFORERESET #ifdef DDXBEFORERESET
void void
ddxBeforeReset(void) ddxBeforeReset(void)

View File

@ -232,6 +232,15 @@ ddxBeforeReset(void)
} }
#endif #endif
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
}
#endif
void void
ddxUseMsg(void) ddxUseMsg(void)
{ {

View File

@ -1463,3 +1463,13 @@ ddxBeforeReset(void)
{ {
} }
#endif #endif
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
xf86OSInputThreadInit();
}
#endif

View File

@ -74,7 +74,7 @@
* mask is 0xFFFF0000. * mask is 0xFFFF0000.
*/ */
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(24, 0) #define ABI_VIDEODRV_VERSION SET_ABI_VERSION(24, 1)
#define ABI_XINPUT_VERSION SET_ABI_VERSION(24, 1) #define ABI_XINPUT_VERSION SET_ABI_VERSION(24, 1)
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(10, 0) #define ABI_EXTENSION_VERSION SET_ABI_VERSION(10, 0)

View File

@ -1033,6 +1033,7 @@ ms_dri2_screen_init(ScreenPtr screen)
ScrnInfoPtr scrn = xf86ScreenToScrn(screen); ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
modesettingPtr ms = modesettingPTR(scrn); modesettingPtr ms = modesettingPTR(scrn);
DRI2InfoRec info; DRI2InfoRec info;
const char *driver_names[2] = { NULL, NULL };
if (!glamor_supports_pixmap_import_export(screen)) { if (!glamor_supports_pixmap_import_export(screen)) {
xf86DrvMsg(scrn->scrnIndex, X_WARNING, xf86DrvMsg(scrn->scrnIndex, X_WARNING,
@ -1071,9 +1072,30 @@ ms_dri2_screen_init(ScreenPtr screen)
info.DestroyBuffer2 = ms_dri2_destroy_buffer2; info.DestroyBuffer2 = ms_dri2_destroy_buffer2;
info.CopyRegion2 = ms_dri2_copy_region2; info.CopyRegion2 = ms_dri2_copy_region2;
/* These two will be filled in by dri2.c */ /* Ask Glamor to obtain the DRI driver name via EGL_MESA_query_driver. */
info.numDrivers = 0; driver_names[0] = glamor_egl_get_driver_name(screen);
info.driverNames = NULL;
if (driver_names[0]) {
/* There is no VDPAU driver for Intel, fallback to the generic
* OpenGL/VAAPI va_gl backend to emulate VDPAU. Otherwise,
* guess that the DRI and VDPAU drivers have the same name.
*/
if (strcmp(driver_names[0], "i965") == 0 ||
strcmp(driver_names[0], "iris") == 0) {
driver_names[1] = "va_gl";
} else {
driver_names[1] = driver_names[0];
}
info.numDrivers = 2;
info.driverNames = driver_names;
} else {
/* EGL_MESA_query_driver was unavailable; let dri2.c select the
* driver and fill in these fields for us.
*/
info.numDrivers = 0;
info.driverNames = NULL;
}
return DRI2ScreenInit(screen, &info); return DRI2ScreenInit(screen, &info);
} }

View File

@ -1338,7 +1338,6 @@ static Bool
CreateScreenResources(ScreenPtr pScreen) CreateScreenResources(ScreenPtr pScreen)
{ {
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen);
modesettingPtr ms = modesettingPTR(pScrn); modesettingPtr ms = modesettingPTR(pScrn);
PixmapPtr rootPixmap; PixmapPtr rootPixmap;
Bool ret; Bool ret;
@ -1404,10 +1403,14 @@ CreateScreenResources(ScreenPtr pScreen)
} }
} }
pScrPriv->rrEnableSharedPixmapFlipping = msEnableSharedPixmapFlipping; if (dixPrivateKeyRegistered(rrPrivKey)) {
pScrPriv->rrDisableSharedPixmapFlipping = msDisableSharedPixmapFlipping; rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen);
pScrPriv->rrStartFlippingPixmapTracking = msStartFlippingPixmapTracking; pScrPriv->rrEnableSharedPixmapFlipping = msEnableSharedPixmapFlipping;
pScrPriv->rrDisableSharedPixmapFlipping = msDisableSharedPixmapFlipping;
pScrPriv->rrStartFlippingPixmapTracking = msStartFlippingPixmapTracking;
}
return ret; return ret;
} }

View File

@ -39,6 +39,7 @@
#include "dumb_bo.h" #include "dumb_bo.h"
#include "xf86str.h" #include "xf86str.h"
#include "X11/Xatom.h" #include "X11/Xatom.h"
#include "mi.h"
#include "micmap.h" #include "micmap.h"
#include "xf86cmap.h" #include "xf86cmap.h"
#include "xf86DDC.h" #include "xf86DDC.h"
@ -757,6 +758,7 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
drmmode_ptr drmmode = drmmode_crtc->drmmode; drmmode_ptr drmmode = drmmode_crtc->drmmode;
ScreenPtr screen = crtc->scrn->pScreen;
drmModeModeInfo kmode; drmModeModeInfo kmode;
int output_count = 0; int output_count = 0;
uint32_t *output_ids = NULL; uint32_t *output_ids = NULL;
@ -767,6 +769,12 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
if (!drmmode_crtc_get_fb_id(crtc, &fb_id, &x, &y)) if (!drmmode_crtc_get_fb_id(crtc, &fb_id, &x, &y))
return 1; return 1;
#ifdef GLAMOR_HAS_GBM
/* Make sure any pending drawing will be visible in a new scanout buffer */
if (drmmode->glamor)
glamor_finish(screen);
#endif
if (ms->atomic_modeset) { if (ms->atomic_modeset) {
drmModeAtomicReq *req = drmModeAtomicAlloc(); drmModeAtomicReq *req = drmModeAtomicAlloc();
Bool active; Bool active;
@ -1455,8 +1463,6 @@ drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
FreeScratchGC(gc); FreeScratchGC(gc);
glamor_finish(pScreen);
pScreen->canDoBGNoneRoot = TRUE; pScreen->canDoBGNoneRoot = TRUE;
if (drmmode->fbcon_pixmap) if (drmmode->fbcon_pixmap)
@ -1793,6 +1799,19 @@ drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)
&drmmode_crtc->prime_pixmap); &drmmode_crtc->prime_pixmap);
} }
static void
drmmode_clear_pixmap(PixmapPtr pixmap)
{
ScreenPtr screen = pixmap->drawable.pScreen;
GCPtr gc;
gc = GetScratchGC(pixmap->drawable.depth, screen);
if (gc) {
miClearDrawable(&pixmap->drawable, gc);
FreeScratchGC(gc);
}
}
static void * static void *
drmmode_shadow_allocate(xf86CrtcPtr crtc, int width, int height) drmmode_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
{ {
@ -3223,6 +3242,8 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
if (!drmmode_glamor_handle_new_screen_pixmap(drmmode)) if (!drmmode_glamor_handle_new_screen_pixmap(drmmode))
goto fail; goto fail;
drmmode_clear_pixmap(ppix);
for (i = 0; i < xf86_config->num_crtc; i++) { for (i = 0; i < xf86_config->num_crtc; i++) {
xf86CrtcPtr crtc = xf86_config->crtc[i]; xf86CrtcPtr crtc = xf86_config->crtc[i];
@ -3255,13 +3276,19 @@ static void
drmmode_validate_leases(ScrnInfoPtr scrn) drmmode_validate_leases(ScrnInfoPtr scrn)
{ {
ScreenPtr screen = scrn->pScreen; ScreenPtr screen = scrn->pScreen;
rrScrPrivPtr scr_priv = rrGetScrPriv(screen); rrScrPrivPtr scr_priv;
modesettingPtr ms = modesettingPTR(scrn); modesettingPtr ms = modesettingPTR(scrn);
drmmode_ptr drmmode = &ms->drmmode; drmmode_ptr drmmode = &ms->drmmode;
drmModeLesseeListPtr lessees; drmModeLesseeListPtr lessees;
RRLeasePtr lease, next; RRLeasePtr lease, next;
int l; int l;
/* Bail out if RandR wasn't initialized. */
if (!dixPrivateKeyRegistered(rrPrivKey))
return;
scr_priv = rrGetScrPriv(screen);
/* We can't talk to the kernel about leases when VT switched */ /* We can't talk to the kernel about leases when VT switched */
if (!scrn->vtSema) if (!scrn->vtSema)
return; return;

View File

@ -220,7 +220,7 @@ static RRCrtcPtr
ms_covering_randr_crtc(ScreenPtr pScreen, BoxPtr box, Bool screen_is_ms) ms_covering_randr_crtc(ScreenPtr pScreen, BoxPtr box, Bool screen_is_ms)
{ {
ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen);
rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen); rrScrPrivPtr pScrPriv;
RRCrtcPtr crtc, best_crtc; RRCrtcPtr crtc, best_crtc;
int coverage, best_coverage; int coverage, best_coverage;
int c; int c;
@ -230,6 +230,11 @@ ms_covering_randr_crtc(ScreenPtr pScreen, BoxPtr box, Bool screen_is_ms)
best_crtc = NULL; best_crtc = NULL;
best_coverage = 0; best_coverage = 0;
if (!dixPrivateKeyRegistered(rrPrivKey))
return NULL;
pScrPriv = rrGetScrPriv(pScreen);
if (!pScrPriv) if (!pScrPriv)
return NULL; return NULL;

View File

@ -485,6 +485,9 @@ xf86CrtcRotate(xf86CrtcPtr crtc)
if (damage) if (damage)
xf86CrtcDamageShadow(crtc); xf86CrtcDamageShadow(crtc);
else if (crtc->rotatedData && !crtc->rotatedPixmap)
/* Make sure the new rotate buffer has valid transformed contents */
xf86RotateRedisplay(pScreen);
/* All done */ /* All done */
return TRUE; return TRUE;

View File

@ -779,6 +779,12 @@ xf86UseMsg(void)
return; return;
} }
void
xf86OSInputThreadInit()
{
return;
}
#ifdef X_PRIVSEP #ifdef X_PRIVSEP
/* /*
* Revoke privileges after init. * Revoke privileges after init.

View File

@ -87,3 +87,9 @@ xf86CloseConsole()
close(xf86Info.consoleFd); close(xf86Info.consoleFd);
return; return;
} }
void
xf86OSInputThreadInit()
{
return;
}

View File

@ -397,3 +397,9 @@ xf86UseMsg(void)
ErrorF("don't detach controlling tty (for debugging only)\n"); ErrorF("don't detach controlling tty (for debugging only)\n");
ErrorF("-masterfd <fd> use the specified fd as the DRM master fd (not if setuid/gid)\n"); ErrorF("-masterfd <fd> use the specified fd as the DRM master fd (not if setuid/gid)\n");
} }
void
xf86OSInputThreadInit()
{
return;
}

View File

@ -73,22 +73,24 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
/* I/O Permissions section */ /* I/O Permissions section */
/***************************************************************************/ /***************************************************************************/
#if defined(__i386__) || defined(__i386) || defined(__x86) void
static Bool ExtendedEnabled = FALSE; xf86OSInputThreadInit()
#endif {
/*
* Need to enable in input thread as well, as Solaris kernel tracks
* IOPL per-thread and doesn't inherit when creating a new thread.
*/
xf86EnableIO();
}
Bool Bool
xf86EnableIO(void) xf86EnableIO(void)
{ {
#if defined(__i386__) || defined(__i386) || defined(__x86) #if defined(__i386__) || defined(__i386) || defined(__x86)
if (ExtendedEnabled)
return TRUE;
if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0) { if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0) {
xf86Msg(X_WARNING, "xf86EnableIOPorts: Failed to set IOPL for I/O\n"); xf86Msg(X_WARNING, "xf86EnableIOPorts: Failed to set IOPL for I/O\n");
return FALSE; return FALSE;
} }
ExtendedEnabled = TRUE;
#endif /* i386 */ #endif /* i386 */
return TRUE; return TRUE;
} }
@ -97,11 +99,6 @@ void
xf86DisableIO(void) xf86DisableIO(void)
{ {
#if defined(__i386__) || defined(__i386) || defined(__x86) #if defined(__i386__) || defined(__i386) || defined(__x86)
if (!ExtendedEnabled)
return;
sysi86(SI86V86, V86SC_IOPL, 0); sysi86(SI86V86, V86SC_IOPL, 0);
ExtendedEnabled = FALSE;
#endif /* i386 */ #endif /* i386 */
} }

View File

@ -136,6 +136,7 @@ extern _X_EXPORT int xf86GetSerialModemState(int fd);
extern _X_EXPORT int xf86SerialModemSetBits(int fd, int bits); extern _X_EXPORT int xf86SerialModemSetBits(int fd, int bits);
extern _X_EXPORT int xf86SerialModemClearBits(int fd, int bits); extern _X_EXPORT int xf86SerialModemClearBits(int fd, int bits);
extern _X_EXPORT int xf86LoadKernelModule(const char *pathname); extern _X_EXPORT int xf86LoadKernelModule(const char *pathname);
extern _X_EXPORT void xf86OSInputThreadInit(void);
/* AGP GART interface */ /* AGP GART interface */

View File

@ -169,3 +169,12 @@ ddxBeforeReset(void)
return; return;
} }
#endif #endif
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
}
#endif

View File

@ -24,6 +24,7 @@
*/ */
#include "xwayland.h" #include "xwayland.h"
#include "glamor.h"
#include <present.h> #include <present.h>
@ -412,9 +413,7 @@ xwl_present_abort_vblank(WindowPtr present_window,
static void static void
xwl_present_flush(WindowPtr window) xwl_present_flush(WindowPtr window)
{ {
/* Only called when a Pixmap is copied instead of flipped, glamor_block_handler(window->drawable.pScreen);
* but in this case we wait on the next block_handler.
*/
} }
static Bool static Bool

View File

@ -72,6 +72,15 @@ ddxBeforeReset(void)
{ {
return; return;
} }
#endif
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
}
#endif #endif
_X_NORETURN _X_NORETURN

View File

@ -151,6 +151,15 @@ ddxBeforeReset(void)
} }
#endif #endif
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
}
#endif
int int
main(int argc, char *argv[], char *envp[]) main(int argc, char *argv[], char *envp[])
{ {

View File

@ -494,6 +494,9 @@
/* Glamor can use eglQueryDmaBuf* functions */ /* Glamor can use eglQueryDmaBuf* functions */
#undef GLAMOR_HAS_EGL_QUERY_DMABUF #undef GLAMOR_HAS_EGL_QUERY_DMABUF
/* Glamor can use EGL_MESA_query_driver functions */
#undef GLAMOR_HAS_EGL_QUERY_DRIVER
/* byte order */ /* byte order */
#undef X_BYTE_ORDER #undef X_BYTE_ORDER

View File

@ -120,6 +120,9 @@
/* Have GLAMOR_HAS_EGL_QUERY_DMABUF */ /* Have GLAMOR_HAS_EGL_QUERY_DMABUF */
#undef GLAMOR_HAS_EGL_QUERY_DMABUF #undef GLAMOR_HAS_EGL_QUERY_DMABUF
/* Have GLAMOR_HAS_EGL_QUERY_DRIVER */
#undef GLAMOR_HAS_EGL_QUERY_DRIVER
/* Build glamor with GBM-based EGL support */ /* Build glamor with GBM-based EGL support */
#undef GLAMOR_HAS_GBM #undef GLAMOR_HAS_GBM

View File

@ -563,6 +563,8 @@ extern _X_EXPORT void
AbortDDX(enum ExitCode error); AbortDDX(enum ExitCode error);
extern _X_EXPORT void extern _X_EXPORT void
ddxGiveUp(enum ExitCode error); ddxGiveUp(enum ExitCode error);
extern _X_EXPORT void
ddxInputThreadInit(void);
extern _X_EXPORT int extern _X_EXPORT int
TimeSinceLastInputEvent(void); TimeSinceLastInputEvent(void);

View File

@ -318,6 +318,8 @@ InputThreadDoWork(void *arg)
sigfillset(&set); sigfillset(&set);
pthread_sigmask(SIG_BLOCK, &set, NULL); pthread_sigmask(SIG_BLOCK, &set, NULL);
ddxInputThreadInit();
inputThreadInfo->running = TRUE; inputThreadInfo->running = TRUE;
#if defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID) #if defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID)

View File

@ -40,6 +40,7 @@
#if !HAVE_OSPOLL && defined(HAVE_PORT_CREATE) #if !HAVE_OSPOLL && defined(HAVE_PORT_CREATE)
#include <port.h> #include <port.h>
#include <poll.h>
#define PORT 1 #define PORT 1
#define HAVE_OSPOLL 1 #define HAVE_OSPOLL 1
#endif #endif
@ -78,7 +79,6 @@ struct ospoll {
#endif #endif
#if EPOLL || PORT #if EPOLL || PORT
#include <sys/epoll.h>
/* epoll-based implementation */ /* epoll-based implementation */
struct ospollfd { struct ospollfd {
@ -468,10 +468,10 @@ epoll_mod(struct ospoll *ospoll, struct ospollfd *osfd)
{ {
int events = 0; int events = 0;
if (osfd->xevents & X_NOTIFY_READ) if (osfd->xevents & X_NOTIFY_READ)
events |= EPOLLIN; events |= POLLIN;
if (osfd->xevents & X_NOTIFY_WRITE) if (osfd->xevents & X_NOTIFY_WRITE)
events |= EPOLLOUT; events |= POLLOUT;
port_associate(ospool->epoll_fd, PORT_SOURCE_FD, osfd->fd, events, osfd); port_associate(ospoll->epoll_fd, PORT_SOURCE_FD, osfd->fd, events, osfd);
} }
#endif #endif
@ -601,9 +601,14 @@ ospoll_wait(struct ospoll *ospoll, int timeout)
#define MAX_EVENTS 256 #define MAX_EVENTS 256
port_event_t events[MAX_EVENTS]; port_event_t events[MAX_EVENTS];
uint_t nget = 1; uint_t nget = 1;
timespec_t port_timeout = {
.tv_sec = timeout / 1000,
.tv_nsec = (timeout % 1000) * 1000000
};
nready = 0; nready = 0;
if (port_getn(ospoll->epoll_fd, events, MAX_EVENTS, &nget, &timeout) == 0) { if (port_getn(ospoll->epoll_fd, events, MAX_EVENTS, &nget, &port_timeout)
== 0) {
nready = nget; nready = nget;
} }
for (int i = 0; i < nready; i++) { for (int i = 0; i < nready; i++) {
@ -612,17 +617,18 @@ ospoll_wait(struct ospoll *ospoll, int timeout)
uint32_t revents = ev->portev_events; uint32_t revents = ev->portev_events;
int xevents = 0; int xevents = 0;
if (revents & EPOLLIN) if (revents & POLLIN)
xevents |= X_NOTIFY_READ; xevents |= X_NOTIFY_READ;
if (revents & EPOLLOUT) if (revents & POLLOUT)
xevents |= X_NOTIFY_WRITE; xevents |= X_NOTIFY_WRITE;
if (revents & (~(EPOLLIN|EPOLLOUT))) if (revents & (~(POLLIN|POLLOUT)))
xevents |= X_NOTIFY_ERROR; xevents |= X_NOTIFY_ERROR;
if (osfd->callback) if (osfd->callback)
osfd->callback(osfd->fd, xevents, osfd->data); osfd->callback(osfd->fd, xevents, osfd->data);
if (osfd->trigger == ospoll_trigger_level && !osfd->deleted) { if (osfd->trigger == ospoll_trigger_level &&
!xorg_list_is_empty(&osfd->deleted)) {
epoll_mod(ospoll, osfd); epoll_mod(ospoll, osfd);
} }
} }