|
|
2936a4 |
From bdc00ba749ac6cde35c025f5f6b1a5b49c1f4960 Mon Sep 17 00:00:00 2001
|
|
|
2936a4 |
From: Olivier Fourdan <ofourdan@redhat.com>
|
|
|
2936a4 |
Date: Wed, 17 Nov 2021 09:56:52 +0100
|
|
|
2936a4 |
Subject: [PATCH xserver 4/4] xwayland/eglstream: Prefer EGLstream if available
|
|
|
2936a4 |
MIME-Version: 1.0
|
|
|
2936a4 |
Content-Type: text/plain; charset=UTF-8
|
|
|
2936a4 |
Content-Transfer-Encoding: 8bit
|
|
|
2936a4 |
|
|
|
2936a4 |
Currently, when given the choice, Xwayland will pick the GBM backend
|
|
|
2936a4 |
over the EGLstream backend if both are available, unless the command
|
|
|
2936a4 |
line option “-eglstream” is specified.
|
|
|
2936a4 |
|
|
|
2936a4 |
The NVIDIA proprietary driver had no support for GBM until driver series
|
|
|
2936a4 |
495, but starting with the driver series 495, both can be used.
|
|
|
2936a4 |
|
|
|
2936a4 |
But there are other requirements with the rest of the stack, typically
|
|
|
2936a4 |
Mesa, egl-wayland, libglvnd as documented in the NVIDIA driver.
|
|
|
2936a4 |
|
|
|
2936a4 |
So if the NVIDIA driver series 495 gets installed, Xwayland will pick
|
|
|
2936a4 |
the GBM backend even if EGLstream is available and may fail to render
|
|
|
2936a4 |
properly.
|
|
|
2936a4 |
|
|
|
2936a4 |
To avoid that issue, prefer EGLstream if EGLstream and all the Wayland
|
|
|
2936a4 |
interfaces are available, and fallback to GBM automatically unless
|
|
|
2936a4 |
“-eglstream” was specified.
|
|
|
2936a4 |
|
|
|
2936a4 |
With this, the compositor, given the choice, can decide which actual
|
|
|
2936a4 |
backend Xwayland would use by advertising (or not) the Wayland
|
|
|
2936a4 |
"wl_eglstream_controller" interface.
|
|
|
2936a4 |
|
|
|
2936a4 |
This change has no impact on compositors which do not have support for
|
|
|
2936a4 |
EGLstream in the first place.
|
|
|
2936a4 |
|
|
|
2936a4 |
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
|
|
2936a4 |
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
|
|
|
2936a4 |
(cherry picked from commit 6dd9709bd85cf5de4067887818c864220b951355)
|
|
|
2936a4 |
---
|
|
|
2936a4 |
hw/xwayland/xwayland-glamor.c | 8 ++------
|
|
|
2936a4 |
1 file changed, 2 insertions(+), 6 deletions(-)
|
|
|
2936a4 |
|
|
|
2936a4 |
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
|
|
|
2936a4 |
index b34eafabb..f46b677f5 100644
|
|
|
2936a4 |
--- a/hw/xwayland/xwayland-glamor.c
|
|
|
2936a4 |
+++ b/hw/xwayland/xwayland-glamor.c
|
|
|
2936a4 |
@@ -441,14 +441,10 @@ xwl_glamor_select_eglstream_backend(struct xwl_screen *xwl_screen)
|
|
|
2936a4 |
void
|
|
|
2936a4 |
xwl_glamor_select_backend(struct xwl_screen *xwl_screen, Bool use_eglstream)
|
|
|
2936a4 |
{
|
|
|
2936a4 |
- if (use_eglstream) {
|
|
|
2936a4 |
- if (!xwl_glamor_select_eglstream_backend(xwl_screen))
|
|
|
2936a4 |
+ if (!xwl_glamor_select_eglstream_backend(xwl_screen)) {
|
|
|
2936a4 |
+ if (!use_eglstream)
|
|
|
2936a4 |
xwl_glamor_select_gbm_backend(xwl_screen);
|
|
|
2936a4 |
}
|
|
|
2936a4 |
- else {
|
|
|
2936a4 |
- if (!xwl_glamor_select_gbm_backend(xwl_screen))
|
|
|
2936a4 |
- xwl_glamor_select_eglstream_backend(xwl_screen);
|
|
|
2936a4 |
- }
|
|
|
2936a4 |
}
|
|
|
2936a4 |
|
|
|
2936a4 |
Bool
|
|
|
2936a4 |
--
|
|
|
2936a4 |
2.33.1
|
|
|
2936a4 |
|