[PATCH xserver] glamor: glamor_egl_get_display: Return NULL if eglGetPlatformDisplayEXT returns NULL

Adam Jackson ajax at nwnk.net
Mon Jan 2 18:27:48 UTC 2017


On Tue, 2016-12-20 at 13:00 +0100, Hans de Goede wrote:
> If the libEGL we are using has eglGetPlatformDisplayEXT, yet it still
> returns NULL, then this very likely means that it does not support
> the type (e.g. EGL_PLATFORM_GBM_MESA) passed in, and then returning NULL
> is the right thing to do.
> 
> This avoids falling back to an eglGetDisplay() implementation which does
> not understands the passed in gbm handle, treats it as a pointer to
> something else completely, followed by a crash sooner or later.
> 
> Specifically this fixes using the nvidia binary driver, with nvidia's
> libEGL + the modesetting driver on a secondary GPU crashing inside
> glamor_egl_init() sometimes.

Yep, good catch. Merged with an 80-column-compliant summary line:

remote: I: patch #128808 updated using rev 05e19644250698aa126a60bc671e85425df784d1.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   5b74e26..05e1964  master -> master

- ajax


More information about the xorg-devel mailing list