This commit is contained in:
Ward Nakchbandi (Cosmic Fusion) 2023-11-13 20:20:53 +03:00 committed by GitHub
parent b7f1efa914
commit 2168723842
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 22 deletions

View File

@ -1,6 +1,6 @@
# Clone Upstream
#git clone https://gitlab.freedesktop.org/xorg/xserver.git -b xwayland-23.2.2 ./xwayland
git clone https://gitlab.freedesktop.org/ekurzinger/xserver.git -b explicit-sync ./xwayland
git clone https://gitlab.freedesktop.org/xorg/xserver.git -b xwayland-23.2.2 ./xwayland
#git clone https://gitlab.freedesktop.org/ekurzinger/xserver.git -b explicit-sync ./xwayland
cp -rvf ./debian ./xwayland/
cd ./xwayland
for i in $(cat ../patches/series) ; do echo "Applying Patch: $i" && patch -Np1 -i ../patches/$i || bash -c "echo "Applying Patch $i Failed!" && exit 2"; done

View File

@ -432,7 +432,7 @@ index 2c38a15ae0..ffd7d0e239 100644
GitLab
From 45e18cad319a849b08d45d4ed78f7816d48ab286 Mon Sep 17 00:00:00 2001
From 982ad9c2f4ff6c29ce1ded6123a81dfd8422dd72 Mon Sep 17 00:00:00 2001
From: Erik Kurzinger <ekurzinger@nvidia.com>
Date: Tue, 16 Aug 2022 11:59:14 -0700
Subject: [PATCH 3/5] xwayland: implement support for DRI3 syncobjs
@ -443,14 +443,14 @@ objects.
Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
---
hw/xwayland/xwayland-glamor-gbm.c | 178 +++++++++++++++++++++++++++++-
1 file changed, 177 insertions(+), 1 deletion(-)
hw/xwayland/xwayland-glamor-gbm.c | 184 +++++++++++++++++++++++++++++-
1 file changed, 183 insertions(+), 1 deletion(-)
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index b177b77e08..547a0999df 100644
index b177b77e08..5bd2373500 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -811,7 +811,177 @@ glamor_egl_fd_from_pixmap(ScreenPtr screen, PixmapPtr pixmap,
@@ -811,7 +811,183 @@ glamor_egl_fd_from_pixmap(ScreenPtr screen, PixmapPtr pixmap,
return -1;
}
@ -475,8 +475,14 @@ index b177b77e08..547a0999df 100644
+ NULL /* first_signaled */);
+}
+
+#pragma weak drmSyncobjImportSyncFileTimeline
+#pragma weak drmSyncobjExportSyncFileTimeline
+extern int
+drmSyncobjImportSyncFileTimeline(int fd, uint32_t handle,
+ uint64_t point, int sync_file_fd)
+ __attribute__((weak));
+extern int
+drmSyncobjExportSyncFileTimeline(int fd, uint32_t handle,
+ uint64_t point, int *sync_file_fd)
+ __attribute__((weak));
+
+static int
+xwl_dri3_syncobj_export_fence(struct dri3_syncobj *syncobj, uint64_t point)
@ -629,7 +635,7 @@ index b177b77e08..547a0999df 100644
.version = 2,
.open = NULL,
.pixmap_from_fds = glamor_pixmap_from_fds,
@@ -820,6 +990,7 @@ static const dri3_screen_info_rec xwl_dri3_info = {
@@ -820,6 +996,7 @@ static const dri3_screen_info_rec xwl_dri3_info = {
.get_formats = xwl_glamor_get_formats,
.get_modifiers = xwl_glamor_get_modifiers,
.get_drawable_modifiers = xwl_glamor_get_drawable_modifiers,
@ -637,7 +643,7 @@ index b177b77e08..547a0999df 100644
};
static const char *
@@ -1182,6 +1353,11 @@ xwl_glamor_gbm_init_screen(struct xwl_screen *xwl_screen)
@@ -1182,6 +1359,11 @@ xwl_glamor_gbm_init_screen(struct xwl_screen *xwl_screen)
{
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
@ -653,7 +659,7 @@ index b177b77e08..547a0999df 100644
GitLab
From f9025e551212cdda3571e3db53932e06fc9e22e0 Mon Sep 17 00:00:00 2001
From 5b3744ecbc40f45650f961dd7d8ea82987519230 Mon Sep 17 00:00:00 2001
From: Erik Kurzinger <ekurzinger@nvidia.com>
Date: Tue, 16 Aug 2022 12:03:59 -0700
Subject: [PATCH 4/5] Present: implement PresentPixmapSynced
@ -1601,7 +1607,7 @@ index 4f94f16e44..2eb57abfff 100644
GitLab
From d7efe16f0b2a7989881dfd47773dd9fc09f6cd21 Mon Sep 17 00:00:00 2001
From 02621661f676debe73956c0a8fc0d914664711a4 Mon Sep 17 00:00:00 2001
From: Erik Kurzinger <ekurzinger@nvidia.com>
Date: Tue, 15 Aug 2023 15:32:47 -0700
Subject: [PATCH 5/5] xwayland: add support for wp_linux_drm_syncobj_v1
@ -1663,7 +1669,7 @@ index f2038ab7c3..434b0ceade 100644
if build_ei
xwayland_dep += libei_dep
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 547a0999df..379de83629 100644
index 5bd2373500..6a06be2daa 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -35,6 +35,9 @@
@ -1810,7 +1816,7 @@ index 547a0999df..379de83629 100644
static Bool
xwl_dri3_check_syncobj(struct dri3_syncobj *syncobj, uint64_t point)
{
@@ -897,6 +1000,9 @@ xwl_dri3_free_syncobj(struct dri3_syncobj *syncobj)
@@ -903,6 +1006,9 @@ xwl_dri3_free_syncobj(struct dri3_syncobj *syncobj)
struct xwl_screen *xwl_screen = xwl_screen_get(syncobj->screen);
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
@ -1820,7 +1826,7 @@ index 547a0999df..379de83629 100644
if (xwl_syncobj->handle)
drmSyncobjDestroy(xwl_gbm->drm_fd, xwl_syncobj->handle);
@@ -920,10 +1026,23 @@ xwl_dri3_create_syncobj(struct xwl_screen *xwl_screen, uint32_t handle)
@@ -926,10 +1032,23 @@ xwl_dri3_create_syncobj(struct xwl_screen *xwl_screen, uint32_t handle)
{
struct xwl_dri3_syncobj *syncobj = calloc(1, sizeof (*syncobj));
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
@ -1844,7 +1850,7 @@ index 547a0999df..379de83629 100644
syncobj->handle = handle;
syncobj->base.screen = xwl_screen->screen;
syncobj->base.refcount = 1;
@@ -981,6 +1100,29 @@ xwl_gbm_supports_syncobjs(struct xwl_screen *xwl_screen)
@@ -987,6 +1106,29 @@ xwl_gbm_supports_syncobjs(struct xwl_screen *xwl_screen)
return TRUE;
}
@ -1874,7 +1880,7 @@ index 547a0999df..379de83629 100644
static dri3_screen_info_rec xwl_dri3_info = {
.version = 2,
.open = NULL,
@@ -1152,6 +1294,11 @@ xwl_glamor_gbm_init_wl_registry(struct xwl_screen *xwl_screen,
@@ -1158,6 +1300,11 @@ xwl_glamor_gbm_init_wl_registry(struct xwl_screen *xwl_screen,
} else if (strcmp(name, "zwp_linux_dmabuf_v1") == 0) {
xwl_screen_set_dmabuf_interface(xwl_screen, id, version);
return TRUE;
@ -1886,7 +1892,7 @@ index 547a0999df..379de83629 100644
}
/* no match */
@@ -1275,7 +1422,7 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen)
@@ -1281,7 +1428,7 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen)
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
EGLint major, minor;
const GLubyte *renderer;
@ -1895,7 +1901,7 @@ index 547a0999df..379de83629 100644
if (!xwl_gbm->fd_render_node && !xwl_gbm->drm_authenticated) {
ErrorF("Failed to get wl_drm, disabling Glamor and DRI3\n");
@@ -1336,6 +1483,22 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen)
@@ -1342,6 +1489,22 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen)
if (gbm_backend_name && strcmp(gbm_backend_name, "drm") != 0)
xwl_screen->glvnd_vendor = gbm_backend_name;
@ -1918,7 +1924,7 @@ index 547a0999df..379de83629 100644
return TRUE;
error:
if (xwl_screen->egl_display != EGL_NO_DISPLAY) {
@@ -1353,7 +1516,7 @@ xwl_glamor_gbm_init_screen(struct xwl_screen *xwl_screen)
@@ -1359,7 +1522,7 @@ xwl_glamor_gbm_init_screen(struct xwl_screen *xwl_screen)
{
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
@ -1927,7 +1933,7 @@ index 547a0999df..379de83629 100644
xwl_dri3_info.version = 4;
xwl_dri3_info.import_syncobj = xwl_dri3_import_syncobj;
}
@@ -1426,6 +1589,11 @@ xwl_glamor_init_gbm(struct xwl_screen *xwl_screen)
@@ -1432,6 +1595,11 @@ xwl_glamor_init_gbm(struct xwl_screen *xwl_screen)
xwl_screen->gbm_backend.get_main_device = xwl_gbm_get_main_device;
xwl_screen->gbm_backend.is_available = TRUE;
xwl_screen->gbm_backend.backend_flags = XWL_EGL_BACKEND_NEEDS_BUFFER_FLUSH |

View File

@ -0,0 +1,3 @@
1120.patch
967.patch
0001-xwayland-patch-fix-vsync.patch