xserver: Branch 'xwayland-21.1' - 4 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 6 14:58:54 UTC 2021


 hw/xwayland/xwayland-glamor-eglstream.c |    8 +++++---
 hw/xwayland/xwayland-glamor-gbm.c       |    2 +-
 hw/xwayland/xwayland-glamor.c           |   16 ++++++++--------
 3 files changed, 14 insertions(+), 12 deletions(-)

New commits:
commit bdc00ba749ac6cde35c025f5f6b1a5b49c1f4960
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Wed Nov 17 09:56:52 2021 +0100

    xwayland/eglstream: Prefer EGLstream if available
    
    Currently, when given the choice, Xwayland will pick the GBM backend
    over the EGLstream backend if both are available, unless the command
    line option “-eglstream” is specified.
    
    The NVIDIA proprietary driver had no support for GBM until driver series
    495, but starting with the driver series 495, both can be used.
    
    But there are other requirements with the rest of the stack, typically
    Mesa, egl-wayland, libglvnd as documented in the NVIDIA driver.
    
    So if the NVIDIA driver series 495 gets installed, Xwayland will pick
    the GBM backend even if EGLstream is available and may fail to render
    properly.
    
    To avoid that issue, prefer EGLstream if EGLstream and all the Wayland
    interfaces are available, and fallback to GBM automatically unless
    “-eglstream” was specified.
    
    With this, the compositor, given the choice, can decide which actual
    backend Xwayland would use by advertising (or not) the Wayland
    "wl_eglstream_controller" interface.
    
    This change has no impact on compositors which do not have support for
    EGLstream in the first place.
    
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
    Acked-by: Michel Dänzer <mdaenzer at redhat.com>
    (cherry picked from commit 6dd9709bd85cf5de4067887818c864220b951355)

diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index b34eafabb..f46b677f5 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -441,14 +441,10 @@ xwl_glamor_select_eglstream_backend(struct xwl_screen *xwl_screen)
 void
 xwl_glamor_select_backend(struct xwl_screen *xwl_screen, Bool use_eglstream)
 {
-    if (use_eglstream) {
-        if (!xwl_glamor_select_eglstream_backend(xwl_screen))
+    if (!xwl_glamor_select_eglstream_backend(xwl_screen)) {
+        if (!use_eglstream)
             xwl_glamor_select_gbm_backend(xwl_screen);
     }
-    else {
-        if (!xwl_glamor_select_gbm_backend(xwl_screen))
-            xwl_glamor_select_eglstream_backend(xwl_screen);
-    }
 }
 
 Bool
commit 3206e133cb768709d32f260ac4b1bb17a46141a7
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Wed Nov 17 13:09:58 2021 +0100

    xwayland/glamor: Log backend selected for debug
    
    Add (verbose) statements to trace the actual backend used with glamor.
    
    That can be useful for debugging.
    
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
    Reviewed-by: Michel Dänzer <mdaenzer at redhat.com>
    (cherry picked from commit c5d1fed9fa32244739677ec5c58ea87b261e023b)

diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index 541d5e923..b34eafabb 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -409,6 +409,7 @@ xwl_glamor_select_gbm_backend(struct xwl_screen *xwl_screen)
     if (xwl_screen->gbm_backend.is_available &&
         xwl_glamor_has_wl_interfaces(xwl_screen, &xwl_screen->gbm_backend)) {
         xwl_screen->egl_backend = &xwl_screen->gbm_backend;
+        LogMessageVerb(X_INFO, 3, "glamor: Using GBM backend\n");
         return TRUE;
     }
     else
@@ -426,6 +427,7 @@ xwl_glamor_select_eglstream_backend(struct xwl_screen *xwl_screen)
     if (xwl_screen->eglstream_backend.is_available &&
         xwl_glamor_has_wl_interfaces(xwl_screen, &xwl_screen->eglstream_backend)) {
         xwl_screen->egl_backend = &xwl_screen->eglstream_backend;
+        LogMessageVerb(X_INFO, 3, "glamor: Using EGLStream backend\n");
         return TRUE;
     }
     else
commit a515f4f4336efb8a2adf9a3ac141129708297d80
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Mon Nov 29 11:45:35 2021 +0100

    xwayland/glamor: Change errors to verbose messages
    
    On a normal startup sequence, the Xwayland glamor backend would log
    an error whenever a required Wayland protocol is missing.
    
    Those are not really errors though, more informational messages along
    the glamor backend selection process.
    
    Demote those errors to verbose messages to reduce the verbosity of
    Xwayland at startup by default.
    
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
    Reviewed-by: Jonas Ådahl <jadahl at gmail.com>
    (cherry picked from commit 30d0d4a19be61dd7b61f5ced992cb299e6a38068)

diff --git a/hw/xwayland/xwayland-glamor-eglstream.c b/hw/xwayland/xwayland-glamor-eglstream.c
index 93d192d58..5a20b452f 100644
--- a/hw/xwayland/xwayland-glamor-eglstream.c
+++ b/hw/xwayland/xwayland-glamor-eglstream.c
@@ -753,12 +753,14 @@ xwl_glamor_eglstream_has_wl_interfaces(struct xwl_screen *xwl_screen)
         xwl_eglstream_get(xwl_screen);
 
     if (xwl_eglstream->display == NULL) {
-        ErrorF("glamor: 'wl_eglstream_display' not supported\n");
+        LogMessageVerb(X_INFO, 3,
+                       "glamor: 'wl_eglstream_display' not supported\n");
         return FALSE;
     }
 
     if (xwl_eglstream->controller == NULL) {
-        ErrorF("glamor: 'wl_eglstream_controller' not supported\n");
+        LogMessageVerb(X_INFO, 3,
+                       "glamor: 'wl_eglstream_controller' not supported\n");
         return FALSE;
     }
 
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 466a1b052..e06b6f54b 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -835,7 +835,7 @@ xwl_glamor_gbm_has_wl_interfaces(struct xwl_screen *xwl_screen)
     struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
 
     if (xwl_gbm->drm == NULL) {
-        ErrorF("glamor: 'wl_drm' not supported\n");
+        LogMessageVerb(X_INFO, 3, "glamor: 'wl_drm' not supported\n");
         return FALSE;
     }
 
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index deb398f91..541d5e923 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -412,7 +412,8 @@ xwl_glamor_select_gbm_backend(struct xwl_screen *xwl_screen)
         return TRUE;
     }
     else
-        ErrorF("Missing Wayland requirements for glamor GBM backend\n");
+        LogMessageVerb(X_INFO, 3,
+                       "Missing Wayland requirements for glamor GBM backend\n");
 #endif
 
     return FALSE;
@@ -428,7 +429,8 @@ xwl_glamor_select_eglstream_backend(struct xwl_screen *xwl_screen)
         return TRUE;
     }
     else
-        ErrorF("Missing Wayland requirements for glamor EGLStream backend\n");
+        LogMessageVerb(X_INFO, 3,
+                       "Missing Wayland requirements for glamor EGLStream backend\n");
 #endif
 
     return FALSE;
commit 0a7ed9ff7ea20f7b958a2ad9f9bd045080a3ad9a
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Mon Nov 15 16:02:34 2021 +0100

    xwayland/eglstream: Demote EGLstream device warning
    
    If no EGLstream capable device is found at startup, Xwayland's EGLstream
    backend will log an error message "glamor: No eglstream capable devices
    found".
    
    However, considering that the vast majority of drivers do not implement
    EGLstream, the lack of EGLstream capable device is more of the norm than
    the exception.
    
    Change the error message to a log verbose message.
    
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
    Reviewed-by: Simon Ser <contact at emersion.fr>
    Reviewed-by: Jonas Ådahl <jadahl at gmail.com>
    (cherry picked from commit 96c82befa2c3f3dc3534743c67cc003c2106e9b0)

diff --git a/hw/xwayland/xwayland-glamor-eglstream.c b/hw/xwayland/xwayland-glamor-eglstream.c
index 8d18caaf5..93d192d58 100644
--- a/hw/xwayland/xwayland-glamor-eglstream.c
+++ b/hw/xwayland/xwayland-glamor-eglstream.c
@@ -1144,7 +1144,7 @@ xwl_eglstream_get_device(struct xwl_screen *xwl_screen)
     free(devices);
 out:
     if (!device)
-        ErrorF("glamor: No eglstream capable devices found\n");
+        LogMessageVerb(X_INFO, 3, "glamor: No eglstream capable devices found\n");
     return device;
 }
 


More information about the xorg-commit mailing list