xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Feb 13 13:36:48 UTC 2023


 hw/xwayland/xwayland-glamor-gbm.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 5aebc0109611fb78ea040e386273c15d604087f3
Author: Simon Ser <contact at emersion.fr>
Date:   Wed Feb 1 15:40:24 2023 +0100

    xwayland: fix GBM on driver without explicit modifiers
    
    Some drivers (e.g. AMD GFX8-) don't support explicit format
    modifiers. On these drivers, gbm_bo_create_with_modifiers()
    will fail. This results in "Error getting buffer" in the logs
    later on with all X11 windows staying invisible.
    
    Fallback to the modifier-less API gbm_bo_create() in that case.
    
    Signed-off-by: Simon Ser <contact at emersion.fr>

diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 205d2feb3..3984d0b38 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -278,7 +278,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;
+    struct gbm_bo *bo = NULL;
     PixmapPtr pixmap = NULL;
 
     if (width > 0 && height > 0 && depth >= 15 &&
@@ -297,9 +297,8 @@ xwl_glamor_gbm_create_pixmap(ScreenPtr screen,
                                               format, modifiers, num_modifiers);
             free(modifiers);
         }
-        else
 #endif
-        {
+        if (bo == NULL) {
             bo = gbm_bo_create(xwl_gbm->gbm, width, height, format,
                                GBM_BO_USE_RENDERING);
         }


More information about the xorg-commit mailing list