Andreas Boll pushed to branch debian-unstable at X Strike Force / xserver / xorg-server
Commits: d06b7910 by Timo Aaltonen at 2018-10-10T15:45:42Z 08_dont-init-glamor-on-llvmpipe.diff: Glamor shouldn't be used on llvmpipe as it might end up crashing the server on a racy bootup. (LP: #1792932) (Closes: #907655, #910135) - - - - - f7ab0acb by Andreas Boll at 2018-10-10T16:23:21Z Upload to unstable. - - - - - 3 changed files: - debian/changelog - + debian/patches/08_dont-init-glamor-on-llvmpipe.diff - debian/patches/series Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,12 @@ +xorg-server (2:1.20.1-5) unstable; urgency=medium + + [ Timo Aaltonen ] + * 08_dont-init-glamor-on-llvmpipe.diff: Glamor shouldn't be used on + llvmpipe, as it might end up crashing the server on a racy bootup. + (LP: #1792932) (Closes: #907655, #910135) + + -- Andreas Boll <ab...@debian.org> Wed, 10 Oct 2018 18:23:15 +0200 + xorg-server (2:1.20.1-4) unstable; urgency=medium [ Julien Cristau ] ===================================== debian/patches/08_dont-init-glamor-on-llvmpipe.diff ===================================== @@ -0,0 +1,85 @@ +commit 0a9415cf793babed1f28c61f8047d51de04f1528 +Author: Adam Jackson <a...@redhat.com> +Date: Fri Sep 14 11:33:43 2018 -0400 + + glamor_egl: Don't initialize on llvmpipe + + Mesa started supporting GL_OES_EGL_image on llvmpipe in 17.3, after this + commit: + + commit bbdeddd5fd0b797e1e281f058338b3da4d98029d + Author: Gurchetan Singh <gurchetansi...@chromium.org> + Date: Tue Aug 1 14:49:33 2017 -0700 + + st/dri: add drisw image extension + + That's pretty cool, but it means glamor now thinks it can initialize on + llvmpipe. This is almost certainly not what anyone wants, as glamor on + llvmpipe is pretty much uniformly slower than fb. + + This fixes both Xorg and Xwayland to refuse glamor in such a setup. + Xephyr is left alone, both because glamor is not the default there and + because Xephyr+glamor+llvmpipe is one of the easier ways to get xts to + exercise glamor. + + The (very small) downside of this change is that you lose DRI3 support. + This wouldn't have helped you very much (since an lp glamor blit is + slower than a pixman blit), but it would eliminate the PutImage overhead + for llvmpipe's glXSwapBuffers. A future change should add DRI3 support + for the fb-only case. + + Reviewed-by: Eric Anholt <e...@anholt.net> + Signed-off-by: Adam Jackson <a...@redhat.com> + +diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c +index df278b1a1..9b930d603 100644 +--- a/glamor/glamor_egl.c ++++ b/glamor/glamor_egl.c +@@ -898,6 +898,7 @@ Bool + glamor_egl_init(ScrnInfoPtr scrn, int fd) + { + struct glamor_egl_screen_private *glamor_egl; ++ const GLubyte *renderer; + + glamor_egl = calloc(sizeof(*glamor_egl), 1); + if (glamor_egl == NULL) +@@ -992,6 +993,14 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd) + "Failed to make EGL context current\n"); + goto error; + } ++ ++ renderer = glGetString(GL_RENDERER); ++ if (strstr((const char *)renderer, "llvmpipe")) { ++ xf86DrvMsg(scrn->scrnIndex, X_INFO, ++ "Refusing to try glamor on llvmpipe\n"); ++ goto error; ++ } ++ + /* + * Force the next glamor_make_current call to set the right context + * (in case of multiple GPUs using glamor) +@@ -1005,7 +1014,7 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd) + } + + xf86DrvMsg(scrn->scrnIndex, X_INFO, "glamor X acceleration enabled on %s\n", +- glGetString(GL_RENDERER)); ++ renderer); + + #ifdef GBM_BO_WITH_MODIFIERS + if (epoxy_has_egl_extension(glamor_egl->display, +diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c +index 06fcf5239..25a354bf7 100644 +--- a/hw/xwayland/xwayland-glamor-gbm.c ++++ b/hw/xwayland/xwayland-glamor-gbm.c +@@ -843,6 +843,11 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen) + goto error; + } + ++ if (strstr((const char *)glGetString(GL_RENDERER), "llvmpipe")) { ++ ErrorF("Refusing to try glamor on llvmpipe\n"); ++ goto error; ++ } ++ + if (!epoxy_has_gl_extension("GL_OES_EGL_image")) { + ErrorF("GL_OES_EGL_image not available\n"); + goto error; ===================================== debian/patches/series ===================================== @@ -6,3 +6,4 @@ 05_Revert-Unload-submodules.diff 06_use-intel-only-on-pre-gen4.diff 07_use-modesetting-driver-by-default-on-GeForce.diff +08_dont-init-glamor-on-llvmpipe.diff View it on GitLab: https://salsa.debian.org/xorg-team/xserver/xorg-server/compare/1c07a1dbdd8ce013f599aa28456406dddd28413b...f7ab0acb8c8de740e5c336891d879309d3f263e5 -- View it on GitLab: https://salsa.debian.org/xorg-team/xserver/xorg-server/compare/1c07a1dbdd8ce013f599aa28456406dddd28413b...f7ab0acb8c8de740e5c336891d879309d3f263e5 You're receiving this email because of your account on salsa.debian.org.