Skip to content
  • Hans de Goede's avatar
    glamor: Trust eglGetPlatformDisplayEXT if it exists · 05e19644
    Hans de Goede authored and Adam Jackson's avatar Adam Jackson committed
    
    
    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.
    
    Cc: Eric Anholt <eric@anholt.net>
    Reviewed-by: default avatarAdam Jackson <ajax@redhat.com>
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    05e19644