Re: [Mesa-dev] [PATCH 8/8] egldevice: implement eglQueryDisplayAttribEXT

2016-07-21 Thread Adam Jackson
On Thu, 2016-07-21 at 16:18 +0100, Daniel Stone wrote: > On 21 July 2016 at 15:11, Emil Velikov wrote: > > I'd suggest opting for the drmDevice libdrm API. It can provide a list > > of devices with all the nodes and other misc info. Thus we could use > > the render/card/other node as any point as

Re: [Mesa-dev] [PATCH 8/8] egldevice: implement eglQueryDisplayAttribEXT

2016-07-21 Thread Daniel Stone
Hi, On 21 July 2016 at 15:11, Emil Velikov wrote: > On 21 July 2016 at 14:57, Adam Jackson wrote: >>> + device_name = drv->QueryDeviceName(disp); >> >> This is /dev/dri/renderD128... >> >>> + mtx_lock(_eglGlobal.Mutex); >>> + >>> + assert(info->got_devices); >>> + >>> + for (dev = info->

Re: [Mesa-dev] [PATCH 8/8] egldevice: implement eglQueryDisplayAttribEXT

2016-07-21 Thread Emil Velikov
On 21 July 2016 at 14:57, Adam Jackson wrote: > On Fri, 2015-07-24 at 16:20 +0200, Jonny Lamb wrote: >> This adds a new vfunc to _EGLDriver, QueryDeviceName, which should >> return a const string of the device name (usually in the format >> '/dev/dri/cardN'). >> >> The EGLDevice could perhaps be c

Re: [Mesa-dev] [PATCH 8/8] egldevice: implement eglQueryDisplayAttribEXT

2016-07-21 Thread Adam Jackson
On Fri, 2015-07-24 at 16:20 +0200, Jonny Lamb wrote: > This adds a new vfunc to _EGLDriver, QueryDeviceName, which should > return a const string of the device name (usually in the format > '/dev/dri/cardN'). > > The EGLDevice could perhaps be cached in the EGLDisplay but there > usually aren't lo

[Mesa-dev] [PATCH 8/8] egldevice: implement eglQueryDisplayAttribEXT

2015-07-24 Thread Jonny Lamb
This adds a new vfunc to _EGLDriver, QueryDeviceName, which should return a const string of the device name (usually in the format '/dev/dri/cardN'). The EGLDevice could perhaps be cached in the EGLDisplay but there usually aren't loads of devices and this lookup isn't particularly costly so leave