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

Emil Velikov emil.l.velikov at gmail.com
Wed Nov 30 16:32:14 UTC 2016


On 30 November 2016 at 00:00, Jonathan Gray <jsg at jsg.id.au> wrote:
> On Tue, Nov 29, 2016 at 08:03:58PM +0000, Emil Velikov wrote:
>> On 26 November 2016 at 00:40, Jonathan Gray <jsg at jsg.id.au> wrote:
>> > This avoids walking all of /dev and directly maps the fd to a path to a
>> > primary node.
>> >
>> I realise that the code is pretty ugly/bad/etc, but I would stay way
>> from similar optimisations. As-is it will just work as you guys get
>> support for render nodes/other.
>> That is unless things are noticeably slow [or bad in general].
>>
>> Thanks
>> Emil
>
> /dev/ has 1200 files on a machine here, drm nodes aren't in a drm
> specific directory as on linux.
Eeek ...1200, there's only ~160 over here.

Is it against OpenBSD policy/philosophy to nest things (using
sub-folders), a matter of carefully updating this to avoid breakage
(shortage to time/manpower), or it's mostly a matter of personal taste
?

Regardless of the reason, please include your comment in the code.
Also please mention that this works only for card nodes.
And don't forget the (dummy) drmParseSubsystemType call.

Thanks
Emil


More information about the dri-devel mailing list