Compare commits

...
Sign in to create a new pull request.

89 commits

Author SHA1 Message Date
Olivier Fourdan
e356a592b7 Update to v21.1.21
Resolves: #2417000
2025-11-25 14:06:38 +01:00
Olivier Fourdan
115bb19734 Update to v21.1.20
CVE fix for:
CVE-2025-62229, CVE-2025-62230, CVE-2025-62231

Resolves: #2406803
2025-10-28 18:30:25 +01:00
Fedora Release Engineering
ab69deda47 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 21:00:45 +00:00
Peter Hutterer
96c4fa6fb3 Update Xvfb SPDX license identifier 2025-07-09 08:21:37 +10:00
Olivier Fourdan
5d7ed4931e Update to v21.1.18
Contains an additional fix for CVE-2025-49176
2025-06-18 19:10:33 +02:00
Olivier Fourdan
5b50181e4f Update to v21.1.17
CVE fix for:
CVE-2025-49175, CVE-2025-49176, CVE-2025-49177,
CVE-2025-49178, CVE-2025-49179, CVE-2025-49180
2025-06-17 16:44:20 +02:00
Olivier Fourdan
dd5395436b Update to v21.1.16
CVE fix for:
CVE-2025-26594, CVE-2025-26595, CVE-2025-26596, CVE-2025-26597,
CVE-2025-26598, CVE-2025-26599, CVE-2025-26600, CVE-2025-26601

Resolves: #2347558
2025-02-26 09:25:34 +01:00
Olivier Fourdan
572824c028 Fix DRI2 failure
Resolves: #2347345
2025-02-25 10:52:00 +01:00
Fedora Release Engineering
3e4c792ded Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 16:10:32 +00:00
Sérgio M. Basto
928204fc39 Remove this unused patch which have characters that flagged by the automatic scanning tools.
This pach is already in upstream code, as this patch have characters that are flagged by
the automatic scanning tools, it was remove from previous commits to
avoid delays. Now that we already rebase xorg-x11-server to 21.x and
shipped in F41, we can complete the cleanup
2024-12-31 17:57:55 +00:00
José Expósito
e3a0a54473 Update to v21.1.15
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2332880
2024-12-20 08:50:05 +01:00
Sérgio M. Basto
cb5f4ca65c Revert commit "Fix error copying Xorg.wrap", debugedit-5.1-2 have the real fix 2024-11-29 00:07:55 +00:00
José Expósito
6b1c1806e3 Restore quirks for Apple silicon
Fixes: 422064e45a ("Update X11-server to 21.1.13 and ABI numbers of videodrv and xinput")
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2152414
2024-11-27 09:56:50 +01:00
José Expósito
28edf326d9 Fix error copying Xorg.wrap
Building the latest Rawhide code fails with this error:

    objcopy: unable to copy file '/builddir/build/BUILD/xorg-x11-server-21.1.14-build/BUILDROOT/usr/libexec/Xorg.wrap';
    reason: Permission denied

Upstream patch 09cd65233e0f ("xfree86: Set appropriate install_mode for
suid_wrapper") changed the permissions of Xorg.wrap at install time,
preventing it from being copied.

Revert the patch to be able to build the X.Org server again.

For reference, after reverting the upstream patch, the permissions of
Xorg.wrap matches the permissions in my system:

    $ rpm -qlvp xorg-x11-server-Xorg-21.1.14-2.fc42.x86_64.rpm
    [...]
    -rwsr-xr-x 1  root root 16256 Nov 18 01:00 /usr/libexec/Xorg.wrap

    $ ll /usr/libexec/Xorg.wrap
    -rwsr-xr-x. 1 root root 15K Oct 29 01:00 /usr/libexec/Xorg.wrap
2024-11-27 09:52:42 +01:00
José Expósito
d53e48508b Update to v21.1.14 2024-10-29 18:18:29 +01:00
Peter Robinson
db932d9182 Obsolete xorg-x11-drv-armsoc 2024-10-16 10:16:17 +01:00
Simone Caronni
083eae6061 Obsolete vesa and fbdev drivers 2024-09-30 09:46:44 +02:00
Simone Caronni
51ae8aa675 Remove all conditionals. Drop int10 everywhere and enable libunwind/dri3 on ELN. 2024-09-28 19:31:32 +02:00
Simone Caronni
0bb198b86b Adjust int10/unwind conditionals 2024-09-27 13:34:16 +02:00
Simone Caronni
b8c1f8e99c Format SPEC file 2024-09-27 10:57:26 +02:00
Simone Caronni
ddd6374980 Add build depdendencies as they are searched by meson 2024-09-27 10:53:34 +02:00
Simone Caronni
73f289de65 Drop Obsoletes/Provides that have been removed in ~2014 2024-09-27 09:56:22 +02:00
Simone Caronni
00592f1f26 Switch to meson for building 2024-09-27 09:40:24 +02:00
Simone Caronni
2cdddcc3e1 Clean up .gitignore 2024-09-26 22:16:51 +02:00
Simone Caronni
fefea377b3 Spec file update
- Drop support for building snapshots.
- Drop custom cflags.
- Trim changelog.
2024-09-26 22:15:38 +02:00
Sérgio M. Basto
72accf2c5a Remove unused patches with fedpkg unused-patches 2024-09-02 18:03:09 +01:00
Sérgio M. Basto
422064e45a Update X11-server to 21.1.13 and ABI numbers of videodrv and xinput
DMX DDX was dropped
0001-Disallow-byte-swapped-clients-by-default.patch is upstremaed
0001-autobind-GPUs-to-the-screen.patch is upstreamed
0001-xf86-dri2-Use-va_gl-as-vdpau_driver-for-Intel-i965-G.patch updated
2024-09-02 17:49:53 +01:00
Fedora Release Engineering
aa17c8dba1 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 10:21:44 +00:00
José Expósito
ef7d64c39f Backport fix for invalid Unicode sequence 2024-05-08 10:01:49 +02:00
José Expósito
47092bca4f Fix regression caused by the fix for CVE-2024-31083 2024-04-10 09:56:49 +02:00
José Expósito
0ad871b912 CVE fix for: CVE-2024-31080, CVE-2024-31081, CVE-2024-31082 and CVE-2024-31083 2024-04-03 18:10:41 +02:00
José Expósito
43f6ceeda4 Add util-linux as a dependency of Xvfb
The xvfb-run command uses getopt, provided by util-linux, but the
dependency is not listed.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2267450
2024-03-04 15:39:48 +01:00
Yaakov Selkowitz
c88593e07d Apply all CVE patches to RHEL builds
Patch 3801 is specific to Fedora, but all the other patches, even those
that are newer, should be applied both to Fedora and RHEL (or, possibly
in the future, EPEL) builds.
2024-01-30 19:48:04 -05:00
Fedora Release Engineering
3982aab455 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 10:01:05 +00:00
José Expósito
af32bd411c Fix compilation error on i686 2024-01-22 09:25:50 +01:00
José Expósito
9df532a027 Fix use after free related to CVE-2024-21886 2024-01-19 11:22:19 +01:00
José Expósito
57dbbbe6c2 CVE fix for: CVE-2023-6816, CVE-2024-0229, CVE-2024-21885, CVE-2024-21886, CVE-2024-0408 and CVE-2024-0409 2024-01-16 15:19:18 +01:00
Peter Hutterer
d887a5b989 CVE fix for: CVE-2023-6377, CVE-2023-6478 2023-12-13 11:51:29 +10:00
Peter Hutterer
d8ec1545f3 Update with full SPDX license list 2023-11-10 14:31:54 +10:00
Peter Hutterer
54e15127ae CVE fix for: CVE-2023-5367, CVE-2023-5380 2023-10-25 12:01:02 +10:00
José Expósito
28a268e0aa SPDX migration: license is already SPDX compatible 2023-10-20 17:38:41 +02:00
Orion Poplawski
fdd7c4bbd1 Fix xvfb-run --error-file / auth-file options 2023-09-28 21:16:17 -06:00
Fedora Release Engineering
78721b7ea4 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 19:11:32 +00:00
Olivier Fourdan
a3932dc93a Backport fix for a deadlock with DRI3
See https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1057
and https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21339

Resolves: #2189434
2023-04-25 10:59:38 +02:00
Florian Weimer
c2b6cc043d Make more functions available in fb.h with !FB_ACCESS_WRAPPER
Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
2023-04-13 15:48:20 +02:00
Olivier Fourdan
21269fd4b7 Fix for CVE-2023-1393 2023-03-29 15:36:30 +02:00
Olivier Fourdan
31ea8b9649 Fix xvfb-run script with --listen-tcp 2023-02-23 09:09:36 +01:00
Iker Pedrosa
7c9187a093 Remove pam_console from service file
pam_console is being removed as it was replaced by ConsoleKit, and later
by systemd-logind. Most probably the migration was already done years
ago as I don't see any specific configuration file for pam_console. This
change only removes pam_console from the service file.

If you are curious about the removal check the Fedora System-Wide Change
proposal linked below.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1822209
Relates: https://fedoraproject.org/wiki/Changes/RemovePamConsole
Relates: https://bugzilla.redhat.com/show_bug.cgi?id=2166692

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2023-02-09 11:32:20 +01:00
Peter Hutterer
996eaa843f CVE-2023-0494: potential use-after-free 2023-02-02 15:32:24 +10:00
Peter Hutterer
50af4f1fc6 Updated conditional fedora statement 2023-02-01 14:27:20 +10:00
Olivier Fourdan
743d53fc69 Use the recommended way to apply conditional patches
https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_do_not_conditionalize_sources
2023-01-17 17:20:10 +01:00
Leif Liddy
6c12217df8
resolve Xorg server DCP display issue (#2152414)
Xorg server does not correctly select the DCP for the display without a quirk
2023-01-13 12:08:43 +01:00
Peter Hutterer
e6bf129b81 Disallow byte-swapped clients (#2159489) 2023-01-13 15:46:50 +10:00
Olivier Fourdan
140953a817 Rename value field from bool to boolean
Rename boolean config value field from bool to boolean to fix drivers
build failures due to a conflict with C++ and stdbool.h
2023-01-11 16:41:24 +01:00
Peter Hutterer
fc0c7be4e3 Fix buggy patch to CVE-2022-46340 2022-12-19 10:18:48 +10:00
Peter Hutterer
75e6f92d0f CVE fix for: CVE-2022-4283, CVE-2022-46340, CVE-2022-46341,
CVE-2022-46342, CVE-2022-46343, CVE-2022-46344
2022-12-14 11:53:02 +10:00
Peter Hutterer
4e595ce4fd Drop dependency on xorg-x11-font-utils, it was only there for one
build-time variable that's always the same value anyway (#2145088)
2022-11-23 15:47:09 +10:00
Olivier Fourdan
9fc1d98575 Fix CVE-2022-3550, CVE-2022-3551 2022-11-08 12:03:21 +01:00
Fedora Release Engineering
88dcddb59c Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 13:25:55 +00:00
Olivier Fourdan
98518b3d7a Fix XKB vulnerabilities
* CVE-2022-2319/ZDI-CAN-16062
 * CVE-2022-2320/ZDI-CAN-16070
2022-07-12 17:26:05 +02:00
Dominik 'Rathann' Mierzejewski
ba5ead2efb Don't hardcode fps for fake screen (#2054188) 2022-04-13 23:20:25 +02:00
František Zatloukal
672ae9a577 Fix basic graphic mode not working with simpledrm (#2067151) 2022-04-11 11:12:37 +02:00
Olivier Fourdan
4f6b52c6ec Fix build with GCC 12
Resolves: #2047134
2022-01-28 10:54:50 +01:00
Olivier Fourdan
befd31b800 Fix crash with NVIDIA proprietary driver with Present
Resolves: #2046147
2022-01-28 10:50:12 +01:00
Fedora Release Engineering
5125f50551 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 05:24:18 +00:00
Olivier Fourdan
f08aeec29a xserver 1.20.14
CVE-2021-4008/ZDI-CAN-14192 (#2026059, #2032941)
CVE-2021-4009/ZDI-CAN-14950 (#2026072, #2032943)
CVE-2021-4010/ZDI-CAN-14951 (#2026073, #2032944)
CVE-2021-4011/ZDI-CAN-14952 (#2026074, #2032945)
2021-12-17 15:25:24 +01:00
Sahana Prasad
a6fbe2c194 Rebuilt with OpenSSL 3.0.0 2021-09-14 19:18:17 +02:00
Fedora Release Engineering
4818e48baf - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 21:51:14 +00:00
Olivier Fourdan
03bc044aa3 xserver 1.20.11
Security fix for CVE-2021-3472 / ZDI-CAN-1259
2021-04-14 10:55:42 +02:00
Peter Hutterer
5f0a71dde2 Drop BuildRequires for flex-devel (#1871101) 2021-02-03 15:37:50 +10:00
Olivier Fourdan
b1458e4567 Remove Xwayland from the xserver builds 2021-02-01 12:09:03 +01:00
Fedora Release Engineering
11999b2307 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-28 00:18:09 +00:00
Adam Jackson
29f0985634 fix thinko 2021-01-19 20:11:43 -05:00
Adam Jackson
38a777ceb5 Disable int10 and vbe on RHEL
Disable DRI1
Stop overriding the vendor name
2021-01-19 19:52:41 -05:00
Olivier Fourdan
283d9cdb07 xserver 1.20.10 (CVE-2020-14360, CVE-2020-25712) 2020-12-02 10:11:20 +01:00
Peter Hutterer
16f4e7facb Add BuildRequires for make 2020-11-05 10:35:10 +10:00
Peter Hutterer
79af8e61d7 Drop BuildRequires to git-core only 2020-11-04 10:38:24 +10:00
Olivier Fourdan
eaf4422969 xserver 1.20.9 + all current fixes from upstream
- Update to xserver 1.20.9
 - Add all current fixes from the stable server-1.20-branch upstream
 - Backport latest Xwayland randr resolution change emulation support
   patches.
2020-10-09 09:42:43 +02:00
Adam Jackson
eb8a79641e Enable XC-SECURITY 2020-08-12 15:31:35 -04:00
Adam Jackson
e6480d9628 Fix information disclosure bug in pixmap allocation (CVE-2020-14347) 2020-07-31 11:40:32 -04:00
Fedora Release Engineering
9d32eb45b5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 14:59:04 +00:00
Olivier Fourdan
efa2d863b7 xserver 1.20.8
- Update to xserver 1.20.8
 - Backport latest Xwayland randr resolution change emulation support
   patches.
2020-03-30 09:42:38 +02:00
Olivier Fourdan
97b803e415 Fix a crash on closing a window using Present
https://gitlab.freedesktop.org/xorg/xserver/issues/1000
2020-03-18 11:02:32 +01:00
Olivier Fourdan
1e468bc44a xserver 1.20.7
- backport from stable "xserver-1.20-branch" up to commit ad7364d8d
  (for mutter fullscreen unredirect on Wayland)
- Update videodrv minor ABI as 1.20.7 changed the minor ABI version
  (backward compatible, API addition in glamor)
- Rebase Xwayland randr resolution change emulation support patches
2020-03-13 09:54:18 +01:00
Fedora Release Engineering
dafffedcc8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-31 04:47:29 +00:00
Olivier Fourdan
622718ea83 xserver 1.20.6 2019-11-25 09:48:42 +01:00
Hans de Goede
76e2fe61fd Fix building with new libglvnd-1.2.0 (E)GL headers and pkgconfig files 2019-11-04 20:48:51 +01:00
Hans de Goede
f1f3380dc7 Fix building with new libglvnd provided gl.pc 2019-11-04 19:35:08 +01:00
Hans de Goede
3ae2631a52 Backport Xwayland randr resolution change emulation support 2019-11-04 17:59:36 +01:00
45 changed files with 406 additions and 3875 deletions

35
.gitignore vendored
View file

@ -1,36 +1,3 @@
xorg-server-1.9.1.tar.bz2
/xorg-server-20101125.tar.xz
/xorg-server-20101201.tar.xz
/xorg-server-1.10.0.tar.bz2
/xorg-server-20110418.tar.xz
/xorg-server-20110510.tar.xz
/xorg-server-20110818.tar.xz
/xorg-server-1.11.0.tar.bz2
/xorg-server-1.11.1.tar.bz2
/xorg-server-20111109.tar.xz
/xorg-server-20120103.tar.xz
/xorg-server-20120124.tar.xz
/xorg-server-20120215.tar.xz
/xorg-server-1.12.0.tar.bz2
/xorg-server-1.12.1.tar.bz2
/xorg-server-1.12.2.tar.bz2
/xorg-server-1.12.3.tar.bz2
/xorg-server-20120717.tar.xz
/xorg-server-20120726.tar.xz
/xorg-server-20120808.tar.xz
/xorg-server-20120822.tar.xz
/xorg-server-1.13.0.tar.bz2
/xorg-server-1.13.1.tar.bz2
/xorg-server-20130109.tar.xz
/xorg-server-20130215.tar.xz
/xorg-server-1.14.0.tar.bz2
/xorg-server-1.14.1.tar.bz2
/xorg-server-1.14.1.901.tar.bz2
/xorg-server-1.14.2.tar.bz2
/xorg-server-1.14.3.tar.bz2
/xorg-server-1.14.99.3.tar.bz2
/xorg-server-1.14.99.901.tar.bz2
/xorg-server-1.14.99.902.tar.bz2
*.bz2
*.xz
/xorg-x11-server-1.15.0-1.fc21.src.rpm
*.gz

View file

@ -1,49 +0,0 @@
From 8d2c776b2e14b3edcb27ced96cda7bede82c39cc Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Thu, 4 Jul 2019 08:42:15 +0200
Subject: [PATCH xserver] Revert "present/scmd: Check that the flip and screen
pixmap pitches match"
This reverts commit ef91da2757050652c724f6e674e8b1acf5d0cb31.
Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/839
---
present/present_scmd.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/present/present_scmd.c b/present/present_scmd.c
index 7c2f80997..8417d0925 100644
--- a/present/present_scmd.c
+++ b/present/present_scmd.c
@@ -78,7 +78,7 @@ present_check_flip(RRCrtcPtr crtc,
PresentFlipReason *reason)
{
ScreenPtr screen = window->drawable.pScreen;
- PixmapPtr screen_pixmap, window_pixmap;
+ PixmapPtr window_pixmap;
WindowPtr root = screen->root;
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
@@ -99,9 +99,8 @@ present_check_flip(RRCrtcPtr crtc,
return FALSE;
/* Make sure the window hasn't been redirected with Composite */
- screen_pixmap = screen->GetScreenPixmap(screen);
window_pixmap = screen->GetWindowPixmap(window);
- if (window_pixmap != screen_pixmap &&
+ if (window_pixmap != screen->GetScreenPixmap(screen) &&
window_pixmap != screen_priv->flip_pixmap &&
window_pixmap != present_flip_pending_pixmap(screen))
return FALSE;
@@ -127,8 +126,7 @@ present_check_flip(RRCrtcPtr crtc,
window->drawable.x != pixmap->screen_x || window->drawable.y != pixmap->screen_y ||
#endif
window->drawable.width != pixmap->drawable.width ||
- window->drawable.height != pixmap->drawable.height ||
- pixmap->devKind != screen_pixmap->devKind) {
+ window->drawable.height != pixmap->drawable.height) {
return FALSE;
}
--
2.21.0

View file

@ -1,76 +0,0 @@
From 98e3db2ac43d4a3f13475cb160c8ce0155ac7d61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Fri, 26 Oct 2018 19:52:49 +0200
Subject: [PATCH xserver 01/15] Xi: Use current device active grab to deliver
touch events if any
When Retrieving touch delivery data we need to check if we have an active
grab on such device, and in that case use it to delivery events.
If we don't do this, when rejecting the touch events in DeactivatePointerGrab,
we will end-up in creating an implicit grab that will change the device
deviceGrab's state, causing a recursion during TouchEndTouch.
Fixes #7
https://bugs.freedesktop.org/show_bug.cgi?id=96536
(cherry picked from commit 35e5a76cc1d02801fadd49d12e60664b02e4bebc)
---
Xi/exevents.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 17d751e31..659816a46 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1293,14 +1293,21 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
int rc;
InputClients *iclients = NULL;
*mask = NULL;
+ *grab = NULL;
if (listener->type == LISTENER_GRAB ||
listener->type == LISTENER_POINTER_GRAB) {
-
*grab = listener->grab;
BUG_RETURN_VAL(!*grab, FALSE);
+ }
+ else if (ti->emulate_pointer && dev->deviceGrab.grab &&
+ !dev->deviceGrab.fromPassiveGrab) {
+ /* There may be an active pointer grab on the device */
+ *grab = dev->deviceGrab.grab;
+ }
+ if (*grab) {
*client = rClient(*grab);
*win = (*grab)->window;
*mask = (*grab)->xi2mask;
@@ -1357,8 +1364,6 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
/* if owner selected, oclients is NULL */
*client = oclients ? rClient(oclients) : wClient(*win);
}
-
- *grab = NULL;
}
return TRUE;
@@ -1498,16 +1503,6 @@ DeliverEmulatedMotionEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
&mask))
return;
- /* There may be a pointer grab on the device */
- if (!grab) {
- grab = dev->deviceGrab.grab;
- if (grab) {
- win = grab->window;
- mask = grab->xi2mask;
- client = rClient(grab);
- }
- }
-
DeliverTouchEmulatedEvent(dev, ti, (InternalEvent*)&motion, &ti->listeners[0], client,
win, grab, mask);
}
--
2.21.0

View file

@ -1,42 +0,0 @@
From 0ad717edcf372425ddf2ba9926857419ab62f4f5 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed, 29 May 2019 16:19:55 +1000
Subject: [PATCH xserver] 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>
---
Xi/xipassivegrab.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index 65d5870f6..d30f51f3c 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -203,8 +203,14 @@ ProcXIPassiveGrabDevice(ClientPtr client)
&param, XI2, &mask);
break;
case XIGrabtypeKeycode:
- status = GrabKey(client, dev, mod_dev, stuff->detail,
- &param, XI2, &mask);
+ /* XI2 allows 32-bit keycodes but thanks to XKB we can never
+ * 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;
case XIGrabtypeEnter:
case XIGrabtypeFocusIn:
--
2.21.0

View file

@ -1,293 +0,0 @@
From 471289fa1dc359555ceed6302f7d9605ab6be3ea Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Mon, 2 Apr 2018 16:49:02 -0400
Subject: [PATCH] autobind GPUs to the screen
This is a modified version of a patch we've been carry-ing in Fedora and
RHEL for years now. This patch automatically adds secondary GPUs to the
master as output sink / offload source making e.g. the use of
slave-outputs just work, with requiring the user to manually run
"xrandr --setprovideroutputsource" before he can hookup an external
monitor to his hybrid graphics laptop.
There is one problem with this patch, which is why it was not upstreamed
before. What to do when a secondary GPU gets detected really is a policy
decission (e.g. one may want to autobind PCI GPUs but not USB ones) and
as such should be under control of the Desktop Environment.
Unconditionally adding autobinding support to the xserver will result
in races between the DE dealing with the hotplug of a secondary GPU
and the server itself dealing with it.
However we've waited for years for any Desktop Environments to actually
start doing some sort of autoconfiguration of secondary GPUs and there
is still not a single DE dealing with this, so I believe that it is
time to upstream this now.
To avoid potential future problems if any DEs get support for doing
secondary GPU configuration themselves, the new autobind functionality
is made optional. Since no DEs currently support doing this themselves it
is enabled by default. When DEs grow support for doing this themselves
they can disable the servers autobinding through the servers cmdline or a
xorg.conf snippet.
Signed-off-by: Dave Airlie <airlied@gmail.com>
[hdegoede@redhat.com: Make configurable, fix with nvidia, submit upstream]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
hw/xfree86/common/xf86Config.c | 19 +++++++++++++++++++
hw/xfree86/common/xf86Globals.c | 2 ++
hw/xfree86/common/xf86Init.c | 20 ++++++++++++++++++++
hw/xfree86/common/xf86Priv.h | 1 +
hw/xfree86/common/xf86Privstr.h | 1 +
hw/xfree86/common/xf86platformBus.c | 4 ++++
hw/xfree86/man/Xorg.man | 7 +++++++
hw/xfree86/man/xorg.conf.man | 6 ++++++
randr/randrstr.h | 3 +++
randr/rrprovider.c | 22 ++++++++++++++++++++++
10 files changed, 85 insertions(+)
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 2c1d335..d7d7c2e 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -643,6 +643,7 @@ typedef enum {
FLAG_DRI2,
FLAG_USE_SIGIO,
FLAG_AUTO_ADD_GPU,
+ FLAG_AUTO_BIND_GPU,
FLAG_MAX_CLIENTS,
FLAG_IGLX,
FLAG_DEBUG,
@@ -699,6 +700,8 @@ static OptionInfoRec FlagOptions[] = {
{0}, FALSE},
{FLAG_AUTO_ADD_GPU, "AutoAddGPU", OPTV_BOOLEAN,
{0}, FALSE},
+ {FLAG_AUTO_BIND_GPU, "AutoBindGPU", OPTV_BOOLEAN,
+ {0}, FALSE},
{FLAG_MAX_CLIENTS, "MaxClients", OPTV_INTEGER,
{0}, FALSE },
{FLAG_IGLX, "IndirectGLX", OPTV_BOOLEAN,
@@ -779,6 +782,22 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
}
xf86Msg(from, "%sutomatically adding GPU devices\n",
xf86Info.autoAddGPU ? "A" : "Not a");
+
+ if (xf86AutoBindGPUDisabled) {
+ xf86Info.autoBindGPU = FALSE;
+ from = X_CMDLINE;
+ }
+ else if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_BIND_GPU)) {
+ xf86GetOptValBool(FlagOptions, FLAG_AUTO_BIND_GPU,
+ &xf86Info.autoBindGPU);
+ from = X_CONFIG;
+ }
+ else {
+ from = X_DEFAULT;
+ }
+ xf86Msg(from, "%sutomatically binding GPU devices\n",
+ xf86Info.autoBindGPU ? "A" : "Not a");
+
/*
* Set things up based on the config file information. Some of these
* settings may be overridden later when the command line options are
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index e890f05..7b27b4c 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -131,6 +131,7 @@ xf86InfoRec xf86Info = {
#else
.autoAddGPU = FALSE,
#endif
+ .autoBindGPU = TRUE,
};
const char *xf86ConfigFile = NULL;
@@ -191,6 +192,7 @@ Bool xf86FlipPixels = FALSE;
Gamma xf86Gamma = { 0.0, 0.0, 0.0 };
Bool xf86AllowMouseOpenFail = FALSE;
+Bool xf86AutoBindGPUDisabled = FALSE;
#ifdef XF86VIDMODE
Bool xf86VidModeDisabled = FALSE;
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index ea42ec9..ec255b6 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -76,6 +76,7 @@
#include "xf86DDC.h"
#include "xf86Xinput.h"
#include "xf86InPriv.h"
+#include "xf86Crtc.h"
#include "picturestr.h"
#include "randrstr.h"
#include "glxvndabi.h"
@@ -237,6 +238,19 @@ xf86PrivsElevated(void)
return PrivsElevated();
}
+static void
+xf86AutoConfigOutputDevices(void)
+{
+ int i;
+
+ if (!xf86Info.autoBindGPU)
+ return;
+
+ for (i = 0; i < xf86NumGPUScreens; i++)
+ RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]),
+ xf86ScrnToScreen(xf86Screens[0]));
+}
+
static void
TrapSignals(void)
{
@@ -770,6 +784,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
for (i = 0; i < xf86NumGPUScreens; i++)
AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
+ xf86AutoConfigOutputDevices();
+
xf86VGAarbiterWrapFunctions();
if (sigio_blocked)
input_unlock();
@@ -1278,6 +1294,10 @@ ddxProcessArgument(int argc, char **argv, int i)
xf86Info.iglxFrom = X_CMDLINE;
return 0;
}
+ if (!strcmp(argv[i], "-noautoBindGPU")) {
+ xf86AutoBindGPUDisabled = TRUE;
+ return 1;
+ }
/* OS-specific processing */
return xf86ProcessArgument(argc, argv, i);
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index 4fe2b5f..6566622 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -46,6 +46,7 @@
extern _X_EXPORT const char *xf86ConfigFile;
extern _X_EXPORT const char *xf86ConfigDir;
extern _X_EXPORT Bool xf86AllowMouseOpenFail;
+extern _X_EXPORT Bool xf86AutoBindGPUDisabled;
#ifdef XF86VIDMODE
extern _X_EXPORT Bool xf86VidModeDisabled;
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index 21c2e1f..6c71863 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -98,6 +98,7 @@ typedef struct {
Bool autoAddGPU;
const char *debug;
+ Bool autoBindGPU;
} xf86InfoRec, *xf86InfoPtr;
/* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index cef47da..913a324 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -49,6 +49,7 @@
#include "Pci.h"
#include "xf86platformBus.h"
#include "xf86Config.h"
+#include "xf86Crtc.h"
#include "randrstr.h"
int platformSlotClaimed;
@@ -665,6 +666,9 @@ xf86platformAddDevice(int index)
}
/* attach unbound to 0 protocol screen */
AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
+ if (xf86Info.autoBindGPU)
+ RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]),
+ xf86ScrnToScreen(xf86Screens[0]));
RRResourcesChanged(xf86Screens[0]->pScreen);
RRTellChanged(xf86Screens[0]->pScreen);
diff --git a/hw/xfree86/man/Xorg.man b/hw/xfree86/man/Xorg.man
index 13a9dc3..745f986 100644
--- a/hw/xfree86/man/Xorg.man
+++ b/hw/xfree86/man/Xorg.man
@@ -283,6 +283,13 @@ is a comma separated list of directories to search for
server modules. This option is only available when the server is run
as root (i.e, with real-uid 0).
.TP 8
+.B \-noautoBindGPU
+Disable automatically setting secondary GPUs up as output sinks and offload
+sources. This is equivalent to setting the
+.B AutoBindGPU
+xorg.conf(__filemansuffix__) file option. To
+.B false.
+.TP 8
.B \-nosilk
Disable Silken Mouse support.
.TP 8
diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man
index 9589262..8d51e06 100644
--- a/hw/xfree86/man/xorg.conf.man
+++ b/hw/xfree86/man/xorg.conf.man
@@ -672,6 +672,12 @@ Enabled by default.
If this option is disabled, then no GPU devices will be added from the udev
backend. Enabled by default. (May need to be disabled to setup Xinerama).
.TP 7
+.BI "Option \*qAutoBindGPU\*q \*q" boolean \*q
+If enabled then secondary GPUs will be automatically set up as output-sinks and
+offload-sources. Making e.g. laptop outputs connected only to the secondary
+GPU directly available for use without needing to run
+"xrandr --setprovideroutputsource". Enabled by default.
+.TP 7
.BI "Option \*qLog\*q \*q" string \*q
This option controls whether the log is flushed and/or synced to disk after
each message.
diff --git a/randr/randrstr.h b/randr/randrstr.h
index f94174b..092d726 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -1039,6 +1039,9 @@ RRProviderLookup(XID id, RRProviderPtr *provider_p);
extern _X_EXPORT void
RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider);
+extern _X_EXPORT void
+RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr masterScreen);
+
/* rrproviderproperty.c */
extern _X_EXPORT void
diff --git a/randr/rrprovider.c b/randr/rrprovider.c
index e4bc2bf..e04c18f 100644
--- a/randr/rrprovider.c
+++ b/randr/rrprovider.c
@@ -485,3 +485,25 @@ RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider)
WriteEventsToClient(client, 1, (xEvent *) &pe);
}
+
+void
+RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr masterScreen)
+{
+ rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen);
+ rrScrPrivPtr masterPriv = rrGetScrPriv(masterScreen);
+ RRProviderPtr provider = pScrPriv->provider;
+ RRProviderPtr master_provider = masterPriv->provider;
+
+ if (!provider || !master_provider)
+ return;
+
+ if ((provider->capabilities & RR_Capability_SinkOutput) &&
+ (master_provider->capabilities & RR_Capability_SourceOutput)) {
+ pScrPriv->rrProviderSetOutputSource(pScreen, provider, master_provider);
+ RRInitPrimeSyncProps(pScreen);
+ }
+
+ if ((provider->capabilities & RR_Capability_SourceOffload) &&
+ (master_provider->capabilities & RR_Capability_SinkOffload))
+ pScrPriv->rrProviderSetOffloadSink(pScreen, provider, master_provider);
+}
--
2.16.2

View file

@ -1,59 +0,0 @@
From cffdd3984369ec7e31c87f9240c1485ab6370a8f Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Mon, 1 Jul 2019 13:20:39 +0200
Subject: [PATCH] compiler.h: Do not include sys/io.h on ARM with glibc
<sys/io.h> on ARM hasn't worked for a long, long time, so it was removed
it from glibc upstream.
Remove the include to avoid a compilation failure on ARM with glibc.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
---
hw/xfree86/common/compiler.h | 30 ------------------------------
1 file changed, 30 deletions(-)
diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 7144c6a..2b2008b 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -758,36 +758,6 @@ inl(unsigned short port)
return xf86ReadMmio32Le((void *) ioBase, port);
}
-#elif defined(__arm__) && defined(__linux__)
-
-/* for Linux on ARM, we use the LIBC inx/outx routines */
-/* note that the appropriate setup via "ioperm" needs to be done */
-/* *before* any inx/outx is done. */
-
-#include <sys/io.h>
-
-static __inline__ void
-xf_outb(unsigned short port, unsigned char val)
-{
- outb(val, port);
-}
-
-static __inline__ void
-xf_outw(unsigned short port, unsigned short val)
-{
- outw(val, port);
-}
-
-static __inline__ void
-xf_outl(unsigned short port, unsigned int val)
-{
- outl(val, port);
-}
-
-#define outb xf_outb
-#define outw xf_outw
-#define outl xf_outl
-
#elif defined(__nds32__)
/*
--
2.21.0

View file

@ -1,89 +0,0 @@
From 13f9b07039484927532d913dbccc664679235bf6 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon, 25 Mar 2019 13:19:41 +1000
Subject: [PATCH xserver] dix: leave last.valuators alone on slave switch
Terms:
dev->last.valuator[] is the last value given to us by the driver
dev->valuator.axisVal[] is the last value sent to the client
dev->last.scroll[] is the abs value of the scroll axis as given by the driver,
used for button emulation calculation (and the remainder)
This function updates the device's last.valuator state based on the current
master axis state. This way, relative motion continues fluidly when switching
between devices. Before mouse 2 comes into effect, it's valuator state is
updated to wherever the pointer currently is so the relative event applies on
top of that.
This can only work for x/y axes, all other axes aren't guaranteed to have the
same meaning and/or may not be present:
- xtest device: no valuator 2
- mouse: valuator 2 is horizontal scroll axis
- tablet: valuator 2 is pressure
Scaling the current value from the pressure range into the range for
horizontal scrolling makes no sense. And it causes scroll jumps:
- scroll down, last.valuator == axisVal == 20
- xdotool click 1, the XTest device doesn't have that valuator
- scroll up
- updateSlaveDeviceCoords reset last.valuator to 0 (axisVal == 20)
- DeviceClassesChangedEvent includes value 20 for the axis
- event is processed, last.value changes from 0 to -1
- axisVal is updated to -1, causing a jump of -21
The same applies when we switch from tablet to mouse wheel if the pressure
value is 0 on proximity out (basically guaranteed). So let's drop this code
altogether and only leave the scaling for the relative x/y motion.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
dix/getevents.c | 25 +------------------------
1 file changed, 1 insertion(+), 24 deletions(-)
diff --git a/dix/getevents.c b/dix/getevents.c
index d8955969a..f83dac709 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -331,9 +331,6 @@ rescaleValuatorAxis(double coord, AxisInfoPtr from, AxisInfoPtr to,
static void
updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev)
{
- int i;
- DeviceIntPtr lastSlave;
-
/* master->last.valuators[0]/[1] is in desktop-wide coords and the actual
* position of the pointer */
pDev->last.valuators[0] = master->last.valuators[0];
@@ -358,27 +355,7 @@ updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev)
screenInfo.height);
}
- /* calculate the other axis as well based on info from the old
- * slave-device. If the old slave had less axes than this one,
- * last.valuators is reset to 0.
- */
- if ((lastSlave = master->last.slave) && lastSlave->valuator) {
- for (i = 2; i < pDev->valuator->numAxes; i++) {
- if (i >= lastSlave->valuator->numAxes) {
- pDev->last.valuators[i] = 0;
- valuator_mask_set_double(pDev->last.scroll, i, 0);
- }
- else {
- double val = pDev->last.valuators[i];
-
- val = rescaleValuatorAxis(val, lastSlave->valuator->axes + i,
- pDev->valuator->axes + i, 0, 0);
- pDev->last.valuators[i] = val;
- valuator_mask_set_double(pDev->last.scroll, i, val);
- }
- }
- }
-
+ /* other axes are left as-is */
}
/**
--
2.20.1

View file

@ -1,89 +0,0 @@
From 6e199e4613e149cd5d5ce69cdd6a259744b6cb44 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Fri, 26 Apr 2019 13:37:09 +0200
Subject: [PATCH xserver] glamor: Make pixmap exportable from
`gbm_bo_from_pixmap()`
If a pixmap is not exportable, `glamor_gbm_bo_from_pixmap()` would fail
and the modesettings driver would consequently fail to do its page flip,
which both prevents Present from working and also fill up the logs with
error messages such as:
(EE) modeset(0): Failed to get GBM bo for flip to new front.
(EE) modeset(0): present flip failed
Refactor the code so that `glamor_gbm_bo_from_pixmap()` takes care of
making the pixmap exportable.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Yuxuan Shui yshui@hadean.com
See-also: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/131
Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/68
Fixes: 86b2d8740a "glamor: Reallocate pixmap storage without modifiers
if necessary"
(cherry picked from commit 26fe29f4fa53cbb7d51892e2cf397c084093812f)
---
glamor/glamor_egl.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
index d3c678d6b..9a619a133 100644
--- a/glamor/glamor_egl.c
+++ b/glamor/glamor_egl.c
@@ -355,8 +355,8 @@ glamor_make_pixmap_exportable(PixmapPtr pixmap, Bool modifiers_ok)
return TRUE;
}
-struct gbm_bo *
-glamor_gbm_bo_from_pixmap(ScreenPtr screen, PixmapPtr pixmap)
+static struct gbm_bo *
+glamor_gbm_bo_from_pixmap_internal(ScreenPtr screen, PixmapPtr pixmap)
{
struct glamor_egl_screen_private *glamor_egl =
glamor_egl_get_screen_private(xf86ScreenToScrn(screen));
@@ -370,6 +370,15 @@ glamor_gbm_bo_from_pixmap(ScreenPtr screen, PixmapPtr pixmap)
pixmap_priv->image, 0);
}
+struct gbm_bo *
+glamor_gbm_bo_from_pixmap(ScreenPtr screen, PixmapPtr pixmap)
+{
+ if (!glamor_make_pixmap_exportable(pixmap, TRUE))
+ return NULL;
+
+ return glamor_gbm_bo_from_pixmap_internal(screen, pixmap);
+}
+
int
glamor_egl_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds,
uint32_t *strides, uint32_t *offsets,
@@ -385,7 +394,7 @@ glamor_egl_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds,
if (!glamor_make_pixmap_exportable(pixmap, TRUE))
return 0;
- bo = glamor_gbm_bo_from_pixmap(screen, pixmap);
+ bo = glamor_gbm_bo_from_pixmap_internal(screen, pixmap);
if (!bo)
return 0;
@@ -423,7 +432,7 @@ glamor_egl_fd_from_pixmap(ScreenPtr screen, PixmapPtr pixmap,
if (!glamor_make_pixmap_exportable(pixmap, FALSE))
return -1;
- bo = glamor_gbm_bo_from_pixmap(screen, pixmap);
+ bo = glamor_gbm_bo_from_pixmap_internal(screen, pixmap);
if (!bo)
return -1;
@@ -452,7 +461,7 @@ glamor_egl_fd_name_from_pixmap(ScreenPtr screen,
if (!glamor_make_pixmap_exportable(pixmap, FALSE))
goto failure;
- bo = glamor_gbm_bo_from_pixmap(screen, pixmap);
+ bo = glamor_gbm_bo_from_pixmap_internal(screen, pixmap);
if (!bo)
goto failure;
--
2.21.0

View file

@ -1,64 +0,0 @@
From 6915752b2da77c29bf8c861a6d4f2383e667323b Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Fri, 5 Oct 2018 14:07:46 -0400
Subject: [PATCH xserver 1/4] modesetting: Weaksauce atomic property debugging
This would be a good idea to have around for troubleshooting purposes,
but this particular patch is Not Good.
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
hw/xfree86/drivers/modesetting/drmmode_display.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index cb48aa46b..a8d989a24 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -415,6 +415,13 @@ drmmode_ConvertToKMode(ScrnInfoPtr scrn,
drmModeModeInfo * kmode, DisplayModePtr mode);
+static int
+drmmodeatomicaddproperty(drmModeAtomicReqPtr req, uint32_t obj, uint32_t prop, uint64_t value)
+{
+ ErrorF("Adding to %p: %x %x %lx\n", req, obj, prop, value);
+ return drmModeAtomicAddProperty(req, obj, prop, value);
+}
+
static int
plane_add_prop(drmModeAtomicReq *req, drmmode_crtc_private_ptr drmmode_crtc,
enum drmmode_plane_property prop, uint64_t val)
@@ -425,7 +432,8 @@ plane_add_prop(drmModeAtomicReq *req, drmmode_crtc_private_ptr drmmode_crtc,
if (!info)
return -1;
- ret = drmModeAtomicAddProperty(req, drmmode_crtc->plane_id,
+ ErrorF("Setting %s\n", info->name);
+ ret = drmmodeatomicaddproperty(req, drmmode_crtc->plane_id,
info->prop_id, val);
return (ret <= 0) ? -1 : 0;
}
@@ -467,7 +475,8 @@ crtc_add_prop(drmModeAtomicReq *req, drmmode_crtc_private_ptr drmmode_crtc,
if (!info)
return -1;
- ret = drmModeAtomicAddProperty(req, drmmode_crtc->mode_crtc->crtc_id,
+ ErrorF("Setting %s\n", info->name);
+ ret = drmmodeatomicaddproperty(req, drmmode_crtc->mode_crtc->crtc_id,
info->prop_id, val);
return (ret <= 0) ? -1 : 0;
}
@@ -482,7 +491,8 @@ connector_add_prop(drmModeAtomicReq *req, drmmode_output_private_ptr drmmode_out
if (!info)
return -1;
- ret = drmModeAtomicAddProperty(req, drmmode_output->output_id,
+ ErrorF("Setting %s\n", info->name);
+ ret = drmmodeatomicaddproperty(req, drmmode_output->output_id,
info->prop_id, val);
return (ret <= 0) ? -1 : 0;
}
--
2.20.1

View file

@ -52,7 +52,7 @@ index 6619e3aa7..1f8ad14bc 100644
/* For non-PCI devices and drmGetDevice fail, just assume that
* the 3D driver is named the same as the kernel driver. This is
* currently true for vc4 and msm (freedreno).
@@ -1456,12 +1460,14 @@ dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info)
@@ -1454,12 +1458,14 @@ dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info)
xf86DrvMsg(pScreen->myNum, X_ERROR,
"[DRI2] Couldn't drmGetVersion() on non-PCI device, "
"no driver name found.\n");
@ -70,7 +70,7 @@ index 6619e3aa7..1f8ad14bc 100644
}
for (i = 0; driver_map[i].driver; i++) {
@@ -1469,13 +1475,15 @@ dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info)
@@ -1467,13 +1473,15 @@ dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info)
continue;
if (driver_map[i].num_chips_ids == -1) {
@ -88,7 +88,7 @@ index 6619e3aa7..1f8ad14bc 100644
goto out;
}
}
@@ -1487,9 +1495,9 @@ dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info)
@@ -1485,9 +1493,9 @@ dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info)
dev->deviceinfo.pci->vendor_id, dev->deviceinfo.pci->device_id);
out:
drmFreeDevice(&dev);
@ -100,21 +100,21 @@ index 6619e3aa7..1f8ad14bc 100644
#endif
}
@@ -1610,7 +1618,8 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
if (info->driverName) {
ds->driverNames[0] = info->driverName;
@@ -1604,7 +1612,8 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
} else {
/* FIXME dri2_probe_driver_name() returns a strdup-ed string,
* currently this gets leaked */
- ds->driverNames[0] = ds->driverNames[1] = dri2_probe_driver_name(pScreen, info);
+ dri2_probe_driver_name(pScreen, info,
+ &ds->driverNames[0], &ds->driverNames[1]);
if (!ds->driverNames[0])
return FALSE;
}
diff --git a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h
index da7ea1c1e..7036d1003 100644
--- a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h
+++ b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h
@@ -66,21 +66,22 @@ static const int vmwgfx_chip_ids[] = {
@@ -60,23 +60,24 @@ static const int vmwgfx_chip_ids[] = {
static const struct {
int vendor_id;
const char *driver;
@ -124,8 +124,10 @@ index da7ea1c1e..7036d1003 100644
} driver_map[] = {
- { 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) },
- { 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) },
- { 0x8086, "i965", NULL, -1 },
+ { 0x8086, "i915", "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) },
+ { 0x8086, "i965", "va_gl", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) },
+ { 0x8086, "i965", "va_gl", NULL, -1 },
#ifndef DRIVER_MAP_GALLIUM_ONLY
- { 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) },
- { 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) },
@ -134,19 +136,18 @@ index da7ea1c1e..7036d1003 100644
#endif
- { 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) },
- { 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },
- { 0x1002, "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids) },
- { 0x1002, "radeonsi", NULL, -1 },
- { 0x10de, "nouveau", NULL, -1 },
- { 0x1af4, "virtio_gpu", virtio_gpu_chip_ids, ARRAY_SIZE(virtio_gpu_chip_ids) },
- { 0x15ad, "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids) },
- { 0x0000, NULL, NULL, 0 },
+ { 0x1002, "r300", "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) },
+ { 0x1002, "r600","r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },
+ { 0x1002, "radeonsi", "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids) },
+ { 0x1002, "r600", "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },
+ { 0x1002, "radeonsi", "radeonsi", NULL, -1 },
+ { 0x10de, "nouveau", "nouveau", NULL, -1 },
+ { 0x1af4, "virtio_gpu", "virtio_gpu", virtio_gpu_chip_ids, ARRAY_SIZE(virtio_gpu_chip_ids) },
+ { 0x15ad, "vmwgfx", "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids) },
{ 0x0000, NULL, NULL, 0 },
+ { 0x0000, NULL, NULL, NULL, 0 },
};
--
2.19.0
#endif /* _PCI_ID_DRIVER_MAP_H_ */

View file

@ -1,53 +0,0 @@
From 6711b5c6fdf0581c77150306fff909d7bc63b8a4 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Thu, 9 May 2019 10:36:19 +0200
Subject: [PATCH xserver] xwayland: Avoid a crash on pointer enter with a grab
On pointer enter notification, Xwayland checks for an existing pointer
warp with a `NULL` sprite.
In turn, `xwl_pointer_warp_emulator_maybe_lock()` checks for an existing
grab and the destination window using `XYToWindow()` which does not
check for the actual sprite not being `NULL`.
So, in some cases, when the pointer enters the surface and there is an
existing X11 grab which is not an ownerEvents grab, Xwayland would crash
trying to dereference the `NULL` sprite pointer:
#0 __GI_raise ()
#1 __GI_abort () at abort.c:79
#2 OsAbort () at utils.c:1351
#3 AbortServer () at log.c:879
#4 FatalError () at log.c:1017
#5 OsSigHandler () at osinit.c:156
#6 OsSigHandler () at osinit.c:110
#7 <signal handler called>
#8 XYToWindow (pSprite=0x0, x=0, y=0) at events.c:2880
#9 xwl_pointer_warp_emulator_maybe_lock () at xwayland-input.c:2673
#10 pointer_handle_enter () at xwayland-input.c:434
Avoid the crash by simply checking for the sprite being not `NULL` in
`xwl_pointer_warp_emulator_maybe_lock()`
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Bugzilla: https://bugzilla.redhat.com/1708119
(cherry picked from commit 0a07446318f248b65fcbc8ab8a73ead51153f09e)
---
hw/xwayland/xwayland-input.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index fbbcb39cc..fa46ac3e7 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -2667,6 +2667,7 @@ xwl_pointer_warp_emulator_maybe_lock(struct xwl_pointer_warp_emulator *warp_emul
*/
if (pointer_grab &&
!pointer_grab->ownerEvents &&
+ sprite &&
XYToWindow(sprite, x, y) != xwl_seat->focus_window->window)
return;
--
2.21.0

View file

@ -1,137 +0,0 @@
From 34ad57e570f96dfe4bc493f14726b7a0ae6d45f9 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Tue, 12 Mar 2019 15:38:03 +0100
Subject: [PATCH xserver] xwayland: Check status in GBM pixmap creation
The current code in `xwl_glamor_gbm_create_pixmap_for_bo()` may fail in
several cases that are not checked for:
- `eglCreateImageKHR()` may have failed to create the image,
- `glEGLImageTargetTexture2DOES()` may fail and set an error,
- `glamor_set_pixmap_texture()` may fail for very large pixmaps
because the corresponding FBO could not be created.
Trying to upload content to a pixmap with no texture will crash Mesa,
glamor and Xwayland, e.g.:
XXX fail to create fbo.
(EE)
(EE) Backtrace:
(EE) 0: Xwayland (OsSigHandler+0x29)
(EE) 1: libpthread.so.0 (funlockfile+0x50)
(EE) 2: libc.so.6 (__memmove_avx_unaligned_erms+0x215)
(EE) 3: dri/i965_dri.so (_mesa_format_convert+0xab3)
(EE) 4: dri/i965_dri.so (_mesa_texstore+0x205)
(EE) 5: dri/i965_dri.so (store_texsubimage+0x28c)
(EE) 6: dri/i965_dri.so (intel_upload_tex+0x13b)
(EE) 7: dri/i965_dri.so (texture_sub_image+0x134)
(EE) 8: dri/i965_dri.so (texsubimage_err+0x150)
(EE) 9: dri/i965_dri.so (_mesa_TexSubImage2D+0x48)
(EE) 10: Xwayland (glamor_upload_boxes+0x246)
(EE) 11: Xwayland (glamor_copy+0x4d1)
(EE) 12: Xwayland (miCopyRegion+0x96)
(EE) 13: Xwayland (miDoCopy+0x43c)
(EE) 14: Xwayland (glamor_copy_area+0x24)
(EE) 15: Xwayland (damageCopyArea+0xba)
(EE) 16: Xwayland (compCopyWindow+0x31c)
(EE) 17: Xwayland (damageCopyWindow+0xd3)
(EE) 18: Xwayland (miResizeWindow+0x7b7)
(EE) 19: Xwayland (compResizeWindow+0x3a)
(EE) 20: Xwayland (ConfigureWindow+0xa96)
(EE) 21: Xwayland (ProcConfigureWindow+0x7d)
(EE) 22: Xwayland (Dispatch+0x320)
(EE) 23: Xwayland (dix_main+0x366)
(EE) 24: libc.so.6 (__libc_start_main+0xf3)
(EE) 25: Xwayland (_start+0x2e)
(EE)
Fatal server error:
(EE) Caught signal 11 (Segmentation fault). Server aborting
(EE)
Check for the possible cases of failure above and fallback to the
regular glamor pixmap creation when an error is detected.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/661
(cherry picked from commit fc6380a11be4c6202ed72f241dd9ee8c7c24671d)
---
hw/xwayland/xwayland-glamor-gbm.c | 34 +++++++++++++++++++++++++++----
1 file changed, 30 insertions(+), 4 deletions(-)
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index a211e0915..80146ab6e 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -169,6 +169,8 @@ xwl_glamor_gbm_create_pixmap_for_bo(ScreenPtr screen, struct gbm_bo *bo,
xwl_screen->egl_context,
EGL_NATIVE_PIXMAP_KHR,
xwl_pixmap->bo, NULL);
+ if (xwl_pixmap->image == EGL_NO_IMAGE_KHR)
+ goto error;
glGenTextures(1, &xwl_pixmap->texture);
glBindTexture(GL_TEXTURE_2D, xwl_pixmap->texture);
@@ -176,14 +178,31 @@ xwl_glamor_gbm_create_pixmap_for_bo(ScreenPtr screen, struct gbm_bo *bo,
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, xwl_pixmap->image);
- glBindTexture(GL_TEXTURE_2D, 0);
+ if (eglGetError() != EGL_SUCCESS)
+ goto error;
- xwl_pixmap_set_private(pixmap, xwl_pixmap);
+ glBindTexture(GL_TEXTURE_2D, 0);
glamor_set_pixmap_texture(pixmap, xwl_pixmap->texture);
+ /* `set_pixmap_texture()` may fail silently if the FBO creation failed,
+ * so we check again the texture to be sure it worked.
+ */
+ if (!glamor_get_pixmap_texture(pixmap))
+ goto error;
+
glamor_set_pixmap_type(pixmap, GLAMOR_TEXTURE_DRM);
+ xwl_pixmap_set_private(pixmap, xwl_pixmap);
return pixmap;
+
+error:
+ if (xwl_pixmap->image != EGL_NO_IMAGE_KHR)
+ eglDestroyImageKHR(xwl_screen->egl_display, xwl_pixmap->image);
+ if (pixmap)
+ glamor_destroy_pixmap(pixmap);
+ free(xwl_pixmap);
+
+ return NULL;
}
static PixmapPtr
@@ -194,6 +213,7 @@ xwl_glamor_gbm_create_pixmap(ScreenPtr screen,
struct xwl_screen *xwl_screen = xwl_screen_get(screen);
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
struct gbm_bo *bo;
+ PixmapPtr pixmap = NULL;
if (width > 0 && height > 0 && depth >= 15 &&
(hint == 0 ||
@@ -219,10 +239,16 @@ xwl_glamor_gbm_create_pixmap(ScreenPtr screen,
}
if (bo)
- return xwl_glamor_gbm_create_pixmap_for_bo(screen, bo, depth);
+ pixmap = xwl_glamor_gbm_create_pixmap_for_bo(screen, bo, depth);
+
+ if (!pixmap)
+ gbm_bo_destroy(bo);
}
- return glamor_create_pixmap(screen, width, height, depth, hint);
+ if (!pixmap)
+ pixmap = glamor_create_pixmap(screen, width, height, depth, hint);
+
+ return pixmap;
}
static Bool
--
2.21.0

View file

@ -1,38 +0,0 @@
From c86222d4bd94892f3bf3c5947c19793ca18bd9e2 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Wed, 22 May 2019 17:51:04 +0200
Subject: [PATCH xserver] xwayland: Reset scheduled frames after hiding tablet
cursor
Hiding the tablet tool cursor results in it being hidden forever after.
This is due to the stale frame callback that will neither be disposed
or replaced. This can be reproduced in krita (X11) as the pointer
cursor is hidden while over the canvas.
Clearing the frame callback ensures the correct behavior in future
xwl_tablet_tool_set_cursor() calls (i.e. a new cursor surface being
displayed, and a new frame callback created), and is 1:1
with xwl_seat_set_cursor() for pointers.
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
(cherry picked from commit dea4a74621294391ce5901bb3339e1b8e7151efc)
---
hw/xwayland/xwayland-cursor.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c
index cf8395f1d..66720bcc0 100644
--- a/hw/xwayland/xwayland-cursor.c
+++ b/hw/xwayland/xwayland-cursor.c
@@ -188,6 +188,8 @@ xwl_tablet_tool_set_cursor(struct xwl_tablet_tool *xwl_tablet_tool)
zwp_tablet_tool_v2_set_cursor(xwl_tablet_tool->tool,
xwl_tablet_tool->proximity_in_serial,
NULL, 0, 0);
+ clear_cursor_frame_callback(xwl_cursor);
+ xwl_cursor->needs_update = FALSE;
return;
}
--
2.21.0

View file

@ -1,36 +0,0 @@
From 2e18eec6f03cc4d9d5bf62853c65d341b363f4b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
Date: Fri, 8 Mar 2019 18:49:04 +0100
Subject: [PATCH xserver] xwayland/present: Destroy sync_callback in
xwl_present_cleanup
xwl_present_cleanup frees the struct xwl_present_window memory,
so if there's a pending callback, we have to destroy it to prevent
use-after-free in xwl_present_sync_callback.
Should fix issue #645.
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
---
hw/xwayland/xwayland-present.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c
index 192f59a653..a1b3109cc2 100644
--- a/hw/xwayland/xwayland-present.c
+++ b/hw/xwayland/xwayland-present.c
@@ -123,6 +123,11 @@ xwl_present_cleanup(WindowPtr window)
xwl_present_window->frame_callback = NULL;
}
+ if (xwl_present_window->sync_callback) {
+ wl_callback_destroy(xwl_present_window->sync_callback);
+ xwl_present_window->sync_callback = NULL;
+ }
+
/* Clear remaining events */
xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->event_list, list) {
xorg_list_del(&event->list);
--
2.20.1

View file

@ -1,136 +0,0 @@
From 1804e7327113d128ac9a759da55fd3de0b9f8c35 Mon Sep 17 00:00:00 2001
From: Matt Roper <matthew.d.roper@intel.com>
Date: Wed, 26 Jun 2019 09:34:46 -0700
Subject: [PATCH xserver 02/15] dri2: Sync i965_pci_ids.h from mesa
Copied from Mesa with no modifications.
This update brings in a significant number of new platform ID's.
Syncs with mesa up to commit e334a595e ("intel/icl: Add new ICL
PCI-IDs").
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
(cherry picked from commit a8d9ebeb43583e8d8ef182ac15adbdce256d4867)
---
hw/xfree86/dri2/pci_ids/i965_pci_ids.h | 53 +++++++++++++++++++++-----
1 file changed, 43 insertions(+), 10 deletions(-)
diff --git a/hw/xfree86/dri2/pci_ids/i965_pci_ids.h b/hw/xfree86/dri2/pci_ids/i965_pci_ids.h
index 1ef1a0edf..646df447b 100644
--- a/hw/xfree86/dri2/pci_ids/i965_pci_ids.h
+++ b/hw/xfree86/dri2/pci_ids/i965_pci_ids.h
@@ -1,3 +1,4 @@
+#ifndef IRIS
CHIPSET(0x29A2, i965, "Intel(R) 965G")
CHIPSET(0x2992, i965, "Intel(R) 965Q")
CHIPSET(0x2982, i965, "Intel(R) 965G")
@@ -91,6 +92,11 @@ CHIPSET(0x0F32, byt, "Intel(R) Bay Trail")
CHIPSET(0x0F33, byt, "Intel(R) Bay Trail")
CHIPSET(0x0157, byt, "Intel(R) Bay Trail")
CHIPSET(0x0155, byt, "Intel(R) Bay Trail")
+CHIPSET(0x22B0, chv, "Intel(R) HD Graphics (Cherrytrail)")
+CHIPSET(0x22B1, chv, "Intel(R) HD Graphics XXX (Braswell)") /* Overridden in brw_get_renderer_string */
+CHIPSET(0x22B2, chv, "Intel(R) HD Graphics (Cherryview)")
+CHIPSET(0x22B3, chv, "Intel(R) HD Graphics (Cherryview)")
+#endif
CHIPSET(0x1602, bdw_gt1, "Intel(R) Broadwell GT1")
CHIPSET(0x1606, bdw_gt1, "Intel(R) Broadwell GT1")
CHIPSET(0x160A, bdw_gt1, "Intel(R) Broadwell GT1")
@@ -109,10 +115,6 @@ CHIPSET(0x162A, bdw_gt3, "Intel(R) Iris Pro P6300 (Broadwell GT3e)")
CHIPSET(0x162B, bdw_gt3, "Intel(R) Iris 6100 (Broadwell GT3)")
CHIPSET(0x162D, bdw_gt3, "Intel(R) Broadwell GT3")
CHIPSET(0x162E, bdw_gt3, "Intel(R) Broadwell GT3")
-CHIPSET(0x22B0, chv, "Intel(R) HD Graphics (Cherrytrail)")
-CHIPSET(0x22B1, chv, "Intel(R) HD Graphics XXX (Braswell)") /* Overridden in brw_get_renderer_string */
-CHIPSET(0x22B2, chv, "Intel(R) HD Graphics (Cherryview)")
-CHIPSET(0x22B3, chv, "Intel(R) HD Graphics (Cherryview)")
CHIPSET(0x1902, skl_gt1, "Intel(R) HD Graphics 510 (Skylake GT1)")
CHIPSET(0x1906, skl_gt1, "Intel(R) HD Graphics 510 (Skylake GT1)")
CHIPSET(0x190A, skl_gt1, "Intel(R) Skylake GT1")
@@ -156,7 +158,6 @@ CHIPSET(0x5912, kbl_gt2, "Intel(R) HD Graphics 630 (Kaby Lake GT2)")
CHIPSET(0x5916, kbl_gt2, "Intel(R) HD Graphics 620 (Kaby Lake GT2)")
CHIPSET(0x591A, kbl_gt2, "Intel(R) HD Graphics P630 (Kaby Lake GT2)")
CHIPSET(0x591B, kbl_gt2, "Intel(R) HD Graphics 630 (Kaby Lake GT2)")
-CHIPSET(0x591C, kbl_gt2, "Intel(R) Kaby Lake GT2")
CHIPSET(0x591D, kbl_gt2, "Intel(R) HD Graphics P630 (Kaby Lake GT2)")
CHIPSET(0x591E, kbl_gt2, "Intel(R) HD Graphics 615 (Kaby Lake GT2)")
CHIPSET(0x5921, kbl_gt2, "Intel(R) Kabylake GT2F")
@@ -164,13 +165,15 @@ CHIPSET(0x5923, kbl_gt3, "Intel(R) Kabylake GT3")
CHIPSET(0x5926, kbl_gt3, "Intel(R) Iris Plus Graphics 640 (Kaby Lake GT3e)")
CHIPSET(0x5927, kbl_gt3, "Intel(R) Iris Plus Graphics 650 (Kaby Lake GT3e)")
CHIPSET(0x593B, kbl_gt4, "Intel(R) Kabylake GT4")
+CHIPSET(0x591C, kbl_gt2, "Intel(R) Amber Lake (Kabylake) GT2")
+CHIPSET(0x87C0, kbl_gt2, "Intel(R) Amber Lake (Kabylake) GT2")
+CHIPSET(0x87CA, cfl_gt2, "Intel(R) Amber Lake (Coffeelake) GT2")
CHIPSET(0x3184, glk, "Intel(R) UHD Graphics 605 (Geminilake)")
CHIPSET(0x3185, glk_2x6, "Intel(R) UHD Graphics 600 (Geminilake 2x6)")
CHIPSET(0x3E90, cfl_gt1, "Intel(R) UHD Graphics 610 (Coffeelake 2x6 GT1)")
CHIPSET(0x3E93, cfl_gt1, "Intel(R) UHD Graphics 610 (Coffeelake 2x6 GT1)")
CHIPSET(0x3E99, cfl_gt1, "Intel(R) HD Graphics (Coffeelake 2x6 GT1)")
-CHIPSET(0x3EA1, cfl_gt1, "Intel(R) HD Graphics (Coffeelake 2x6 GT1)")
-CHIPSET(0x3EA4, cfl_gt1, "Intel(R) HD Graphics (Coffeelake 2x6 GT1)")
+CHIPSET(0x3E9C, cfl_gt1, "Intel(R) HD Graphics (Coffeelake 2x6 GT1)")
CHIPSET(0x3E91, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)")
CHIPSET(0x3E92, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)")
CHIPSET(0x3E96, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)")
@@ -178,14 +181,34 @@ CHIPSET(0x3E98, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)")
CHIPSET(0x3E9A, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)")
CHIPSET(0x3E9B, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)")
CHIPSET(0x3E94, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)")
-CHIPSET(0x3EA0, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)")
-CHIPSET(0x3EA3, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)")
CHIPSET(0x3EA9, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)")
-CHIPSET(0x3EA2, cfl_gt3, "Intel(R) HD Graphics (Coffeelake 3x8 GT3)")
CHIPSET(0x3EA5, cfl_gt3, "Intel(R) HD Graphics (Coffeelake 3x8 GT3)")
CHIPSET(0x3EA6, cfl_gt3, "Intel(R) HD Graphics (Coffeelake 3x8 GT3)")
CHIPSET(0x3EA7, cfl_gt3, "Intel(R) HD Graphics (Coffeelake 3x8 GT3)")
CHIPSET(0x3EA8, cfl_gt3, "Intel(R) HD Graphics (Coffeelake 3x8 GT3)")
+CHIPSET(0x3EA1, cfl_gt1, "Intel(R) HD Graphics (Whiskey Lake 2x6 GT1)")
+CHIPSET(0x3EA4, cfl_gt1, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT1)")
+CHIPSET(0x3EA0, cfl_gt2, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT2)")
+CHIPSET(0x3EA3, cfl_gt2, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT2)")
+CHIPSET(0x3EA2, cfl_gt3, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT3)")
+CHIPSET(0x9B21, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
+CHIPSET(0x9BA0, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
+CHIPSET(0x9BA2, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
+CHIPSET(0x9BA4, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
+CHIPSET(0x9BA5, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
+CHIPSET(0x9BA8, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
+CHIPSET(0x9BAA, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
+CHIPSET(0x9BAB, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
+CHIPSET(0x9BAC, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
+CHIPSET(0x9B41, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
+CHIPSET(0x9BC0, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
+CHIPSET(0x9BC2, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
+CHIPSET(0x9BC4, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
+CHIPSET(0x9BC5, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
+CHIPSET(0x9BC8, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
+CHIPSET(0x9BCA, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
+CHIPSET(0x9BCB, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
+CHIPSET(0x9BCC, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x5A49, cnl_2x8, "Intel(R) HD Graphics (Cannonlake 2x8 GT0.5)")
CHIPSET(0x5A4A, cnl_2x8, "Intel(R) HD Graphics (Cannonlake 2x8 GT0.5)")
CHIPSET(0x5A41, cnl_3x8, "Intel(R) HD Graphics (Cannonlake 3x8 GT1)")
@@ -201,8 +224,18 @@ CHIPSET(0x5A54, cnl_5x8, "Intel(R) HD Graphics (Cannonlake 5x8 GT2)")
CHIPSET(0x8A50, icl_8x8, "Intel(R) HD Graphics (Ice Lake 8x8 GT2)")
CHIPSET(0x8A51, icl_8x8, "Intel(R) HD Graphics (Ice Lake 8x8 GT2)")
CHIPSET(0x8A52, icl_8x8, "Intel(R) HD Graphics (Ice Lake 8x8 GT2)")
+CHIPSET(0x8A53, icl_8x8, "Intel(R) HD Graphics (Ice Lake 8x8 GT2)")
+CHIPSET(0x8A54, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)")
+CHIPSET(0x8A56, icl_4x8, "Intel(R) HD Graphics (Ice Lake 4x8 GT1)")
+CHIPSET(0x8A57, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)")
+CHIPSET(0x8A58, icl_4x8, "Intel(R) HD Graphics (Ice Lake 4x8 GT1)")
+CHIPSET(0x8A59, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)")
CHIPSET(0x8A5A, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)")
CHIPSET(0x8A5B, icl_4x8, "Intel(R) HD Graphics (Ice Lake 4x8 GT1)")
CHIPSET(0x8A5C, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)")
CHIPSET(0x8A5D, icl_4x8, "Intel(R) HD Graphics (Ice Lake 4x8 GT1)")
CHIPSET(0x8A71, icl_1x8, "Intel(R) HD Graphics (Ice Lake 1x8 GT0.5)")
+CHIPSET(0x4500, ehl_4x8, "Intel(R) HD Graphics (Elkhart Lake 4x8)")
+CHIPSET(0x4571, ehl_4x8, "Intel(R) HD Graphics (Elkhart Lake 4x8)")
+CHIPSET(0x4551, ehl_4x4, "Intel(R) HD Graphics (Elkhart Lake 4x4)")
+CHIPSET(0x4541, ehl_2x4, "Intel(R) HD Graphics (Elkhart Lake 2x4)")
--
2.21.0

View file

@ -1,31 +0,0 @@
From e262c8ae0039710422c11ae254ddb4ae7e6fac02 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Fri, 5 Oct 2018 14:03:54 -0400
Subject: [PATCH xserver 2/4] modesetting: Propagate more failure in
drmmode_set_mode_major
It's possible that actually setting the mode would fail even though the
check succeeded. We would throw away the error in this case, which would
probably make recovery a bit difficult.
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
hw/xfree86/drivers/modesetting/drmmode_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index a8d989a24..33f6cea3b 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1540,7 +1540,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
/* if we only tested the mode previously, really set it now */
if (can_test)
- drmmode_crtc_set_mode(crtc, FALSE);
+ ret = drmmode_crtc_set_mode(crtc, FALSE);
ms->pending_modeset = FALSE;
}
--
2.20.1

View file

@ -1,64 +0,0 @@
From e7f0961638818df8ee91edfae0378a02f7177e9f Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Fri, 5 Oct 2018 14:00:33 -0400
Subject: [PATCH xserver 3/4] modesetting: Factor out drmmode_target_output
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
.../drivers/modesetting/drmmode_display.c | 26 ++++++++++++-------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 33f6cea3b..7924aa396 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -757,6 +757,21 @@ drmmode_crtc_disable(xf86CrtcPtr crtc)
return ret;
}
+static xf86OutputPtr
+drmmode_target_output(ScrnInfoPtr scrn, xf86CrtcPtr crtc)
+{
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
+ int o;
+
+ if (config->output[config->compat_output]->crtc == crtc)
+ return config->output[config->compat_output];
+
+ for (o = 0; o < config->num_output; o++)
+ if (config->output[o]->crtc == crtc)
+ return config->output[o];
+
+ return NULL;
+}
static int
drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
{
@@ -3448,7 +3463,6 @@ drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode, Bool set_hw)
xf86CrtcPtr crtc = config->crtc[c];
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
xf86OutputPtr output = NULL;
- int o;
/* Skip disabled CRTCs */
if (!crtc->enabled) {
@@ -3459,15 +3473,7 @@ drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode, Bool set_hw)
continue;
}
- if (config->output[config->compat_output]->crtc == crtc)
- output = config->output[config->compat_output];
- else {
- for (o = 0; o < config->num_output; o++)
- if (config->output[o]->crtc == crtc) {
- output = config->output[o];
- break;
- }
- }
+ output = drmmode_target_output(pScrn, crtc);
/* paranoia */
if (!output)
continue;
--
2.20.1

View file

@ -1,80 +0,0 @@
From 44c693f45d6abd6f7f3bd2f756d35811db143af7 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Fri, 28 Jun 2019 16:55:11 +0200
Subject: [PATCH xserver 03/15] xwayland: Update screen pixmap on output resize
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Running Xwayland non-rootless and resizing the output would lead to a
crash while trying to update the larger areas of the root window.
Make sure we resize the backing pixmap according to the new output size
to avoid the crash.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/834
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit ce9455b5ee389b100a9b7da76b79690d97211b7a)
---
hw/xwayland/xwayland-output.c | 37 +++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index cc68f0340..9d33ed862 100644
--- a/hw/xwayland/xwayland-output.c
+++ b/hw/xwayland/xwayland-output.c
@@ -171,6 +171,40 @@ approximate_mmpd(struct xwl_screen *xwl_screen)
return 25.4 / DEFAULT_DPI;
}
+static int
+xwl_set_pixmap_visit_window(WindowPtr window, void *data)
+{
+ ScreenPtr screen = window->drawable.pScreen;
+
+ if (screen->GetWindowPixmap(window) == data) {
+ screen->SetWindowPixmap(window, screen->GetScreenPixmap(screen));
+ return WT_WALKCHILDREN;
+ }
+
+ return WT_DONTWALKCHILDREN;
+}
+
+static void
+update_backing_pixmaps(struct xwl_screen *xwl_screen, int width, int height)
+{
+ ScreenPtr pScreen = xwl_screen->screen;
+ WindowPtr pRoot = pScreen->root;
+ PixmapPtr old_pixmap, new_pixmap;
+
+ old_pixmap = pScreen->GetScreenPixmap(pScreen);
+ new_pixmap = pScreen->CreatePixmap(pScreen, width, height,
+ pScreen->rootDepth,
+ CREATE_PIXMAP_USAGE_BACKING_PIXMAP);
+ pScreen->SetScreenPixmap(new_pixmap);
+
+ if (old_pixmap) {
+ TraverseTree(pRoot, xwl_set_pixmap_visit_window, old_pixmap);
+ pScreen->DestroyPixmap(old_pixmap);
+ }
+
+ pScreen->ResizeWindow(pRoot, 0, 0, width, height, NULL);
+}
+
static void
update_screen_size(struct xwl_output *xwl_output, int width, int height)
{
@@ -180,6 +214,9 @@ update_screen_size(struct xwl_output *xwl_output, int width, int height)
if (xwl_screen->root_clip_mode == ROOT_CLIP_FULL)
SetRootClip(xwl_screen->screen, ROOT_CLIP_NONE);
+ if (!xwl_screen->rootless && xwl_screen->screen->root)
+ update_backing_pixmaps (xwl_screen, width, height);
+
xwl_screen->width = width;
xwl_screen->height = height;
xwl_screen->screen->width = width;
--
2.21.0

View file

@ -1,245 +0,0 @@
From e4e389447c59c89d39a5a78a5f19cdfd22d7699c Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Fri, 5 Oct 2018 14:09:35 -0400
Subject: [PATCH xserver 4/4] modesetting: Use atomic instead of per-crtc walks
where we can
drmmode_set_desired_modes (reachable from CreateScreenResources,
EnterVT, etc.) currently works by doing ->set_mode_major on each CRTC.
This is silly, as atomic lets us configure every CRTC at once. It's also
fragile, because we're not trying very hard to ensure the intermediate
states are valid.
This patch introduces drmmode_set_mode_atomic, which blasts the entire
RANDR state into the kernel in an... atomic... fashion. We change
drmmode_set_desired_modes and drmmode_xf86crtc_resize to use this
instead of walking each CRTC. We also change drmmode_crtc_set_mode to
use this, so that client RANDR requests (operating CRTC-at-a-time, since
RANDR doesn't have atomic changes yet) use the same code paths.
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
.../drivers/modesetting/drmmode_display.c | 179 +++++++++++-------
1 file changed, 109 insertions(+), 70 deletions(-)
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 7924aa396..020678155 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -772,6 +772,96 @@ drmmode_target_output(ScrnInfoPtr scrn, xf86CrtcPtr crtc)
return NULL;
}
+
+static int
+drmmode_set_mode_atomic(ScrnInfoPtr scrn, modesettingPtr ms, Bool test_only)
+{
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ drmModeAtomicReq *req = drmModeAtomicAlloc();
+ uint32_t flags = DRM_MODE_ATOMIC_ALLOW_MODESET;
+ int i, j, ret = 0;
+
+ if (!req)
+ return 1;
+
+ for (i = 0; i < xf86_config->num_crtc; i++) {
+ xf86CrtcPtr crtc = xf86_config->crtc[i];
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+ Bool active = crtc->enabled;
+ uint32_t fb_id;
+ int x, y;
+ drmModeModeInfo kmode;
+
+ if (active) {
+ drmmode_ConvertToKMode(crtc->scrn, &kmode, &crtc->desiredMode);
+ ret |= drm_mode_ensure_blob(crtc, kmode);
+
+ /* XXX this probably doesn't belong here */
+ if (!crtc->mode.HDisplay && crtc->desiredMode.HDisplay)
+ memcpy(&crtc->mode, &crtc->desiredMode, sizeof(crtc->mode));
+ }
+
+ ret |= !drmmode_crtc_get_fb_id(crtc, &fb_id, &x, &y);
+ ret |= crtc_add_prop(req, drmmode_crtc,
+ DRMMODE_CRTC_ACTIVE, active);
+ ret |= crtc_add_prop(req, drmmode_crtc,
+ DRMMODE_CRTC_MODE_ID,
+ active ? drmmode_crtc->current_mode->blob_id : 0);
+ ret |= plane_add_props(req, crtc, active ? fb_id : 0, x, y);
+ }
+
+ for (i = 0; i < xf86_config->num_output; i++) {
+ xf86OutputPtr output = xf86_config->output[i];
+ drmmode_output_private_ptr drmmode_output = output->driver_private;
+ drmmode_crtc_private_ptr drm_crtc =
+ output->crtc ? output->crtc->driver_private : NULL;
+
+ if (drmmode_output->output_id == -1)
+ continue;
+
+ ret |= connector_add_prop(req, drmmode_output,
+ DRMMODE_CONNECTOR_CRTC_ID,
+ drm_crtc ? drm_crtc->mode_crtc->crtc_id : 0);
+ }
+
+ if (test_only)
+ flags |= DRM_MODE_ATOMIC_TEST_ONLY;
+
+ if (ret == 0)
+ ret = drmModeAtomicCommit(ms->fd, req, flags, NULL);
+
+ if (ret == 0 && !test_only) {
+ for (i = 0; i < xf86_config->num_crtc; i++) {
+ xf86CrtcPtr crtc = xf86_config->crtc[i];
+ for (j = 0; i < xf86_config->num_output; i++) {
+ xf86OutputPtr output = xf86_config->output[j];
+ drmmode_output_private_ptr drmmode_output =
+ output->driver_private;
+
+ if (output->crtc == crtc)
+ drmmode_output->current_crtc = crtc;
+ else if (drmmode_output->current_crtc == crtc)
+ drmmode_output->current_crtc = NULL;
+ }
+ }
+ }
+
+ if (ret == 0 && test_only) {
+ for (i = 0; i < xf86_config->num_crtc; i++) {
+ xf86CrtcPtr crtc = xf86_config->crtc[i];
+ crtc->mode = crtc->desiredMode;
+ crtc->rotation = crtc->desiredRotation;
+ crtc->x = crtc->desiredX;
+ crtc->y = crtc->desiredY;
+ if (!xf86CrtcRotate(crtc))
+ ret = 1;
+ }
+ }
+
+ drmModeAtomicFree(req);
+ return ret;
+}
+
static int
drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
{
@@ -786,73 +876,12 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
int x, y;
int i, ret = 0;
+ if (ms->atomic_modeset)
+ return drmmode_set_mode_atomic(crtc->scrn, ms, test_only);
+
if (!drmmode_crtc_get_fb_id(crtc, &fb_id, &x, &y))
return 1;
- if (ms->atomic_modeset) {
- drmModeAtomicReq *req = drmModeAtomicAlloc();
- Bool active;
- uint32_t flags = DRM_MODE_ATOMIC_ALLOW_MODESET;
-
- if (!req)
- return 1;
-
- ret |= crtc_add_dpms_props(req, crtc, DPMSModeOn, &active);
- ret |= plane_add_props(req, crtc, active ? fb_id : 0, x, y);
-
- /* Orphaned CRTCs need to be disabled right now in atomic mode */
- for (i = 0; i < xf86_config->num_crtc; i++) {
- xf86CrtcPtr other_crtc = xf86_config->crtc[i];
- drmmode_crtc_private_ptr other_drmmode_crtc = other_crtc->driver_private;
- int lost_outputs = 0;
- int remaining_outputs = 0;
- int j;
-
- if (other_crtc == crtc)
- continue;
-
- for (j = 0; j < xf86_config->num_output; j++) {
- xf86OutputPtr output = xf86_config->output[j];
- drmmode_output_private_ptr drmmode_output = output->driver_private;
-
- if (drmmode_output->current_crtc == other_crtc) {
- if (output->crtc == crtc)
- lost_outputs++;
- else
- remaining_outputs++;
- }
- }
-
- if (lost_outputs > 0 && remaining_outputs == 0) {
- ret |= crtc_add_prop(req, other_drmmode_crtc,
- DRMMODE_CRTC_ACTIVE, 0);
- ret |= crtc_add_prop(req, other_drmmode_crtc,
- DRMMODE_CRTC_MODE_ID, 0);
- }
- }
-
- if (test_only)
- flags |= DRM_MODE_ATOMIC_TEST_ONLY;
-
- if (ret == 0)
- ret = drmModeAtomicCommit(ms->fd, req, flags, NULL);
-
- if (ret == 0 && !test_only) {
- for (i = 0; i < xf86_config->num_output; i++) {
- xf86OutputPtr output = xf86_config->output[i];
- drmmode_output_private_ptr drmmode_output = output->driver_private;
-
- if (output->crtc == crtc)
- drmmode_output->current_crtc = crtc;
- else if (drmmode_output->current_crtc == crtc)
- drmmode_output->current_crtc = NULL;
- }
- }
-
- drmModeAtomicFree(req);
- return ret;
- }
-
output_ids = calloc(sizeof(uint32_t), xf86_config->num_output);
if (!output_ids)
return -1;
@@ -3199,14 +3228,19 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
if (!drmmode_glamor_handle_new_screen_pixmap(drmmode))
goto fail;
- for (i = 0; i < xf86_config->num_crtc; i++) {
- xf86CrtcPtr crtc = xf86_config->crtc[i];
+ if (ms->atomic_modeset) {
+ if (drmmode_set_mode_atomic(scrn, ms, FALSE))
+ goto fail;
+ } else {
+ for (i = 0; i < xf86_config->num_crtc; i++) {
+ xf86CrtcPtr crtc = xf86_config->crtc[i];
- if (!crtc->enabled)
- continue;
+ if (!crtc->enabled)
+ continue;
- drmmode_set_mode_major(crtc, &crtc->mode,
- crtc->rotation, crtc->x, crtc->y);
+ drmmode_set_mode_major(crtc, &crtc->mode,
+ crtc->rotation, crtc->x, crtc->y);
+ }
}
if (old_fb_id) {
@@ -3457,8 +3491,13 @@ Bool
drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode, Bool set_hw)
{
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ modesettingPtr ms = modesettingPTR(pScrn);
int c;
+ /* drmmode_set_mode_atomic returns 0 on success, we return TRUE */
+ if (ms->atomic_modeset)
+ return !drmmode_set_mode_atomic(pScrn, ms, /* test_only = */ !set_hw);
+
for (c = 0; c < config->num_crtc; c++) {
xf86CrtcPtr crtc = config->crtc[c];
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
--
2.20.1

View file

@ -1,36 +0,0 @@
From df7ee10d9812897b297c67fde29f0b134ffba3ec Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Mon, 15 Jul 2019 11:38:44 -0400
Subject: [PATCH xserver 04/15] xwayland: Expand the RANDR screen size limits
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
There's not really a good way to query this from the wayland server, so
just set the maximum to the X11 protocol limits. While we're at it,
lower the minimum screen size to something implausibly small too, just
in case.
Fixes: xorg/xserver#850
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit d0850241c6218f61127c45c2f95d6e791c3fea44)
---
hw/xwayland/xwayland-output.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index 9d33ed862..aa6f37864 100644
--- a/hw/xwayland/xwayland-output.c
+++ b/hw/xwayland/xwayland-output.c
@@ -476,7 +476,7 @@ xwl_screen_init_output(struct xwl_screen *xwl_screen)
if (!RRScreenInit(xwl_screen->screen))
return FALSE;
- RRScreenSetSizeRange(xwl_screen->screen, 320, 200, 8192, 8192);
+ RRScreenSetSizeRange(xwl_screen->screen, 16, 16, 32767, 32767);
rp = rrGetScrPriv(xwl_screen->screen);
rp->rrGetInfo = xwl_randr_get_info;
--
2.21.0

View file

@ -1,56 +0,0 @@
From dfd51be3ca2a244bbca27a95310b60e0c14940df Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Tue, 23 Jul 2019 11:01:47 +0200
Subject: [PATCH xserver 05/15] xwayland: Do not free a NULL GBM bo
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Both `gbm_bo_create()` and `gbm_bo_create_with_modifiers()` can fail and
return `NULL`.
If that occurs, `xwl_glamor_gbm_create_pixmap()` will not create a
pixmap for the (NULL) GBM bo, but would still try to free the bo which
leads to a crash in mesa:
[...]
#7 <signal handler called>
#8 in gbm_bo_destroy (bo=0x0) at ../src/gbm/main/gbm.c:439
#9 in xwl_glamor_gbm_create_pixmap () at xwayland-glamor-gbm.c:245
#10 in ProcCreatePixmap () at dispatch.c:1440
#11 in Dispatch () at dispatch.c:478
#12 in dix_main () at main.c:276
To avoid the crash, only free the GBM bo if not `NULL`.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Bugzilla: https://bugzilla.redhat.com/1729925
(cherry picked from commit d9ec525059dbe96fc893c73c0362be2a6dd73e85)
---
hw/xwayland/xwayland-glamor-gbm.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 80146ab6e..291e060cf 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -238,11 +238,12 @@ xwl_glamor_gbm_create_pixmap(ScreenPtr screen,
GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING);
}
- if (bo)
+ if (bo) {
pixmap = xwl_glamor_gbm_create_pixmap_for_bo(screen, bo, depth);
- if (!pixmap)
- gbm_bo_destroy(bo);
+ if (!pixmap)
+ gbm_bo_destroy(bo);
+ }
}
if (!pixmap)
--
2.21.0

View file

@ -1,244 +0,0 @@
From 82f01ad7869e3f2be51e41a8246dab5982bbc36a Mon Sep 17 00:00:00 2001
From: Alex Goins <agoins@nvidia.com>
Date: Wed, 10 Apr 2019 13:48:02 -0500
Subject: [PATCH xserver 06/15] xsync: Add resource inside of SyncCreate,
export SyncCreate
As shown by DRI3 adding the SyncCreateFenceFromFD() function, extensions may
want to create a fence, then initialize it in their own way. This currently
can't be done without adding a function directly to Xext/sync.c due to the fact
that the RTFence resource type is private and there is no external interface to
add to it.
To facilitate other X extensions creating fences and initializing them, this
change exports SyncCreate() and adds the resource directly within it. Callers no
longer need to call AddResource() after SyncCreate(), they only need to
initialize the SyncObject.
To prevent FreeFence() and FreeCounter() from segfaulting if the call to
AddResource() fails before the sync object is initialized, this adds a new
'initialized' parameter to SyncObject that, when FALSE, causes FreeFence() and
FreeCounter() to skip de-initialization and simply free the object.
Initialization after adding the resource shouldn't otherwise be a problem due to
the single-threaded nature of X.
Signed-off-by: Alex Goins <agoins@nvidia.com>
Reviewed-by: James Jones <jajones@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
(cherry picked from commit 7f962c70b6d9c346477f23f6c15211e749110078)
---
Xext/sync.c | 50 +++++++++++++++++++++++-------------------
Xext/syncsdk.h | 3 +++
miext/sync/misync.c | 27 +++++++++++++----------
miext/sync/misync.h | 1 +
miext/sync/misyncstr.h | 5 +++--
5 files changed, 51 insertions(+), 35 deletions(-)
diff --git a/Xext/sync.c b/Xext/sync.c
index 8f22a865b..fd2ceb042 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -881,18 +881,21 @@ SyncChangeAlarmAttributes(ClientPtr client, SyncAlarm * pAlarm, Mask mask,
return Success;
}
-static SyncObject *
+SyncObject *
SyncCreate(ClientPtr client, XID id, unsigned char type)
{
SyncObject *pSync;
+ RESTYPE resType;
switch (type) {
case SYNC_COUNTER:
pSync = malloc(sizeof(SyncCounter));
+ resType = RTCounter;
break;
case SYNC_FENCE:
pSync = (SyncObject *) dixAllocateObjectWithPrivates(SyncFence,
PRIVATE_SYNC_FENCE);
+ resType = RTFence;
break;
default:
return NULL;
@@ -901,6 +904,11 @@ SyncCreate(ClientPtr client, XID id, unsigned char type)
if (!pSync)
return NULL;
+ pSync->initialized = FALSE;
+
+ if (!AddResource(id, resType, (void *) pSync))
+ return NULL;
+
pSync->client = client;
pSync->id = id;
pSync->pTriglist = NULL;
@@ -923,13 +931,10 @@ SyncCreateFenceFromFD(ClientPtr client, DrawablePtr pDraw, XID id, int fd, BOOL
status = miSyncInitFenceFromFD(pDraw, pFence, fd, initially_triggered);
if (status != Success) {
- dixFreeObjectWithPrivates(pFence, PRIVATE_SYNC_FENCE);
+ FreeResource(pFence->sync.id, RT_NONE);
return status;
}
- if (!AddResource(id, RTFence, (void *) pFence))
- return BadAlloc;
-
return Success;
#else
return BadImplementation;
@@ -957,8 +962,7 @@ SyncCreateCounter(ClientPtr client, XSyncCounter id, int64_t initialvalue)
pCounter->value = initialvalue;
pCounter->pSysCounterInfo = NULL;
- if (!AddResource(id, RTCounter, (void *) pCounter))
- return NULL;
+ pCounter->sync.initialized = TRUE;
return pCounter;
}
@@ -1137,21 +1141,26 @@ static int
FreeCounter(void *env, XID id)
{
SyncCounter *pCounter = (SyncCounter *) env;
- SyncTriggerList *ptl, *pnext;
pCounter->sync.beingDestroyed = TRUE;
- /* tell all the counter's triggers that the counter has been destroyed */
- for (ptl = pCounter->sync.pTriglist; ptl; ptl = pnext) {
- (*ptl->pTrigger->CounterDestroyed) (ptl->pTrigger);
- pnext = ptl->next;
- free(ptl); /* destroy the trigger list as we go */
- }
- if (IsSystemCounter(pCounter)) {
- xorg_list_del(&pCounter->pSysCounterInfo->entry);
- free(pCounter->pSysCounterInfo->name);
- free(pCounter->pSysCounterInfo->private);
- free(pCounter->pSysCounterInfo);
+
+ if (pCounter->sync.initialized) {
+ SyncTriggerList *ptl, *pnext;
+
+ /* tell all the counter's triggers that counter has been destroyed */
+ for (ptl = pCounter->sync.pTriglist; ptl; ptl = pnext) {
+ (*ptl->pTrigger->CounterDestroyed) (ptl->pTrigger);
+ pnext = ptl->next;
+ free(ptl); /* destroy the trigger list as we go */
+ }
+ if (IsSystemCounter(pCounter)) {
+ xorg_list_del(&pCounter->pSysCounterInfo->entry);
+ free(pCounter->pSysCounterInfo->name);
+ free(pCounter->pSysCounterInfo->private);
+ free(pCounter->pSysCounterInfo);
+ }
}
+
free(pCounter);
return Success;
}
@@ -1889,9 +1898,6 @@ ProcSyncCreateFence(ClientPtr client)
miSyncInitFence(pDraw->pScreen, pFence, stuff->initially_triggered);
- if (!AddResource(stuff->fid, RTFence, (void *) pFence))
- return BadAlloc;
-
return Success;
}
diff --git a/Xext/syncsdk.h b/Xext/syncsdk.h
index f1b99d010..c88285cb1 100644
--- a/Xext/syncsdk.h
+++ b/Xext/syncsdk.h
@@ -29,6 +29,9 @@
extern _X_EXPORT int
SyncVerifyFence(SyncFence ** ppFence, XID fid, ClientPtr client, Mask mode);
+extern _X_EXPORT SyncObject*
+ SyncCreate(ClientPtr client, XID id, unsigned char type);
+
#define VERIFY_SYNC_FENCE(pFence, fid, client, mode) \
do { \
int rc; \
diff --git a/miext/sync/misync.c b/miext/sync/misync.c
index 490fa0b17..0931803f6 100644
--- a/miext/sync/misync.c
+++ b/miext/sync/misync.c
@@ -101,24 +101,29 @@ miSyncInitFence(ScreenPtr pScreen, SyncFence * pFence, Bool initially_triggered)
pFence->funcs = miSyncFenceFuncs;
pScreenPriv->funcs.CreateFence(pScreen, pFence, initially_triggered);
+
+ pFence->sync.initialized = TRUE;
}
void
miSyncDestroyFence(SyncFence * pFence)
{
- ScreenPtr pScreen = pFence->pScreen;
- SyncScreenPrivPtr pScreenPriv = SYNC_SCREEN_PRIV(pScreen);
- SyncTriggerList *ptl, *pNext;
-
pFence->sync.beingDestroyed = TRUE;
- /* tell all the fence's triggers that the counter has been destroyed */
- for (ptl = pFence->sync.pTriglist; ptl; ptl = pNext) {
- (*ptl->pTrigger->CounterDestroyed) (ptl->pTrigger);
- pNext = ptl->next;
- free(ptl); /* destroy the trigger list as we go */
- }
- pScreenPriv->funcs.DestroyFence(pScreen, pFence);
+ if (pFence->sync.initialized) {
+ ScreenPtr pScreen = pFence->pScreen;
+ SyncScreenPrivPtr pScreenPriv = SYNC_SCREEN_PRIV(pScreen);
+ SyncTriggerList *ptl, *pNext;
+
+ /* tell all the fence's triggers that the counter has been destroyed */
+ for (ptl = pFence->sync.pTriglist; ptl; ptl = pNext) {
+ (*ptl->pTrigger->CounterDestroyed) (ptl->pTrigger);
+ pNext = ptl->next;
+ free(ptl); /* destroy the trigger list as we go */
+ }
+
+ pScreenPriv->funcs.DestroyFence(pScreen, pFence);
+ }
dixFreeObjectWithPrivates(pFence, PRIVATE_SYNC_FENCE);
}
diff --git a/miext/sync/misync.h b/miext/sync/misync.h
index dc78c5fdb..f7082d5ea 100644
--- a/miext/sync/misync.h
+++ b/miext/sync/misync.h
@@ -28,6 +28,7 @@
#ifndef _MISYNC_H_
#define _MISYNC_H_
+typedef struct _SyncObject SyncObject;
typedef struct _SyncFence SyncFence;
typedef struct _SyncTrigger SyncTrigger;
diff --git a/miext/sync/misyncstr.h b/miext/sync/misyncstr.h
index 2eab2aa57..2a6e84a96 100644
--- a/miext/sync/misyncstr.h
+++ b/miext/sync/misyncstr.h
@@ -38,13 +38,14 @@
#define SYNC_COUNTER 0
#define SYNC_FENCE 1
-typedef struct _SyncObject {
+struct _SyncObject {
ClientPtr client; /* Owning client. 0 for system counters */
struct _SyncTriggerList *pTriglist; /* list of triggers */
XID id; /* resource ID */
unsigned char type; /* SYNC_* */
+ Bool initialized; /* FALSE if created but not initialized */
Bool beingDestroyed; /* in process of going away */
-} SyncObject;
+};
typedef struct _SyncCounter {
SyncObject sync; /* Common sync object data */
--
2.21.0

View file

@ -1,92 +0,0 @@
From 1fdb7cbce538f0b37304a3cfc9fae4ff2fe9ece9 Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <kbrenneman@nvidia.com>
Date: Thu, 19 Oct 2017 15:14:51 -0600
Subject: [PATCH xserver 07/15] GLX: Add a per-client vendor mapping.
Each client now has its own (screen, vendor) mapping.
Currently, it's just a copy of the global mapping, but later changes will allow
it to change.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 37a36a6b5b887d5c5a17a6931ceba8ad5d1bb6d5)
---
glx/vndext.c | 11 ++++++++++-
glx/vndserver.h | 5 +++++
glx/vndservermapping.c | 19 +++++++++++++++----
3 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/glx/vndext.c b/glx/vndext.c
index d7936467b..20c0648cc 100644
--- a/glx/vndext.c
+++ b/glx/vndext.c
@@ -139,8 +139,17 @@ GlxGetClientData(ClientPtr client)
{
GlxClientPriv *cl = xglvGetClientPrivate(client);
if (cl == NULL) {
- cl = calloc(1, sizeof(GlxClientPriv));
+ cl = calloc(1, sizeof(GlxClientPriv)
+ + screenInfo.numScreens * sizeof(GlxServerVendor *));
if (cl != NULL) {
+ int i;
+
+ cl->vendors = (GlxServerVendor **) (cl + 1);
+ for (i=0; i<screenInfo.numScreens; i++)
+ {
+ cl->vendors[i] = GlxGetVendorForScreen(NULL, screenInfo.screens[i]);
+ }
+
xglvSetClientPrivate(client, cl);
}
}
diff --git a/glx/vndserver.h b/glx/vndserver.h
index a175656ae..78246d212 100644
--- a/glx/vndserver.h
+++ b/glx/vndserver.h
@@ -57,6 +57,11 @@ typedef struct GlxContextTagInfoRec {
typedef struct GlxClientPrivRec {
GlxContextTagInfo *contextTags;
unsigned int contextTagCount;
+
+ /**
+ * The vendor handles for each screen.
+ */
+ GlxServerVendor **vendors;
} GlxClientPriv;
extern int GlxErrorBase;
diff --git a/glx/vndservermapping.c b/glx/vndservermapping.c
index fd3be92d9..778656bb6 100644
--- a/glx/vndservermapping.c
+++ b/glx/vndservermapping.c
@@ -187,10 +187,21 @@ Bool GlxSetScreenVendor(ScreenPtr screen, GlxServerVendor *vendor)
GlxServerVendor *GlxGetVendorForScreen(ClientPtr client, ScreenPtr screen)
{
- GlxScreenPriv *priv = GlxGetScreen(screen);
- if (priv != NULL) {
- return priv->vendor;
+ // Note that the client won't be sending GPU screen numbers, so we don't
+ // need per-client mappings for them.
+ if (client != NULL && !screen->isGPU) {
+ GlxClientPriv *cl = GlxGetClientData(client);
+ if (cl != NULL) {
+ return cl->vendors[screen->myNum];
+ } else {
+ return NULL;
+ }
} else {
- return NULL;
+ GlxScreenPriv *priv = GlxGetScreen(screen);
+ if (priv != NULL) {
+ return priv->vendor;
+ } else {
+ return NULL;
+ }
}
}
--
2.21.0

View file

@ -1,114 +0,0 @@
From abeae4a6d356653d50026707ecc2afceac83631e Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <kbrenneman@nvidia.com>
Date: Wed, 8 May 2019 08:44:54 -0600
Subject: [PATCH xserver 08/15] GLX: Use the sending client for looking up
XID's
When GlxGetXIDMap looks up an unknown XID, it will now look up a vendor based
on the screen number for the XID and the client that sent the current request.
In GlxGetXIDMap, if the XID is for a regular X window, then it won't be in the
(XID -> vendor) mapping, so we have to look up a vendor by screen number.
With this change, GlxGetXIDMap will use the (screen -> vendor) map for
whichever client sent the current request, instead of using the global
(screen -> vendor) map.
Since GlxGetXIDMap doesn't take a ClientPtr argument, GlxDispatchRequest will
store the client for the current request in a global variable. That way, the
ABI for GLXVND doesn't need to change.
v2: Fix an error check in GlxDispatchRequest.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 8b67ec7cc6fda243480a5a8ca118b66242f3eb2c)
---
glx/vndcmds.c | 13 +++++++++++--
glx/vndserver.h | 7 +++++++
glx/vndservermapping.c | 12 ++++++++----
3 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/glx/vndcmds.c b/glx/vndcmds.c
index f0779d14a..21c6fef9e 100644
--- a/glx/vndcmds.c
+++ b/glx/vndcmds.c
@@ -468,15 +468,24 @@ void GlxDispatchReset(void)
int GlxDispatchRequest(ClientPtr client)
{
REQUEST(xReq);
+ int result;
+
if (GlxExtensionEntry->base == 0)
return BadRequest;
+
+ GlxSetRequestClient(client);
+
if (stuff->data < OPCODE_ARRAY_LEN) {
if (dispatchFuncs[stuff->data] == NULL) {
// Try to find a dispatch stub.
dispatchFuncs[stuff->data] = GetVendorDispatchFunc(stuff->data, 0);
}
- return dispatchFuncs[stuff->data](client);
+ result = dispatchFuncs[stuff->data](client);
} else {
- return dispatch_GLXSingle(client);
+ result = dispatch_GLXSingle(client);
}
+
+ GlxSetRequestClient(NULL);
+
+ return result;
}
diff --git a/glx/vndserver.h b/glx/vndserver.h
index 78246d212..613fef0fe 100644
--- a/glx/vndserver.h
+++ b/glx/vndserver.h
@@ -95,6 +95,13 @@ Bool GlxAddXIDMap(XID id, GlxServerVendor *vendor);
GlxServerVendor * GlxGetXIDMap(XID id);
void GlxRemoveXIDMap(XID id);
+/**
+ * Records the client that sent the current request. This is needed in
+ * GlxGetXIDMap to know which client's (screen -> vendor) mapping to use for a
+ * regular X window.
+ */
+void GlxSetRequestClient(ClientPtr client);
+
GlxContextTagInfo *GlxAllocContextTag(ClientPtr client, GlxServerVendor *vendor);
GlxContextTagInfo *GlxLookupContextTag(ClientPtr client, GLXContextTag tag);
void GlxFreeContextTag(GlxContextTagInfo *tagInfo);
diff --git a/glx/vndservermapping.c b/glx/vndservermapping.c
index 778656bb6..4efab8b81 100644
--- a/glx/vndservermapping.c
+++ b/glx/vndservermapping.c
@@ -33,6 +33,13 @@
#include "vndservervendor.h"
+static ClientPtr requestClient = NULL;
+
+void GlxSetRequestClient(ClientPtr client)
+{
+ requestClient = client;
+}
+
static GlxServerVendor *LookupXIDMapResource(XID id)
{
void *ptr = NULL;
@@ -59,10 +66,7 @@ GlxServerVendor *GlxGetXIDMap(XID id)
DixGetAttrAccess);
if (rv == Success && ptr != NULL) {
DrawablePtr draw = (DrawablePtr) ptr;
- GlxScreenPriv *screenPriv = GlxGetScreen(draw->pScreen);
- if (screenPriv != NULL) {
- vendor = screenPriv->vendor;
- }
+ vendor = GlxGetVendorForScreen(requestClient, draw->pScreen);
}
}
return vendor;
--
2.21.0

View file

@ -1,114 +0,0 @@
From d3034ef2f5121d85ae766a73fda4e523399043a9 Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <kbrenneman@nvidia.com>
Date: Thu, 2 May 2019 07:17:21 -0600
Subject: [PATCH xserver 09/15] GLX: Add a function to change a clients vendor
list.
Add a new function, GlxServerExports::setClientScreenVendor, which will change
the vendor that handles GLX requests for a screen, but only for requests from
a specific client.
v2: Increment the GLXVND minor version number.
v3: Note the GLXVND version requirement for setClientScreenVendor.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 56c0a71fdd94a008e5d746261f70a713c4767f93)
---
glx/vndext.c | 1 +
glx/vndserver.h | 1 +
glx/vndservermapping.c | 21 +++++++++++++++++++++
include/glxvndabi.h | 13 ++++++++++++-
4 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/glx/vndext.c b/glx/vndext.c
index 20c0648cc..582e60b6e 100644
--- a/glx/vndext.c
+++ b/glx/vndext.c
@@ -324,6 +324,7 @@ _X_EXPORT const GlxServerExports glxServer = {
.getContextTagPrivate = GlxGetContextTagPrivate,
.getVendorForScreen = GlxGetVendorForScreen,
.forwardRequest = GlxForwardRequest,
+ .setClientScreenVendor = GlxSetClientScreenVendor,
};
const GlxServerExports *
diff --git a/glx/vndserver.h b/glx/vndserver.h
index 613fef0fe..772b458a1 100644
--- a/glx/vndserver.h
+++ b/glx/vndserver.h
@@ -107,6 +107,7 @@ GlxContextTagInfo *GlxLookupContextTag(ClientPtr client, GLXContextTag tag);
void GlxFreeContextTag(GlxContextTagInfo *tagInfo);
Bool GlxSetScreenVendor(ScreenPtr screen, GlxServerVendor *vendor);
+Bool GlxSetClientScreenVendor(ClientPtr client, ScreenPtr screen, GlxServerVendor *vendor);
GlxScreenPriv *GlxGetScreen(ScreenPtr pScreen);
GlxServerVendor *GlxGetVendorForScreen(ClientPtr client, ScreenPtr screen);
diff --git a/glx/vndservermapping.c b/glx/vndservermapping.c
index 4efab8b81..04788ffbd 100644
--- a/glx/vndservermapping.c
+++ b/glx/vndservermapping.c
@@ -189,6 +189,27 @@ Bool GlxSetScreenVendor(ScreenPtr screen, GlxServerVendor *vendor)
return TRUE;
}
+Bool GlxSetClientScreenVendor(ClientPtr client, ScreenPtr screen, GlxServerVendor *vendor)
+{
+ GlxClientPriv *cl;
+
+ if (screen == NULL || screen->isGPU) {
+ return FALSE;
+ }
+
+ cl = GlxGetClientData(client);
+ if (cl == NULL) {
+ return FALSE;
+ }
+
+ if (vendor != NULL) {
+ cl->vendors[screen->myNum] = vendor;
+ } else {
+ cl->vendors[screen->myNum] = GlxGetVendorForScreen(NULL, screen);
+ }
+ return TRUE;
+}
+
GlxServerVendor *GlxGetVendorForScreen(ClientPtr client, ScreenPtr screen)
{
// Note that the client won't be sending GPU screen numbers, so we don't
diff --git a/include/glxvndabi.h b/include/glxvndabi.h
index b78306d23..71f36e722 100644
--- a/include/glxvndabi.h
+++ b/include/glxvndabi.h
@@ -75,7 +75,7 @@
* will still work.
*/
#define GLXSERVER_VENDOR_ABI_MAJOR_VERSION 0
-#define GLXSERVER_VENDOR_ABI_MINOR_VERSION 0
+#define GLXSERVER_VENDOR_ABI_MINOR_VERSION 1
#if defined(__cplusplus)
extern "C" {
@@ -236,6 +236,17 @@ typedef struct GlxServerExportsRec {
* \param client The client.
*/
int (* forwardRequest) (GlxServerVendor *vendor, ClientPtr client);
+
+ /**
+ * Sets the vendor library to use for a screen for a specific client.
+ *
+ * This function changes which vendor should handle GLX requests for a
+ * screen. Unlike \c setScreenVendor, this function can be called at any
+ * time, and only applies to requests from a single client.
+ *
+ * This function is available in GLXVND version 0.1 or later.
+ */
+ Bool (* setClientScreenVendor) (ClientPtr client, ScreenPtr screen, GlxServerVendor *vendor);
} GlxServerExports;
extern _X_EXPORT const GlxServerExports glxServer;
--
2.21.0

View file

@ -1,35 +0,0 @@
From 39b3005c329bc63676df72c43529d641bf305bcd Mon Sep 17 00:00:00 2001
From: Aaron Plattner <aplattner@nvidia.com>
Date: Tue, 21 May 2019 10:50:42 -0700
Subject: [PATCH xserver 10/15] GLX: Set GlxServerExports::{major,minor}Version
Commit 56c0a71fdd94a008e5d746261f70a713c4767f93 incremented the
GLXSERVER_VENDOR_ABI_MINOR_VERSION define, but this define was not actually
being used to set glxServer.minorVersion.
Update the initializer for glxServer to use the correct version numbers.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
(cherry picked from commit b4231d69028adc8123801a7552b40a15ea928d1b)
---
glx/vndext.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/glx/vndext.c b/glx/vndext.c
index 582e60b6e..0513733b6 100644
--- a/glx/vndext.c
+++ b/glx/vndext.c
@@ -304,8 +304,8 @@ GlxFreeServerImports(GlxServerImports *imports)
}
_X_EXPORT const GlxServerExports glxServer = {
- .majorVersion = 0,
- .minorVersion = 0,
+ .majorVersion = GLXSERVER_VENDOR_ABI_MAJOR_VERSION,
+ .minorVersion = GLXSERVER_VENDOR_ABI_MINOR_VERSION,
.extensionInitCallback = &vndInitCallbackListPtr,
--
2.21.0

View file

@ -1,39 +0,0 @@
From 8449c8623d6208b77e76596e8b10250817d3e8ab Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Mon, 19 Aug 2019 14:27:54 -0400
Subject: [PATCH xserver 11/15] miext/sync: Fix needless ABI change
The initialized field was added in:
commit 82f01ad7869e3f2be51e41a8246dab5982bbc36a
Author: Alex Goins <agoins@nvidia.com>
Date: Wed Apr 10 13:48:02 2019 -0500
xsync: Add resource inside of SyncCreate, export SyncCreate
But it added this field not at the end of SyncObject. It may not have
been _usefully_ possible to create those from another extension prior to
that commit, but that's still an ABI-incompatible change.
(cherry picked from commit 194ba38728b34a76885275dae153057c8afaf72e)
---
miext/sync/misyncstr.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/miext/sync/misyncstr.h b/miext/sync/misyncstr.h
index 2a6e84a96..ea48a4519 100644
--- a/miext/sync/misyncstr.h
+++ b/miext/sync/misyncstr.h
@@ -43,8 +43,8 @@ struct _SyncObject {
struct _SyncTriggerList *pTriglist; /* list of triggers */
XID id; /* resource ID */
unsigned char type; /* SYNC_* */
- Bool initialized; /* FALSE if created but not initialized */
Bool beingDestroyed; /* in process of going away */
+ Bool initialized; /* FALSE if created but not initialized */
};
typedef struct _SyncCounter {
--
2.21.0

View file

@ -1,40 +0,0 @@
From 045add84927051a33569ed701097e1fd514bf0ca Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Fri, 16 Aug 2019 14:56:19 -0400
Subject: [PATCH xserver 12/15] glx: Fix previous context validation in
xorgGlxMakeCurrent
vnd has already verified that the context tag is valid before this gets
called, and we only set the context tag private data to non-null for
indirect clients. Mesa happens to be buggy and doesn't send MakeCurrent
requests nearly as much as it should for direct contexts, but if you fix
that, then unbinding a direct context would fail here with
GLXBadContextTag.
Sadly Mesa will still need to carry a workaround here for broken
servers, but we should still fix the server.
(cherry picked from commit 95dcc81cb122e5a4c5b38e84ef46eb872b2e1431)
---
glx/glxcmds.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 54d452e58..75e42823c 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -574,10 +574,8 @@ xorgGlxMakeCurrent(ClientPtr client, GLXContextTag tag, XID drawId, XID readId,
/* Look up old context. If we have one, it must be in a usable state. */
if (tag != 0) {
prevglxc = glxServer.getContextTagPrivate(client, tag);
- if (!prevglxc)
- return __glXError(GLXBadContextTag);
- if (prevglxc->renderMode != GL_RENDER) {
+ if (prevglxc && prevglxc->renderMode != GL_RENDER) {
/* Oops. Not in render mode render. */
client->errorValue = prevglxc->id;
return __glXError(GLXBadContextState);
--
2.21.0

View file

@ -1,173 +0,0 @@
From e0af09061f9e8397ca564ec3bbedea51974455d4 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Mon, 7 Jan 2019 15:20:05 +0100
Subject: [PATCH xserver 13/15] xwayland: Separate DamagePtr into separate
window data
This will be dissociated in future commits to handle the cases
where windows are being realized before there is a compositor
handling redirection.
In that case, we still want the DamagePtr to be registered upfront
on RealizeWindowProc before a corresponding xwl_window might be
created. Most notably, it cannot be lazily created on
SetWindowPixmapProc as damage accounting gets broken.
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
(cherry picked from commit 4e50440ae20c537d6a4edf356cda67dd33d4e5a8)
---
hw/xwayland/xwayland.c | 74 +++++++++++++++++++++++++++++++++---------
hw/xwayland/xwayland.h | 1 -
2 files changed, 58 insertions(+), 17 deletions(-)
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 7e6e0ab25..1efebd061 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -125,6 +125,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
static DevPrivateKeyRec xwl_window_private_key;
static DevPrivateKeyRec xwl_screen_private_key;
static DevPrivateKeyRec xwl_pixmap_private_key;
+static DevPrivateKeyRec xwl_damage_private_key;
static struct xwl_window *
xwl_window_get(WindowPtr window)
@@ -367,8 +368,14 @@ xwl_cursor_confined_to(DeviceIntPtr device,
static void
damage_report(DamagePtr pDamage, RegionPtr pRegion, void *data)
{
- struct xwl_window *xwl_window = data;
- struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
+ WindowPtr window = data;
+ struct xwl_window *xwl_window = xwl_window_get(window);
+ struct xwl_screen *xwl_screen;
+
+ if (!xwl_window)
+ return;
+
+ xwl_screen = xwl_window->xwl_screen;
#ifdef GLAMOR_HAS_GBM
if (xwl_window->present_flipped) {
@@ -390,6 +397,47 @@ damage_destroy(DamagePtr pDamage, void *data)
{
}
+static Bool
+register_damage(WindowPtr window)
+{
+ DamagePtr damage;
+
+ damage = DamageCreate(damage_report, damage_destroy, DamageReportNonEmpty,
+ FALSE, window->drawable.pScreen, window);
+ if (damage == NULL) {
+ ErrorF("Failed creating damage\n");
+ return FALSE;
+ }
+
+ DamageRegister(&window->drawable, damage);
+ DamageSetReportAfterOp(damage, TRUE);
+
+ dixSetPrivate(&window->devPrivates, &xwl_damage_private_key, damage);
+
+ return TRUE;
+}
+
+static void
+unregister_damage(WindowPtr window)
+{
+ DamagePtr damage;
+
+ damage = dixLookupPrivate(&window->devPrivates, &xwl_damage_private_key);
+ if (!damage)
+ return;
+
+ DamageUnregister(damage);
+ DamageDestroy(damage);
+
+ dixSetPrivate(&window->devPrivates, &xwl_damage_private_key, NULL);
+}
+
+static DamagePtr
+window_get_damage(WindowPtr window)
+{
+ return dixLookupPrivate(&window->devPrivates, &xwl_damage_private_key);
+}
+
static void
shell_surface_ping(void *data,
struct wl_shell_surface *shell_surface, uint32_t serial)
@@ -545,18 +593,10 @@ xwl_realize_window(WindowPtr window)
wl_surface_set_user_data(xwl_window->surface, xwl_window);
- xwl_window->damage =
- DamageCreate(damage_report, damage_destroy, DamageReportNonEmpty,
- FALSE, screen, xwl_window);
- if (xwl_window->damage == NULL) {
- ErrorF("Failed creating damage\n");
- goto err_surf;
- }
-
compRedirectWindow(serverClient, window, CompositeRedirectManual);
- DamageRegister(&window->drawable, xwl_window->damage);
- DamageSetReportAfterOp(xwl_window->damage, TRUE);
+ if (!register_damage(window))
+ goto err_surf;
dixSetPrivate(&window->devPrivates, &xwl_window_private_key, xwl_window);
xorg_list_init(&xwl_window->link_damage);
@@ -620,8 +660,8 @@ xwl_unrealize_window(WindowPtr window)
wl_surface_destroy(xwl_window->surface);
xorg_list_del(&xwl_window->link_damage);
- DamageUnregister(xwl_window->damage);
- DamageDestroy(xwl_window->damage);
+ unregister_damage(window);
+
if (xwl_window->frame_callback)
wl_callback_destroy(xwl_window->frame_callback);
@@ -689,7 +729,7 @@ xwl_window_post_damage(struct xwl_window *xwl_window)
assert(!xwl_window->frame_callback);
- region = DamageRegion(xwl_window->damage);
+ region = DamageRegion(window_get_damage(xwl_window->window));
pixmap = (*xwl_screen->screen->GetWindowPixmap) (xwl_window->window);
#ifdef XWL_HAS_GLAMOR
@@ -726,7 +766,7 @@ xwl_window_post_damage(struct xwl_window *xwl_window)
wl_callback_add_listener(xwl_window->frame_callback, &frame_listener, xwl_window);
wl_surface_commit(xwl_window->surface);
- DamageEmpty(xwl_window->damage);
+ DamageEmpty(window_get_damage(xwl_window->window));
xorg_list_del(&xwl_window->link_damage);
}
@@ -962,6 +1002,8 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
return FALSE;
if (!dixRegisterPrivateKey(&xwl_pixmap_private_key, PRIVATE_PIXMAP, 0))
return FALSE;
+ if (!dixRegisterPrivateKey(&xwl_damage_private_key, PRIVATE_WINDOW, 0))
+ return FALSE;
dixSetPrivate(&pScreen->devPrivates, &xwl_screen_private_key, xwl_screen);
xwl_screen->screen = pScreen;
diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h
index 463622669..dfa3b37c3 100644
--- a/hw/xwayland/xwayland.h
+++ b/hw/xwayland/xwayland.h
@@ -178,7 +178,6 @@ struct xwl_window {
struct wl_surface *surface;
struct wl_shell_surface *shell_surface;
WindowPtr window;
- DamagePtr damage;
struct xorg_list link_damage;
struct wl_callback *frame_callback;
Bool allow_commits;
--
2.21.0

View file

@ -1,125 +0,0 @@
From 12db645c7fc0539752a881df7ac2bcd09e3cb17b Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Mon, 7 Jan 2019 15:33:31 +0100
Subject: [PATCH xserver 14/15] xwayland: Refactor surface creation into a
separate function
This is just called from xwl_window_realize() ATM, but will be useful in
future commits.
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
(cherry picked from commit c2e8ae964052944312c5023ca7ea5c41a92990e5)
---
hw/xwayland/xwayland.c | 64 ++++++++++++++++++++++++++++--------------
1 file changed, 43 insertions(+), 21 deletions(-)
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 1efebd061..9a4b52fa9 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -518,36 +518,25 @@ send_surface_id_event(struct xwl_window *xwl_window)
}
static Bool
-xwl_realize_window(WindowPtr window)
+ensure_surface_for_window(WindowPtr window)
{
ScreenPtr screen = window->drawable.pScreen;
struct xwl_screen *xwl_screen;
struct xwl_window *xwl_window;
struct wl_region *region;
- Bool ret;
-
- xwl_screen = xwl_screen_get(screen);
-
- screen->RealizeWindow = xwl_screen->RealizeWindow;
- ret = (*screen->RealizeWindow) (window);
- xwl_screen->RealizeWindow = screen->RealizeWindow;
- screen->RealizeWindow = xwl_realize_window;
- if (xwl_screen->rootless && !window->parent) {
- BoxRec box = { 0, 0, xwl_screen->width, xwl_screen->height };
+ if (xwl_window_get(window))
+ return TRUE;
- RegionReset(&window->winSize, &box);
- RegionNull(&window->clipList);
- RegionNull(&window->borderClip);
- }
+ xwl_screen = xwl_screen_get(screen);
if (xwl_screen->rootless) {
if (window->redirectDraw != RedirectDrawManual)
- return ret;
+ return TRUE;
}
else {
if (window->parent)
- return ret;
+ return TRUE;
}
xwl_window = calloc(1, sizeof *xwl_window);
@@ -595,15 +584,12 @@ xwl_realize_window(WindowPtr window)
compRedirectWindow(serverClient, window, CompositeRedirectManual);
- if (!register_damage(window))
- goto err_surf;
-
dixSetPrivate(&window->devPrivates, &xwl_window_private_key, xwl_window);
xorg_list_init(&xwl_window->link_damage);
xwl_window_init_allow_commits(xwl_window);
- return ret;
+ return TRUE;
err_surf:
if (xwl_window->shell_surface)
@@ -614,6 +600,42 @@ err:
return FALSE;
}
+static Bool
+xwl_realize_window(WindowPtr window)
+{
+ ScreenPtr screen = window->drawable.pScreen;
+ struct xwl_screen *xwl_screen;
+ Bool ret;
+
+ xwl_screen = xwl_screen_get(screen);
+
+ screen->RealizeWindow = xwl_screen->RealizeWindow;
+ ret = (*screen->RealizeWindow) (window);
+ xwl_screen->RealizeWindow = screen->RealizeWindow;
+ screen->RealizeWindow = xwl_realize_window;
+
+ if (!ret)
+ return FALSE;
+
+ if (xwl_screen->rootless && !window->parent) {
+ BoxRec box = { 0, 0, xwl_screen->width, xwl_screen->height };
+
+ RegionReset(&window->winSize, &box);
+ RegionNull(&window->clipList);
+ RegionNull(&window->borderClip);
+ }
+
+ if (xwl_screen->rootless ?
+ (window->drawable.class == InputOutput &&
+ window->parent == window->drawable.pScreen->root) :
+ !window->parent) {
+ if (!register_damage(window))
+ return FALSE;
+ }
+
+ return ensure_surface_for_window(window);
+}
+
static Bool
xwl_unrealize_window(WindowPtr window)
{
--
2.21.0

View file

@ -1,91 +0,0 @@
From 63346c74393e1df4555f84367529802a67578ef6 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Mon, 7 Jan 2019 15:33:35 +0100
Subject: [PATCH xserver 15/15] xwayland: Handle the case of windows being
realized before redirection
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
If Xwayland gets to realize a window meant for composition before the
compositor redirected windows (i.e. redirect mode is not RedirectDrawManual
yet), the window would stay "invisible" as we wouldn't create a
wl_surface/wl_shell_surface for it at any later point.
This scenario may happen if the wayland compositor sets up a X11 socket
upfront, but waits to raise Xwayland until there are X11 clients. In this
case the first data on the socket is the client's, the compositor can hardly
beat that in order to redirect subwindows before the client realizes a
Window.
In order to jump across this hurdle, allow the late creation of a matching
(shell) surface for the WindowPtr on SetWindowPixmapProc, so it is ensured
to be created after the compositor set up redirection.
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit 78cc8b6f9613fc71f6ecc7e8848d54364a250634)
---
hw/xwayland/xwayland.c | 25 +++++++++++++++++++++++++
hw/xwayland/xwayland.h | 1 +
2 files changed, 26 insertions(+)
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 9a4b52fa9..baa08d87b 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -699,6 +699,26 @@ xwl_save_screen(ScreenPtr pScreen, int on)
return TRUE;
}
+static void
+xwl_set_window_pixmap(WindowPtr window,
+ PixmapPtr pixmap)
+{
+ ScreenPtr screen = window->drawable.pScreen;
+ struct xwl_screen *xwl_screen;
+
+ xwl_screen = xwl_screen_get(screen);
+
+ screen->SetWindowPixmap = xwl_screen->SetWindowPixmap;
+ (*screen->SetWindowPixmap) (window, pixmap);
+ xwl_screen->SetWindowPixmap = screen->SetWindowPixmap;
+ screen->SetWindowPixmap = xwl_set_window_pixmap;
+
+ if (!RegionNotEmpty(&window->winSize))
+ return;
+
+ ensure_surface_for_window(window);
+}
+
static void
frame_callback(void *data,
struct wl_callback *callback,
@@ -1185,6 +1205,11 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
xwl_screen->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = xwl_close_screen;
+ if (xwl_screen->rootless) {
+ xwl_screen->SetWindowPixmap = pScreen->SetWindowPixmap;
+ pScreen->SetWindowPixmap = xwl_set_window_pixmap;
+ }
+
pScreen->CursorWarpedTo = xwl_cursor_warped_to;
pScreen->CursorConfinedTo = xwl_cursor_confined_to;
diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h
index dfa3b37c3..0854df456 100644
--- a/hw/xwayland/xwayland.h
+++ b/hw/xwayland/xwayland.h
@@ -133,6 +133,7 @@ struct xwl_screen {
UnrealizeWindowProcPtr UnrealizeWindow;
DestroyWindowProcPtr DestroyWindow;
XYToWindowProcPtr XYToWindow;
+ SetWindowPixmapProcPtr SetWindowPixmap;
struct xorg_list output_list;
struct xorg_list seat_list;
--
2.21.0

View file

@ -1,38 +0,0 @@
# Collection of quirks and blacklist/whitelists for specific devices.
# Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable
# http://bugs.freedesktop.org/show_bug.cgi?id=22442
Section "InputClass"
Identifier "ThinkPad HDAPS accelerometer blacklist"
MatchProduct "ThinkPad HDAPS accelerometer data"
Option "Ignore" "on"
EndSection
# https://bugzilla.redhat.com/show_bug.cgi?id=523914
# Mouse does not move in PV Xen guest
# Explicitly tell evdev to not ignore the absolute axes.
Section "InputClass"
Identifier "Xen Virtual Pointer axis blacklist"
MatchProduct "Xen Virtual Pointer"
Option "IgnoreAbsoluteAxes" "off"
Option "IgnoreRelativeAxes" "off"
EndSection
# https://bugs.freedesktop.org/show_bug.cgi?id=55867
# Bug 55867 - Doesn't know how to tag XI_TRACKBALL
Section "InputClass"
Identifier "Tag trackballs as XI_TRACKBALL"
MatchProduct "trackball"
MatchDriver "evdev"
Option "TypeName" "TRACKBALL"
EndSection
# https://bugs.freedesktop.org/show_bug.cgi?id=62831
# Bug 62831 - Mionix Naos 5000 mouse detected incorrectly
Section "InputClass"
Identifier "Tag Mionix Naos 5000 mouse XI_MOUSE"
MatchProduct "La-VIEW Technology Naos 5000 Mouse"
MatchDriver "evdev"
Option "TypeName" "MOUSE"
EndSection

View file

@ -1,30 +0,0 @@
# Makefile for source rpm: xorg-x11-server
# $Id$
NAME := xorg-x11-server
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)
ifeq ($(MAKECMDGOALS),me a sandwich)
.PHONY :: me a sandwich
me a:
@:
sandwich:
@[ `id -u` -ne 0 ] && echo "What? Make it yourself." || echo Okay.
endif

View file

@ -1 +0,0 @@
d13cb974426f7f1110b0bdb08c4ebb46ff8975f7

306
gitignore
View file

@ -1,306 +0,0 @@
Makefile
Makefile.in
.deps
.libs
.msg
*.lo
*.la
*.a
*.o
*~
.*sw?
*.pbxuser
*.mode1v3
obj*
build*
local
aclocal.m4
autom4te.cache
compile
config.guess
config.log
config.status
config.sub
configure
configure.lineno
depcomp
install-sh
libtool
ltmain.sh
missing
TAGS
tags
ylwrap
xorg-server.pc
stamp-h?
do-not-use-config.h
do-not-use-config.h.in
afb/afbbltC.c
afb/afbbltCI.c
afb/afbbltG.c
afb/afbbltO.c
afb/afbbltX.c
afb/afbseg.c
afb/afbtileC.c
afb/afbtileG.c
cfb/cfb8lineCO.c
cfb/cfb8lineCP.c
cfb/cfb8lineG.c
cfb/cfb8lineX.c
cfb/cfb8segC.c
cfb/cfb8segCS.c
cfb/cfb8segX.c
cfb/cfb8setG.c
cfb/cfbbltC.c
cfb/cfbbltG.c
cfb/cfbbltO.c
cfb/cfbbltX.c
cfb/cfbfillarcC.c
cfb/cfbfillarcG.c
cfb/cfbglrop8.c
cfb/cfbply1rctC.c
cfb/cfbply1rctG.c
cfb/cfbseg.c
cfb/cfbsolidC.c
cfb/cfbsolidG.c
cfb/cfbsolidX.c
cfb/cfbtile32C.c
cfb/cfbtile32G.c
cfb/cfbtileoddC.c
cfb/cfbtileoddG.c
cfb/cfbzerarcC.c
cfb/cfbzerarcG.c
cfb/cfbzerarcX.c
cfb32/cfb8lineCO.c
cfb32/cfb8lineCP.c
cfb32/cfb8lineG.c
cfb32/cfb8lineX.c
cfb32/cfb8segC.c
cfb32/cfb8segCS.c
cfb32/cfb8segX.c
cfb32/cfb8setG.c
cfb32/cfbbltC.c
cfb32/cfbbltG.c
cfb32/cfbbltO.c
cfb32/cfbbltX.c
cfb32/cfbfillarcC.c
cfb32/cfbfillarcG.c
cfb32/cfbply1rctC.c
cfb32/cfbply1rctG.c
cfb32/cfbseg.c
cfb32/cfbsolidC.c
cfb32/cfbsolidG.c
cfb32/cfbsolidX.c
cfb32/cfbtile32C.c
cfb32/cfbtile32G.c
cfb32/cfbtileoddC.c
cfb32/cfbtileoddG.c
cfb32/cfbzerarcC.c
cfb32/cfbzerarcG.c
cfb32/cfbzerarcX.c
doc/Xserver.1x
doc/Xserver.man
hw/dmx/Xdmx
hw/dmx/Xdmx.1x
hw/dmx/config/dmxtodmx
hw/dmx/config/dmxtodmx.1x
hw/dmx/config/parser.c
hw/dmx/config/parser.h
hw/dmx/config/scanner.c
hw/dmx/config/vdltodmx
hw/dmx/config/vdltodmx.1x
hw/dmx/config/xdmxconfig
hw/dmx/config/xdmxconfig.1x
hw/dmx/examples/dmxaddinput
hw/dmx/examples/dmxaddscreen
hw/dmx/examples/dmxreconfig
hw/dmx/examples/dmxresize
hw/dmx/examples/dmxrminput
hw/dmx/examples/dmxrmscreen
hw/dmx/examples/dmxwininfo
hw/dmx/examples/ev
hw/dmx/examples/evi
hw/dmx/examples/res
hw/dmx/examples/xbell
hw/dmx/examples/xdmx
hw/dmx/examples/xinput
hw/dmx/examples/xled
hw/dmx/examples/xtest
hw/kdrive/ati/Xati
hw/kdrive/chips/Xchips
hw/kdrive/ephyr/Xephyr
hw/kdrive/epson/Xepson
hw/kdrive/fake/Xfake
hw/kdrive/fbdev/Xfbdev
hw/kdrive/i810/Xi810
hw/kdrive/mach64/Xmach64
hw/kdrive/mga/Xmga
hw/kdrive/neomagic/Xneomagic
hw/kdrive/nvidia/Xnvidia
hw/kdrive/pm2/Xpm2
hw/kdrive/r128/Xr128
hw/kdrive/sdl/Xsdl
hw/kdrive/sis300/Xsis
hw/kdrive/smi/Xsmi
hw/kdrive/vesa/Xvesa
hw/kdrive/via/Xvia
hw/vfb/Xvfb
hw/vfb/Xvfb.1x
hw/vfb/Xvfb.man
hw/xfree86/Xorg
hw/xfree86/common/xf86Build.h
hw/xfree86/common/xf86DefModeSet.c
hw/xfree86/doc/man/Xorg.1x
hw/xfree86/doc/man/Xorg.man
hw/xfree86/doc/man/xorg.conf.5x
hw/xfree86/doc/man/xorg.conf.man
hw/xfree86/exa/exa.4
hw/xfree86/exa/exa.4x
hw/xfree86/exa/exa.man
hw/xfree86/fbdevhw/fbdevhw.4x
hw/xfree86/fbdevhw/fbdevhw.man
hw/xfree86/getconfig/cfg.man
hw/xfree86/getconfig/getconfig.1x
hw/xfree86/getconfig/getconfig.5x
hw/xfree86/getconfig/getconfig.man
hw/xfree86/os-support/xorgos.c
hw/xfree86/osandcommon.c
hw/xfree86/ramdac/xf86BitOrder.c
hw/xfree86/scanpci/xf86PciData.c
hw/xfree86/scanpci/xf86PciIds.h
hw/xfree86/utils/cvt/cvt
hw/xfree86/utils/cvt/cvt.man
hw/xfree86/utils/gtf/gtf
hw/xfree86/utils/gtf/gtf.1x
hw/xfree86/utils/gtf/gtf.man
hw/xfree86/utils/ioport/inb
hw/xfree86/utils/ioport/inl
hw/xfree86/utils/ioport/inw
hw/xfree86/utils/ioport/ioport
hw/xfree86/utils/ioport/outb
hw/xfree86/utils/ioport/outl
hw/xfree86/utils/ioport/outw
hw/xfree86/utils/pcitweak/pcitweak
hw/xfree86/utils/pcitweak/pcitweak.1x
hw/xfree86/utils/pcitweak/pcitweak.man
hw/xfree86/utils/scanpci/scanpci
hw/xfree86/utils/scanpci/scanpci.1x
hw/xfree86/utils/scanpci/scanpci.man
hw/xfree86/utils/xorgcfg/XOrgCfg
hw/xfree86/utils/xorgcfg/xorgcfg
hw/xfree86/utils/xorgcfg/xorgcfg.1x
hw/xfree86/utils/xorgcfg/xorgcfg.man
hw/xfree86/utils/xorgconfig/xorgconfig
hw/xfree86/utils/xorgconfig/xorgconfig.1x
hw/xfree86/utils/xorgconfig/xorgconfig.man
hw/xfree86/xaa/l-xaaBitmap.c
hw/xfree86/xaa/l-xaaStipple.c
hw/xfree86/xaa/l-xaaTEGlyph.c
hw/xfree86/xaa/l3-xaaBitmap.c
hw/xfree86/xaa/l3-xaaStipple.c
hw/xfree86/xaa/lf-xaaBitmap.c
hw/xfree86/xaa/lf-xaaStipple.c
hw/xfree86/xaa/lf-xaaTEGlyph.c
hw/xfree86/xaa/lf3-xaaBitmap.c
hw/xfree86/xaa/lf3-xaaStipple.c
hw/xfree86/xaa/m-xaaBitmap.c
hw/xfree86/xaa/m-xaaStipple.c
hw/xfree86/xaa/m-xaaTEGlyph.c
hw/xfree86/xaa/m3-xaaBitmap.c
hw/xfree86/xaa/m3-xaaStipple.c
hw/xfree86/xaa/mf-xaaBitmap.c
hw/xfree86/xaa/mf-xaaStipple.c
hw/xfree86/xaa/mf-xaaTEGlyph.c
hw/xfree86/xaa/mf3-xaaBitmap.c
hw/xfree86/xaa/mf3-xaaStipple.c
hw/xfree86/xaa/s-xaaDashLine.c
hw/xfree86/xaa/s-xaaLine.c
hw/xfree86/xf1bpp/maskbits.c
hw/xfree86/xf1bpp/mfbbitblt.c
hw/xfree86/xf1bpp/mfbbltC.c
hw/xfree86/xf1bpp/mfbbltCI.c
hw/xfree86/xf1bpp/mfbbltG.c
hw/xfree86/xf1bpp/mfbbltO.c
hw/xfree86/xf1bpp/mfbbltX.c
hw/xfree86/xf1bpp/mfbbres.c
hw/xfree86/xf1bpp/mfbbresd.c
hw/xfree86/xf1bpp/mfbclip.c
hw/xfree86/xf1bpp/mfbcmap.c
hw/xfree86/xf1bpp/mfbfillarc.c
hw/xfree86/xf1bpp/mfbfillrct.c
hw/xfree86/xf1bpp/mfbfillsp.c
hw/xfree86/xf1bpp/mfbfont.c
hw/xfree86/xf1bpp/mfbgc.c
hw/xfree86/xf1bpp/mfbgetsp.c
hw/xfree86/xf1bpp/mfbigbblak.c
hw/xfree86/xf1bpp/mfbigbwht.c
hw/xfree86/xf1bpp/mfbhrzvert.c
hw/xfree86/xf1bpp/mfbimage.c
hw/xfree86/xf1bpp/mfbline.c
hw/xfree86/xf1bpp/mfbmisc.c
hw/xfree86/xf1bpp/mfbpablack.c
hw/xfree86/xf1bpp/mfbpainv.c
hw/xfree86/xf1bpp/mfbpawhite.c
hw/xfree86/xf1bpp/mfbpgbblak.c
hw/xfree86/xf1bpp/mfbpgbinv.c
hw/xfree86/xf1bpp/mfbpgbwht.c
hw/xfree86/xf1bpp/mfbpixmap.c
hw/xfree86/xf1bpp/mfbplyblack.c
hw/xfree86/xf1bpp/mfbplyinv.c
hw/xfree86/xf1bpp/mfbplywhite.c
hw/xfree86/xf1bpp/mfbpntwin.c
hw/xfree86/xf1bpp/mfbpolypnt.c
hw/xfree86/xf1bpp/mfbpushpxl.c
hw/xfree86/xf1bpp/mfbscrclse.c
hw/xfree86/xf1bpp/mfbscrinit.c
hw/xfree86/xf1bpp/mfbseg.c
hw/xfree86/xf1bpp/mfbsetsp.c
hw/xfree86/xf1bpp/mfbteblack.c
hw/xfree86/xf1bpp/mfbtewhite.c
hw/xfree86/xf1bpp/mfbtileC.c
hw/xfree86/xf1bpp/mfbtileG.c
hw/xfree86/xf1bpp/mfbwindow.c
hw/xfree86/xf1bpp/mfbzerarc.c
hw/xfree86/xf4bpp/mfbseg.c
hw/xfree86/xf8_32bpp/cfbgc32.c
hw/xfree86/xf8_32bpp/cfbgc8.c
hw/xfree86/xorg.c
hw/xfree86/xorg.conf.example
hw/xfree86/xorg.conf.example.pre
hw/xnest/Xnest
hw/xnest/Xnest.1x
hw/xnest/Xnest.man
hw/xprint/Xprt
hw/xprint/config/C/print/Xprinters.ghostscript
hw/xprint/doc/Xprt.1x
hw/xprint/doc/Xprt.man
hw/xprint/dpmsstubs-wrapper.c
hw/xprint/miinitext-wrapper.c
include/dix-config.h
include/kdrive-config.h
include/xgl-config.h
include/xkb-config.h
include/xorg-config.h
include/xorg-server.h
include/xwin-config.h
mfb/mfbbltC.c
mfb/mfbbltCI.c
mfb/mfbbltG.c
mfb/mfbbltO.c
mfb/mfbbltX.c
mfb/mfbigbblak.c
mfb/mfbigbwht.c
mfb/mfbpablack.c
mfb/mfbpainv.c
mfb/mfbpawhite.c
mfb/mfbpgbblak.c
mfb/mfbpgbinv.c
mfb/mfbpgbwht.c
mfb/mfbplyblack.c
mfb/mfbplyinv.c
mfb/mfbplywhite.c
mfb/mfbseg.c
mfb/mfbteblack.c
mfb/mfbtewhite.c
mfb/mfbtileC.c
mfb/mfbtileG.c

View file

@ -1,6 +0,0 @@
xorg-x11-server-1_5_0-1_fc10:HEAD:xorg-x11-server-1.5.0-1.fc10.src.rpm:1220485219
xorg-x11-server-1_5_1-1_fc10:HEAD:xorg-x11-server-1.5.1-1.fc10.src.rpm:1222198557
xorg-x11-server-1_5_2-1_fc10:HEAD:xorg-x11-server-1.5.2-1.fc10.src.rpm:1223667007
xorg-x11-server-1_5_3-1_fc10:HEAD:xorg-x11-server-1.5.3-1.fc10.src.rpm:1225918317
xorg-x11-server-1_6_0-1_fc11:HEAD:xorg-x11-server-1.6.0-1.fc11.src.rpm:1235594175
xorg-x11-server-1_6_1-1_fc11:HEAD:xorg-x11-server-1.6.1-1.fc11.src.rpm:1239742477

View file

@ -1,17 +0,0 @@
#!/bin/sh
DIRNAME=xorg-server-$( date +%Y%m%d )
rm -rf $DIRNAME
git clone git://git.freedesktop.org/git/xorg/xserver $DIRNAME
cd $DIRNAME
if [ -z "$1" ]; then
git log | head -1
else
git checkout $1
fi
git log | head -1 | awk '{ print $2 }' > ../commitid
git repack -a -d
cd ..
tar cf - $DIRNAME | xz -c9 > $DIRNAME.tar.xz
rm -rf $DIRNAME

View file

@ -1 +1 @@
SHA512 (xorg-server-1.20.5.tar.bz2) = 625f0626b122cf95600abe382c3217348999357a0e2d2443092f1b67cff1c98d7ef09303884ceaeac181e0555dc56b0d4d44bda45cc464dac2d9a50c5b32d631
SHA512 (xorg-server-21.1.21.tar.xz) = bb2eb4e6756eb9e38b61bd47c017da44bcf5f45f2b7a906b4bb3a56b3d791cec64abb9bf37b224efe1e4fab9cc296f3672c9b2f8e00e1cdfc54337bef63cd16c

File diff suppressed because it is too large Load diff

View file

@ -1,54 +0,0 @@
From patchwork Wed May 23 09:43:32 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [xserver,
1/2] glamor: Always return 0 from glamor_fds_from_pixmap on error
From: =?utf-8?q?Michel_D=C3=A4nzer?= <michel@daenzer.net>
X-Patchwork-Id: 224909
Message-Id: <20180523094333.11076-1-michel@daenzer.net>
To: =?UTF-8?q?Louis-Francis=20Ratt=C3=A9-Boulianne?= <lfrb@collabora.com>,
Daniel Stone <daniels@collabora.com>
Cc: xorg-devel@lists.x.org
Date: Wed, 23 May 2018 11:43:32 +0200
From: Michel Dänzer <michel.daenzer@amd.com>
This matches what glamor_egl_fds_from_pixmap and dri3_fds_from_pixmap do
and what proc_dri3_buffers_from_pixmap expects.
Fixes: c8c276c9569b "glamor: Implement PixmapFromBuffers and
BuffersFromPixmap"
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
glamor/glamor.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/glamor/glamor.c b/glamor/glamor.c
index d984d20f3..e2c74d17a 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -836,20 +836,20 @@ glamor_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds,
glamor_get_screen_private(pixmap->drawable.pScreen);
if (!glamor_priv->dri3_enabled)
- return -1;
+ return 0;
switch (pixmap_priv->type) {
case GLAMOR_TEXTURE_DRM:
case GLAMOR_TEXTURE_ONLY:
if (!glamor_pixmap_ensure_fbo(pixmap, pixmap->drawable.depth == 30 ?
GL_RGB10_A2 : GL_RGBA, 0))
- return -1;
+ return 0;
return glamor_egl_fds_from_pixmap(screen, pixmap, fds,
strides, offsets,
modifier);
default:
break;
}
- return -1;
+ return 0;
}
_X_EXPORT int

View file

@ -1,58 +0,0 @@
From patchwork Wed May 23 09:43:33 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [xserver, 2/2] glamor: Propagate glamor_fds_from_pixmap error in
glamor_fd_from_pixmap
From: =?utf-8?q?Michel_D=C3=A4nzer?= <michel@daenzer.net>
X-Patchwork-Id: 224910
Message-Id: <20180523094333.11076-2-michel@daenzer.net>
To: =?UTF-8?q?Louis-Francis=20Ratt=C3=A9-Boulianne?= <lfrb@collabora.com>,
Daniel Stone <daniels@collabora.com>
Cc: xorg-devel@lists.x.org
Date: Wed, 23 May 2018 11:43:33 +0200
From: Michel Dänzer <michel.daenzer@amd.com>
glamor_fds_from_pixmap returns 0 on error, but we were treating that as
success, continuing with uninitialized stride and fd values.
Also bail if the offset isn't 0, same as in dri3_fd_from_pixmap.
Fixes: c8c276c9569b "glamor: Implement PixmapFromBuffers and
BuffersFromPixmap"
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
---
glamor/glamor.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/glamor/glamor.c b/glamor/glamor.c
index e2c74d17a..63f0947fa 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -865,17 +865,15 @@ glamor_fd_from_pixmap(ScreenPtr screen,
&modifier);
/* Pixmaps with multi-planes/modifier are not supported in this interface */
- if (ret > 1) {
- while (ret > 0)
- close(fds[--ret]);
- return -1;
+ if (ret == 1 && offsets[0] == 0) {
+ *stride = strides[0];
+ *size = pixmap->drawable.height * *stride;
+ return fds[0];
}
- ret = fds[0];
- *stride = strides[0];
- *size = pixmap->drawable.height * *stride;
-
- return ret;
+ while (ret > 0)
+ close(fds[--ret]);
+ return -1;
}
_X_EXPORT int

View file

@ -1,14 +0,0 @@
#!/bin/sh
#
# The X server provides capabilities of the form:
#
# Provides: xserver-abi(ansic-0) = 4
#
# for an ABI version of 0.4. The major number is encoded into the name so
# that major number changes force upgrades. If we didn't, then
#
# Requires: xserver-abi(ansic) >= 0.4
#
# would also match 1.0, which is wrong since major numbers mean an ABI break.
echo "xserver-abi($1-@MAJOR@) >= @MINOR@"

View file

@ -1,19 +0,0 @@
#!/bin/sh
#
# The X server provides capabilities of the form:
#
# Provides: xserver-abi(ansic-0) = 4
#
# for an ABI version of 0.4. The major number is encoded into the name so
# that major number changes force upgrades. If we didn't, then
#
# Requires: xserver-abi(ansic) >= 0.4
#
# would also match 1.0, which is wrong since major numbers mean an ABI break.
ver=$(pkg-config --variable abi_$1 xorg-server)
major=$(echo $ver | cut -f 1 -d .)
minor=$(echo $ver | cut -f 2 -d .)
echo "xserver-abi($1-$major) >= $minor"

View file

@ -1,5 +1,4 @@
#%PAM-1.0
auth sufficient pam_rootok.so
auth required pam_console.so
account required pam_permit.so
session optional pam_keyinit.so force revoke

View file

@ -101,7 +101,7 @@ find_free_servernum() {
# Parse the command line.
ARGS=$(getopt --options +ade:f:hn:lp:s:w: \
--long auto-servernum,error-file:auth-file:,help,server-num:,listen-tcp,xauth-protocol:,server-args:,wait: \
--long auto-servernum,error-file:,auth-file:,help,server-num:,listen-tcp,xauth-protocol:,server-args:,wait: \
--name "$PROGNAME" -- "$@")
GETOPT_STATUS=$?
@ -120,7 +120,7 @@ while :; do
-f|--auth-file) AUTHFILE="$2"; shift ;;
-h|--help) SHOWHELP="yes" ;;
-n|--server-num) SERVERNUM="$2"; shift ;;
-l|--listen-tcp) LISTENTCP="" ;;
-l|--listen-tcp) LISTENTCP="-listen tcp" ;;
-p|--xauth-protocol) XAUTHPROTO="$2"; shift ;;
-s|--server-args) XVFBARGS="$2"; shift ;;
-w|--wait) STARTWAIT="$2"; shift ;;