mesa/src/egl/drivers/dri2
Emil Velikov b8b3517a49 egl/android: rework device probing
Unlike the other platforms, here we aim do guess if the device that we
somewhat arbitrarily picked, is supported or not.

In particular: when a vendor is _not_ requested we loop through all
devices, picking the first one which can create a DRI screen.

When a vendor is requested - we use that and do _not_ fall-back to any
other device.

The former seems a bit fiddly, but considering EGL_EXT_explicit_device and
EGL_MESA_query_renderer are MIA, this is the best we can do for the
moment.

With those (proposed) extensions userspace will be able to create a
separate EGL display for each device, query device details and make the
conscious decision which one to use.

v2:
 - update droid_open_device_drm_gralloc()
 - set the dri2_dpy->fd before using it
 - return a EGLBoolean for droid_{probe,open}_device*
 - do not warn on droid_load_driver failure (Tomasz)
 - plug mem leak on dri2_create_screen failure (Tomasz)
 - fixup function name typo (Tomasz, Rob)

v3:
 - add forward declaration for droid_load_driver()
Fixes the HAVE_DRM_GRALLOC build (Mauro)
 - split dup() assignment and check in separate lines (Tomasz, Eric)
 - make droid_load_driver() static (Tomasz)
 - drop unused prop_set variable (Tomasz)

v4:
 - rebase
 - fwd declarationi should be for droid_probe_device()

Cc: Robert Foss <robert.foss@collabora.com>
Cc: Tomasz Figa <tfiga@chromium.org>
Cc: Mauro Rossi <issor.oruam@gmail.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Tested-by: Tomasz Figa <tfiga@chromium.org>
Tested-by: Tapani Pälli <tapani.palli@intel.com>
2018-09-20 10:15:38 +01:00
..
.gitignore egl/wayland: Use linux-dmabuf interface for buffers 2017-07-18 22:16:21 +01:00
egl_dri2.c egl/dri2: Guard against invalid fourcc formats 2018-08-30 11:41:50 -05:00
egl_dri2.h egl/wayland: do not leak wl_buffer when it is locked 2018-08-31 16:29:36 +02:00
egl_dri2_fallbacks.h egl: set EGL_BAD_NATIVE_PIXMAP in the copy_buffers fallback 2018-08-07 17:59:24 +01:00
platform_android.c egl/android: rework device probing 2018-09-20 10:15:38 +01:00
platform_drm.c egl/drm: use gbm_dri_bo() wrapper 2018-08-24 11:53:24 +01:00
platform_surfaceless.c egl/surfaceless: Allow DRMless fallback. 2018-07-30 19:40:45 -07:00
platform_wayland.c egl/wayland: do not leak wl_buffer when it is locked 2018-08-31 16:29:36 +02:00
platform_x11.c egl: add helper to combine two u32 into one u64 2018-08-21 15:50:02 +01:00
platform_x11_dri3.c egl: Fix leak of X11 pixmaps backing pbuffers in DRI3. 2018-08-09 13:12:13 -07:00
platform_x11_dri3.h egl/x11: Handle both depth 30 formats for eglCreateImage(). (v4) 2018-08-01 12:55:37 +01:00