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