xf86drm: implement an OpenBSD specific drmGetDevice2
authorJonathan Gray <jsg@jsg.id.au>
Thu, 1 Dec 2016 04:18:43 +0000 (15:18 +1100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 5 Dec 2016 17:53:11 +0000 (17:53 +0000)
commit08257927231e4f51c38e1d2bdbb8db0c2d4aec40
tree536b6251b077815068de2a861758c3e4878de2a9
parentfd190564daa4cd530833a94606646730a5c0ee6c
xf86drm: implement an OpenBSD specific drmGetDevice2

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
   - verify drmParseSubsystemType type is PCI
   - add a comment describing why this was added

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
xf86drm.c