egl/android: use drmDevice instead of the manual /dev/dri iteration
authorEmil Velikov <emil.velikov@collabora.com>
Wed, 8 Aug 2018 13:19:05 +0000 (14:19 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 24 Aug 2018 10:50:36 +0000 (11:50 +0100)
commit3827966643b63061027bbe9320b8e371c49e2033
treebec62c2539cebb62b44aa9679fb4d99d15d577db
parentcff80b6c153661ed40a207815a3d3a132daae656
egl/android: use drmDevice instead of the manual /dev/dri iteration

Replace the manual handling of /dev/dri in favor of the drmDevice API.
The latter provides a consistent way of enumerating the devices,
providing device details as needed.

v2:
 - Use ARRAY_SIZE (Frank)
 - s/famour/favor/ typo (Frank)
 - Make MAX_DRM_DEVICES a macro - fix vla errors (RobF)
 - Remove left-over dev_path instance (RobF)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com> (v1)
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
src/egl/drivers/dri2/platform_android.c