[Mesa-dev] [RFC] loader: libudev vs sysfs vs libdrm

Emil Velikov emil.l.velikov at gmail.com
Tue Jul 14 07:44:38 PDT 2015

On 14 July 2015 at 07:48, Julien Isorce <julien.isorce at gmail.com> wrote:
>>> - libdrm: used as a last resource fall-back after the above two. the
>>> sole option used by *BSD, MacOS and Android.
> Hi,
> Unless I am missing something, libdrm is not used on MacOS.
> On osx, EGL_PLATFORM=x11 eglGetDisplay(NULL) calls dri2_initialize_x11 which
> fallback to dri2_initialize_x11_swrast.
> Though libdrm can be built and then EGL_PLATFORM=drm eglGetDisplay(NULL)
> calls dri2_initialize_drm which fallback to swrast .
> But not sure how gbm surfaces are useful.
> And there is no kernel side for drm on darwin right ?
Slight oversight on my end. Yes there is no drm/hardware support
(barring glx/appledri) so we won't get here at all.

On the opposite end, a user reported that despite the libudev path
failing, things worked out fine.

> Speaking about egl, on linux+x11, the driver name is retrieved with
> xcb_dri2_connect_driver_name (except swrast which is harcoded) and then
> loaded with dri2_open_driver (= dlopen of %s_dri.so)
> So this mechanism is not either libudev, sysfs or libdrm. Am I missing
> something (or is it part of sysfs) ? Or the X server internally will use one
> of these 3 ?
Originally the xserver/ddx provided information which dri module to
load. Shortly before the megadrivers Eric updated the glx code with
commit 7bd95ec437a to honour the value from libloader over the one
sent over the wire. We might as apply the same approach for EGL.

> Also any plan to support eglQueryDevicesEXT
> (https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_device_enumeration.txt)
> ?
Personally I like the set of extensions proposed by Nvidia, although I
doubt that I/others will get to work on them soon. Patches welcome :-)


More information about the mesa-dev mailing list