OSDN Git Service

xf86drm: introduce drmGetDeviceNameFromFd2
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 10 Nov 2016 17:26:50 +0000 (17:26 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 22 Nov 2016 13:54:23 +0000 (13:54 +0000)
commit37d790f7d449874d0bf199d9ca9871d12b4d599a
tree1522aa7863dc4e8cc9ff02f690978cb88dfcd419
parent7e0bc3bf1c247e1d53733d0e2e2ada52d29b5327
xf86drm: introduce drmGetDeviceNameFromFd2

The original version considered only card devices, while this will pick
the device/node name regardless - card, control, renderD, other...

Current implementation is "linux" specific, in such that it relies on
sysfs/uevent file. At the same time this gives us the flexibility to
support any nodes even future ones, as long as they're within DRM_MAJOR.

Shamelessly copied from mesa, latter by: Gary Wong <gtw@gnu.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
xf86drm.c
xf86drm.h