xserver 1.20.6
This commit is contained in:
parent
76e2fe61fd
commit
622718ea83
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
|||||||
From e6ef2b12404dfec7f23592a3524d2a63d9d25802 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Marvin Schmidt <marv@exherbo.org>
|
|
||||||
Date: Tue, 24 Sep 2019 09:58:43 +0200
|
|
||||||
Subject: [PATCH xserver] build: glx: Lower gl version to work with libglvnd
|
|
||||||
|
|
||||||
When using mesa with libglvnd support, mesa will no longer install the
|
|
||||||
gl, glx, egl pkg-config files but instead let libglvnd provide them.
|
|
||||||
libglvnd maintainers decided to change the versioning as it was
|
|
||||||
mesa-specific previously. Now the libraries have versions of the API
|
|
||||||
they expose[1].
|
|
||||||
This causes problems when building the X server:
|
|
||||||
|
|
||||||
checking for glproto >= 1.4.17 gl >= 9.2.0... no
|
|
||||||
configure: error: Package requirements (glproto >= 1.4.17 gl >= 9.2.0) were not met:
|
|
||||||
|
|
||||||
Requested 'gl >= 9.2.0' but version of gl is 1.2
|
|
||||||
|
|
||||||
Lower the version requirement to 1.2 to allow building against libglvnd
|
|
||||||
provided libraries
|
|
||||||
|
|
||||||
[1] https://github.com/NVIDIA/libglvnd/commit/0dfaea2bcb7cdcc785f95e244223bd004a2d7fba
|
|
||||||
---
|
|
||||||
configure.ac | 4 ++--
|
|
||||||
glx/meson.build | 2 +-
|
|
||||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index 03c2e367c..969090b94 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -760,7 +760,7 @@ LIBDRI="dri >= 7.8.0"
|
|
||||||
LIBDRM="libdrm >= 2.4.89"
|
|
||||||
LIBEGL="egl"
|
|
||||||
LIBGBM="gbm >= 10.2.0"
|
|
||||||
-LIBGL="gl >= 7.1.0"
|
|
||||||
+LIBGL="gl >= 1.2"
|
|
||||||
LIBXEXT="xext >= 1.0.99.4"
|
|
||||||
LIBXFONT="xfont2 >= 2.0.0"
|
|
||||||
LIBXI="xi >= 1.2.99.1"
|
|
||||||
@@ -1115,7 +1115,7 @@ case "$DRI2,$HAVE_DRI2PROTO" in
|
|
||||||
yes,yes | auto,yes)
|
|
||||||
AC_DEFINE(DRI2, 1, [Build DRI2 extension])
|
|
||||||
DRI2=yes
|
|
||||||
- LIBGL="gl >= 9.2.0"
|
|
||||||
+ LIBGL="gl >= 1.2"
|
|
||||||
SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI2PROTO"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
diff --git a/glx/meson.build b/glx/meson.build
|
|
||||||
index 7f9e549f0..745814336 100644
|
|
||||||
--- a/glx/meson.build
|
|
||||||
+++ b/glx/meson.build
|
|
||||||
@@ -39,7 +39,7 @@ if build_glx
|
|
||||||
common_dep,
|
|
||||||
dl_dep,
|
|
||||||
dependency('glproto', version: '>= 1.4.17'),
|
|
||||||
- dependency('gl', version: '>= 9.2.0'),
|
|
||||||
+ dependency('gl', version: '>= 1.2'),
|
|
||||||
],
|
|
||||||
c_args: [
|
|
||||||
glx_align64,
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -1,98 +0,0 @@
|
|||||||
From 4b10693a62c06234fae69c3f50dc9af541b6d804 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hans de Goede <hdegoede@redhat.com>
|
|
||||||
Date: Mon, 4 Nov 2019 20:03:17 +0100
|
|
||||||
Subject: [PATCH xserver] glamor/xwayland: Define EGL_NO_X11
|
|
||||||
|
|
||||||
Define EGL_NO_X11 everywhere were we also define MESA_EGL_NO_X11_HEADERS,
|
|
||||||
EGL_NO_X11 is the MESA_EGL_NO_X11_HEADERS equivalent for the egl headers
|
|
||||||
shipped with libglvnd.
|
|
||||||
|
|
||||||
This fixes the xserver not building with the libglvnd-1.2.0 headers:
|
|
||||||
|
|
||||||
In file included from /usr/include/EGL/eglplatform.h:128,
|
|
||||||
from /usr/include/epoxy/egl_generated.h:11,
|
|
||||||
from /usr/include/epoxy/egl.h:46,
|
|
||||||
from glamor_priv.h:43,
|
|
||||||
from glamor_composite_glyphs.c:25:
|
|
||||||
/usr/include/X11/Xlib.h:222:2: error: conflicting types for 'GC'
|
|
||||||
222 | *GC;
|
|
||||||
| ^~
|
|
||||||
In file included from glamor.h:34,
|
|
||||||
from glamor_priv.h:32,
|
|
||||||
from glamor_composite_glyphs.c:25:
|
|
||||||
../include/gcstruct.h:282:3: note: previous declaration of 'GC' was here
|
|
||||||
282 | } GC;
|
|
||||||
| ^~
|
|
||||||
|
|
||||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
||||||
---
|
|
||||||
glamor/glamor_egl.h | 1 +
|
|
||||||
glamor/glamor_priv.h | 1 +
|
|
||||||
hw/xwayland/xwayland-glamor-eglstream.c | 1 +
|
|
||||||
hw/xwayland/xwayland-glamor-gbm.c | 1 +
|
|
||||||
hw/xwayland/xwayland-glamor.c | 1 +
|
|
||||||
6 files changed, 6 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/glamor/glamor_egl.h b/glamor/glamor_egl.h
|
|
||||||
index 2f7566b24..8f6ed7840 100644
|
|
||||||
--- a/glamor/glamor_egl.h
|
|
||||||
+++ b/glamor/glamor_egl.h
|
|
||||||
@@ -28,6 +28,7 @@
|
|
||||||
#define GLAMOR_EGL_H
|
|
||||||
|
|
||||||
#define MESA_EGL_NO_X11_HEADERS
|
|
||||||
+#define EGL_NO_X11
|
|
||||||
#include <epoxy/gl.h>
|
|
||||||
#include <epoxy/egl.h>
|
|
||||||
#include <glamor_egl_ext.h>
|
|
||||||
diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
|
|
||||||
index 10c74c1b5..ea7a8bc96 100644
|
|
||||||
--- a/glamor/glamor_priv.h
|
|
||||||
+++ b/glamor/glamor_priv.h
|
|
||||||
@@ -40,6 +40,7 @@
|
|
||||||
#include <epoxy/gl.h>
|
|
||||||
#ifdef GLAMOR_HAS_GBM
|
|
||||||
#define MESA_EGL_NO_X11_HEADERS
|
|
||||||
+#define EGL_NO_X11
|
|
||||||
#include <epoxy/egl.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
diff --git a/hw/xwayland/xwayland-glamor-eglstream.c b/hw/xwayland/xwayland-glamor-eglstream.c
|
|
||||||
index c62c0d2ac..36b749aaf 100644
|
|
||||||
--- a/hw/xwayland/xwayland-glamor-eglstream.c
|
|
||||||
+++ b/hw/xwayland/xwayland-glamor-eglstream.c
|
|
||||||
@@ -33,6 +33,7 @@
|
|
||||||
#include "wayland-eglstream-controller-client-protocol.h"
|
|
||||||
|
|
||||||
#define MESA_EGL_NO_X11_HEADERS
|
|
||||||
+#define EGL_NO_X11
|
|
||||||
#include <glamor_egl.h>
|
|
||||||
#include <glamor.h>
|
|
||||||
#include <glamor_transform.h>
|
|
||||||
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
|
|
||||||
index 354695060..e3d35ce10 100644
|
|
||||||
--- a/hw/xwayland/xwayland-glamor-gbm.c
|
|
||||||
+++ b/hw/xwayland/xwayland-glamor-gbm.c
|
|
||||||
@@ -36,6 +36,7 @@
|
|
||||||
#include <drm_fourcc.h>
|
|
||||||
|
|
||||||
#define MESA_EGL_NO_X11_HEADERS
|
|
||||||
+#define EGL_NO_X11
|
|
||||||
#include <gbm.h>
|
|
||||||
#include <glamor_egl.h>
|
|
||||||
|
|
||||||
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
|
|
||||||
index dc07f7933..bf7f0ffb4 100644
|
|
||||||
--- a/hw/xwayland/xwayland-glamor.c
|
|
||||||
+++ b/hw/xwayland/xwayland-glamor.c
|
|
||||||
@@ -26,6 +26,7 @@
|
|
||||||
#include "xwayland.h"
|
|
||||||
|
|
||||||
#define MESA_EGL_NO_X11_HEADERS
|
|
||||||
+#define EGL_NO_X11
|
|
||||||
#include <glamor_egl.h>
|
|
||||||
|
|
||||||
#include <glamor.h>
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (xorg-server-1.20.5.tar.bz2) = 625f0626b122cf95600abe382c3217348999357a0e2d2443092f1b67cff1c98d7ef09303884ceaeac181e0555dc56b0d4d44bda45cc464dac2d9a50c5b32d631
|
SHA512 (xorg-server-1.20.6.tar.bz2) = 9aa0ba4aee92fe628f2b8c41e4fe0134dc86154bb8787f907884ef2fd970e18e68e72ea8a1beb706d11ecf155b2abc9731f1abadff251ed592f8cca3b1240dd6
|
||||||
|
@ -45,8 +45,8 @@
|
|||||||
|
|
||||||
Summary: X.Org X11 X server
|
Summary: X.Org X11 X server
|
||||||
Name: xorg-x11-server
|
Name: xorg-x11-server
|
||||||
Version: 1.20.5
|
Version: 1.20.6
|
||||||
Release: 9%{?gitdate:.%{gitdate}}%{?dist}
|
Release: 1%{?gitdate:.%{gitdate}}%{?dist}
|
||||||
URL: http://www.x.org
|
URL: http://www.x.org
|
||||||
License: MIT
|
License: MIT
|
||||||
|
|
||||||
@ -100,65 +100,32 @@ Patch6: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch
|
|||||||
#Patch23: 0003-modesetting-Factor-out-drmmode_target_output.patch
|
#Patch23: 0003-modesetting-Factor-out-drmmode_target_output.patch
|
||||||
#Patch24: 0004-modesetting-Use-atomic-instead-of-per-crtc-walks-whe.patch
|
#Patch24: 0004-modesetting-Use-atomic-instead-of-per-crtc-walks-whe.patch
|
||||||
|
|
||||||
|
# Backports from current stable "server-1.20-branch":
|
||||||
|
# ...
|
||||||
|
|
||||||
|
# Backports from "master" upstream:
|
||||||
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1697804
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1697804
|
||||||
Patch25: 0001-Xi-return-AlreadyGrabbed-for-key-grabs-255.patch
|
Patch500: 0001-Xi-return-AlreadyGrabbed-for-key-grabs-255.patch
|
||||||
|
|
||||||
# From current server-1.20-branch:
|
|
||||||
# https://bugzilla.redhat.com/1708119
|
|
||||||
Patch26: 0001-xwayland-Avoid-a-crash-on-pointer-enter-with-a-grab.patch
|
|
||||||
# https://bugzilla.redhat.com/1691745
|
|
||||||
Patch27: 0001-xwayland-Check-status-in-GBM-pixmap-creation.patch
|
|
||||||
# https://bugzilla.redhat.com/1645553
|
|
||||||
Patch28: 0001-glamor-Make-pixmap-exportable-from-gbm_bo_from_pixma.patch
|
|
||||||
Patch29: 0001-xwayland-Reset-scheduled-frames-after-hiding-tablet-.patch
|
|
||||||
|
|
||||||
# https://gitlab.freedesktop.org/xorg/xserver/issues/839
|
|
||||||
# https://bugzilla.redhat.com/1726419
|
|
||||||
Patch30: 0001-Revert-present-scmd-Check-that-the-flip-and-screen-p.patch
|
|
||||||
|
|
||||||
# Build failure with recent glibc
|
|
||||||
# https://gitlab.freedesktop.org/xorg/xserver/issues/840
|
|
||||||
Patch31: 0001-compiler.h-Do-not-include-sys-io.h-on-ARM-with-glibc.patch
|
|
||||||
|
|
||||||
Patch32: 0001-Xi-Use-current-device-active-grab-to-deliver-touch-e.patch
|
|
||||||
Patch33: 0002-dri2-Sync-i965_pci_ids.h-from-mesa.patch
|
|
||||||
Patch34: 0003-xwayland-Update-screen-pixmap-on-output-resize.patch
|
|
||||||
Patch35: 0004-xwayland-Expand-the-RANDR-screen-size-limits.patch
|
|
||||||
# https://bugzilla.redhat.com/1729925
|
|
||||||
Patch36: 0005-xwayland-Do-not-free-a-NULL-GBM-bo.patch
|
|
||||||
Patch37: 0006-xsync-Add-resource-inside-of-SyncCreate-export-SyncC.patch
|
|
||||||
Patch38: 0007-GLX-Add-a-per-client-vendor-mapping.patch
|
|
||||||
Patch39: 0008-GLX-Use-the-sending-client-for-looking-up-XID-s.patch
|
|
||||||
Patch40: 0009-GLX-Add-a-function-to-change-a-clients-vendor-list.patch
|
|
||||||
Patch41: 0010-GLX-Set-GlxServerExports-major-minor-Version.patch
|
|
||||||
Patch42: 0011-miext-sync-Fix-needless-ABI-change.patch
|
|
||||||
Patch43: 0012-glx-Fix-previous-context-validation-in-xorgGlxMakeCu.patch
|
|
||||||
Patch44: 0013-xwayland-Separate-DamagePtr-into-separate-window-dat.patch
|
|
||||||
Patch45: 0014-xwayland-Refactor-surface-creation-into-a-separate-f.patch
|
|
||||||
Patch46: 0015-xwayland-Handle-the-case-of-windows-being-realized-b.patch
|
|
||||||
|
|
||||||
# Backported Xwayland randr resolution change emulation support
|
# Backported Xwayland randr resolution change emulation support
|
||||||
Patch47: 0001-dix-Add-GetCurrentClient-helper.patch
|
Patch501: 0001-dix-Add-GetCurrentClient-helper.patch
|
||||||
Patch48: 0002-xwayland-Add-wp_viewport-wayland-extension-support.patch
|
Patch502: 0002-xwayland-Add-wp_viewport-wayland-extension-support.patch
|
||||||
Patch49: 0003-xwayland-Use-buffer_damage-instead-of-surface-damage.patch
|
Patch503: 0003-xwayland-Use-buffer_damage-instead-of-surface-damage.patch
|
||||||
Patch50: 0004-xwayland-Add-fake-output-modes-to-xrandr-output-mode.patch
|
Patch504: 0004-xwayland-Add-fake-output-modes-to-xrandr-output-mode.patch
|
||||||
Patch51: 0005-xwayland-Use-RandR-1.2-interface-rev-2.patch
|
Patch505: 0005-xwayland-Use-RandR-1.2-interface-rev-2.patch
|
||||||
Patch52: 0006-xwayland-Add-per-client-private-data.patch
|
Patch506: 0006-xwayland-Add-per-client-private-data.patch
|
||||||
Patch53: 0007-xwayland-Add-support-for-storing-per-client-per-outp.patch
|
Patch507: 0007-xwayland-Add-support-for-storing-per-client-per-outp.patch
|
||||||
Patch54: 0008-xwayland-Add-support-for-randr-resolution-change-emu.patch
|
Patch508: 0008-xwayland-Add-support-for-randr-resolution-change-emu.patch
|
||||||
Patch55: 0009-xwayland-Add-xwlRRModeToDisplayMode-helper-function.patch
|
Patch509: 0009-xwayland-Add-xwlRRModeToDisplayMode-helper-function.patch
|
||||||
Patch56: 0010-xwayland-Add-xwlVidModeGetCurrentRRMode-helper-to-th.patch
|
Patch510: 0010-xwayland-Add-xwlVidModeGetCurrentRRMode-helper-to-th.patch
|
||||||
Patch57: 0011-xwayland-Add-vidmode-mode-changing-emulation-support.patch
|
Patch511: 0011-xwayland-Add-vidmode-mode-changing-emulation-support.patch
|
||||||
Patch58: 0012-xwayland-xwl_window_should_enable_viewport-Add-extra.patch
|
Patch512: 0012-xwayland-xwl_window_should_enable_viewport-Add-extra.patch
|
||||||
Patch59: 0013-xwayland-Set-_XWAYLAND_RANDR_EMU_MONITOR_RECTS-prope.patch
|
Patch513: 0013-xwayland-Set-_XWAYLAND_RANDR_EMU_MONITOR_RECTS-prope.patch
|
||||||
Patch60: 0014-xwayland-Fix-emulated-modes-not-being-removed-when-s.patch
|
Patch514: 0014-xwayland-Fix-emulated-modes-not-being-removed-when-s.patch
|
||||||
Patch61: 0015-xwayland-Call-xwl_window_check_resolution_change_emu.patch
|
Patch515: 0015-xwayland-Call-xwl_window_check_resolution_change_emu.patch
|
||||||
Patch62: 0016-xwayland-Fix-setting-of-_XWAYLAND_RANDR_EMU_MONITOR_.patch
|
Patch516: 0016-xwayland-Fix-setting-of-_XWAYLAND_RANDR_EMU_MONITOR_.patch
|
||||||
Patch63: 0017-xwayland-Remove-unnecessary-xwl_window_is_toplevel-c.patch
|
Patch517: 0017-xwayland-Remove-unnecessary-xwl_window_is_toplevel-c.patch
|
||||||
|
|
||||||
# Fix building with new libglvnd-1.2.0 (E)GL headers and pkgconfig files
|
|
||||||
Patch64: 0001-build-glx-Lower-gl-version-to-work-with-libglvnd.patch
|
|
||||||
Patch65: 0001-glamor-xwayland-Define-EGL_NO_X11.patch
|
|
||||||
|
|
||||||
BuildRequires: systemtap-sdt-devel
|
BuildRequires: systemtap-sdt-devel
|
||||||
BuildRequires: git
|
BuildRequires: git
|
||||||
@ -584,6 +551,9 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 25 2019 Olivier Fourdan <ofourdan@redhat.com> - 1.20.6-1
|
||||||
|
- xserver 1.20.6
|
||||||
|
|
||||||
* Mon Nov 4 2019 Hans de Goede <hdegoede@redhat.com> - 1.20.5-9
|
* Mon Nov 4 2019 Hans de Goede <hdegoede@redhat.com> - 1.20.5-9
|
||||||
- Fix building with new libglvnd-1.2.0 (E)GL headers and pkgconfig files
|
- Fix building with new libglvnd-1.2.0 (E)GL headers and pkgconfig files
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user