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

Julien Isorce julien.isorce at gmail.com
Mon Jul 13 23:48:49 PDT 2015

>> - libdrm: used as a last resource fall-back after the above two. the
>> sole option used by *BSD, MacOS and Android.


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 ?

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 ?

Also any plan to support eglQueryDevicesEXT (

On 9 July 2015 at 22:00, Emil Velikov <emil.l.velikov at gmail.com> wrote:

> On 09/07/15 15:40, Axel Davy wrote:
> > On 09/07/2015 15:33, Emil Velikov wrote :
> >>
> >> Yakes forgot about that one. From a quick look we can (I know it feels
> >> durty) use readlink(
> >> /sys/dev/char/$(major):$(minor)).
> >>
> >> Everything seems to be there - bus type and exact location of the
> >> device on the bus. It's limited to sysfs users, but they are more than
> >> the libudev ones (perhaps not by much). How does that sound ?
> >>
> >> Cheers,
> >> Emil
> >>
> > The idea behind using udev for the tag was that arbitrary tag could be
> > used,
> > especially to identify usb devices.
> >
> So avoid breaking peoples' setup the above example can be used to
> produce the very same tag(s). Regardles if it's a device on the pci or
> usb bus. Speaking of usb, are there any devices supported with upstream
> mesa ?
> -Emil
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150714/81748bab/attachment.html>

More information about the mesa-dev mailing list