mesa/src/egl
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
..
drivers egl/android: rework device probing 2018-09-20 10:15:38 +01:00
generate egl: Add dma_buf_import_modifiers for glvnd 2017-08-21 12:13:50 +01:00
main egl: implement EXT_surface_SMPTE2086_metadata and EXT_surface_CTA861_3_metadata 2018-08-20 09:44:53 +03:00
wayland autoconf: stop exporting internal wayland details 2018-08-07 17:23:17 +01:00
.gitignore egl: add gitignore 2017-04-22 00:42:38 +01:00
Android.mk egl: drop unused _EGL_BUILT_IN_DRIVER_DRI2 2018-08-23 14:47:59 +01:00
egl-entrypoint-check check: add support for running test as standalone 2017-02-26 13:39:45 +00:00
egl-symbols-check *-symbol-check: use correct nm path when cross-compiling 2018-02-26 13:50:59 +00:00
Makefile.am Revert "configure: allow building with python3" 2018-08-24 11:14:15 +01:00
Makefile.sources egl: remove suprous header eglcompiler.h 2017-05-08 15:33:59 +01:00
meson.build egl: drop unused _EGL_BUILT_IN_DRIVER_DRI2 2018-08-23 14:47:59 +01:00
SConscript egl: Use the canonical drm-uapi fourcc header to avoid local defines. 2018-07-18 10:37:54 -07:00