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

2015-07-14 Thread Emil Velikov
On 14 July 2015 at 07:48, Julien Isorce 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 dr

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

2015-07-13 Thread Julien Isorce
>> - 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_swr

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

2015-07-09 Thread Emil Velikov
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

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

2015-07-09 Thread Axel Davy
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

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

2015-07-09 Thread Emil Velikov
On 8 July 2015 at 18:55, Axel Davy wrote: > On 08/07/2015 00:15, Emil Velikov wrote : >> >> >> >> Can anyone shed a light/cast their 2c ? >> >> Thanks >> Emil >> ___ >> > > The DRI3/Wayland/Gallium Nine DRI_PRIME path uses libudev, > and I'm not sure it

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

2015-07-09 Thread Emil Velikov
On 8 July 2015 at 18:35, Eric Anholt wrote: > Emil Velikov writes: > >> Hello all, >> >> A recent patch by Chris, fixing some libudev fun in our loader, made >> me think if we can clear it up a bit. >> >> Having three different ways of retrieving the vendor/device ID does >> feel a bit excessive.

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

2015-07-08 Thread Axel Davy
On 08/07/2015 00:15, Emil Velikov wrote : Can anyone shed a light/cast their 2c ? Thanks Emil ___ The DRI3/Wayland/Gallium Nine DRI_PRIME path uses libudev, and I'm not sure it could work without. It is based on the ID_PATH_TAG advertised by udev

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

2015-07-08 Thread Eric Anholt
Emil Velikov writes: > Hello all, > > A recent patch by Chris, fixing some libudev fun in our loader, made > me think if we can clear it up a bit. > > Having three different ways of retrieving the vendor/device ID does > feel a bit excessive. Plus as one gets fixed others are likely to > break -

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

2015-07-07 Thread Emil Velikov
Hello all, A recent patch by Chris, fixing some libudev fun in our loader, made me think if we can clear it up a bit. Having three different ways of retrieving the vendor/device ID does feel a bit excessive. Plus as one gets fixed others are likely to break - and they do. So here is a summary of