Re: [PATCH libdrm v2 5/5] xf86drm: implement an OpenBSD specific drmGetDevice2

2018-06-26 Thread Emil Velikov
Hi guys, Above all, yes the current approach looks a bit funky. Given the constrains (cannot use ioctl and libudev) it's rather reasonable. That said, ideas for improvements are always welcome. On 26 June 2018 at 13:03, Mark Kettenis wrote: >> Date: Tue, 26 Jun 2018 20:58:18 +1000 >> From: Jona

Re: [PATCH libdrm v2 5/5] xf86drm: implement an OpenBSD specific drmGetDevice2

2018-06-26 Thread Mark Kettenis
> Date: Tue, 26 Jun 2018 20:58:18 +1000 > From: Jonathan Gray > > On Tue, Jun 26, 2018 at 11:38:20AM +0100, Emil Velikov wrote: > > On 21 June 2018 at 16:32, Jonathan Gray wrote: > > > On Thu, Jun 21, 2018 at 03:24:49PM +0100, Emil Velikov wrote: > > >> Hi Jonathan, > > >> > > >> On 1 December 2

Re: [PATCH libdrm v2 5/5] xf86drm: implement an OpenBSD specific drmGetDevice2

2018-06-26 Thread Jonathan Gray
On Tue, Jun 26, 2018 at 11:38:20AM +0100, Emil Velikov wrote: > On 21 June 2018 at 16:32, Jonathan Gray wrote: > > On Thu, Jun 21, 2018 at 03:24:49PM +0100, Emil Velikov wrote: > >> Hi Jonathan, > >> > >> On 1 December 2016 at 04:18, Jonathan Gray wrote: > >> > >> > --- a/xf86drm.c > >> > +++ b/x

Re: [PATCH libdrm v2 5/5] xf86drm: implement an OpenBSD specific drmGetDevice2

2018-06-26 Thread Emil Velikov
On 21 June 2018 at 16:32, Jonathan Gray wrote: > On Thu, Jun 21, 2018 at 03:24:49PM +0100, Emil Velikov wrote: >> Hi Jonathan, >> >> On 1 December 2016 at 04:18, Jonathan Gray wrote: >> >> > --- a/xf86drm.c >> > +++ b/xf86drm.c >> > @@ -3248,6 +3248,67 @@ drm_device_validate_flags(uint32_t flags)

Re: [PATCH libdrm v2 5/5] xf86drm: implement an OpenBSD specific drmGetDevice2

2018-06-21 Thread Jonathan Gray
On Thu, Jun 21, 2018 at 03:24:49PM +0100, Emil Velikov wrote: > Hi Jonathan, > > On 1 December 2016 at 04:18, Jonathan Gray wrote: > > > --- a/xf86drm.c > > +++ b/xf86drm.c > > @@ -3248,6 +3248,67 @@ drm_device_validate_flags(uint32_t flags) > > */ > > int drmGetDevice2(int fd, uint32_t flags

Re: [PATCH libdrm v2 5/5] xf86drm: implement an OpenBSD specific drmGetDevice2

2018-06-21 Thread Emil Velikov
Hi Jonathan, On 1 December 2016 at 04:18, Jonathan Gray wrote: > --- a/xf86drm.c > +++ b/xf86drm.c > @@ -3248,6 +3248,67 @@ drm_device_validate_flags(uint32_t flags) > */ > int drmGetDevice2(int fd, uint32_t flags, drmDevicePtr *device) > { > +#ifdef __OpenBSD__ > +/* > + * DRI devic

[Mesa-dev] [PATCH libdrm v2 5/5] xf86drm: implement an OpenBSD specific drmGetDevice2

2016-12-07 Thread Emil Velikov
On 6 December 2016 at 05:12, Jonathan Gray wrote: > On Mon, Dec 05, 2016 at 05:56:40PM +, Emil Velikov wrote: >> On 1 December 2016 at 04:18, Jonathan Gray wrote: >> > DRI devices on OpenBSD are not in their own directory. They reside in >> > /dev with a large number of statically generated

[PATCH libdrm v2 5/5] xf86drm: implement an OpenBSD specific drmGetDevice2

2016-12-06 Thread Jonathan Gray
On Mon, Dec 05, 2016 at 05:56:40PM +, Emil Velikov wrote: > On 1 December 2016 at 04:18, Jonathan Gray wrote: > > DRI devices on OpenBSD are not in their own directory. They reside in > > /dev with a large number of statically generated /dev nodes. > > > > Avoid stat'ing all of /dev on OpenBS

[PATCH libdrm v2 5/5] xf86drm: implement an OpenBSD specific drmGetDevice2

2016-12-05 Thread Emil Velikov
On 1 December 2016 at 04:18, Jonathan Gray wrote: > DRI devices on OpenBSD are not in their own directory. They reside in > /dev with a large number of statically generated /dev nodes. > > Avoid stat'ing all of /dev on OpenBSD by implementing this custom path. > > v2: >- use drmGetMinorType t

[PATCH libdrm v2 5/5] xf86drm: implement an OpenBSD specific drmGetDevice2

2016-12-01 Thread Jonathan Gray
DRI devices on OpenBSD are not in their own directory. They reside in /dev with a large number of statically generated /dev nodes. Avoid stat'ing all of /dev on OpenBSD by implementing this custom path. v2: - use drmGetMinorType to get node type - adapt to drmProcessPciDevice changes -