xf86drm: add drmGetDeviceFromDevId
authorSimon Ser <contact@emersion.fr>
Mon, 1 Mar 2021 09:30:57 +0000 (10:30 +0100)
committerSimon Ser <contact@emersion.fr>
Fri, 19 Nov 2021 14:30:30 +0000 (15:30 +0100)
commit57e0b0552e11b3f04e6d5704c1c7efea5f83ffe4
treed4827aaec016044b7a30b9df1ccefa2b08ea52e0
parentdd3d6dd3216f817724238b3f7510b7ace41c9d8e
xf86drm: add drmGetDeviceFromDevId

This adds a function to get a drmDevicePtr from a dev_t identifier
of a device. This is useful for Wayland that uses these to identify
devices over the protocol.

This is done by taking the implementation of drmGetDevice2, and removing
the call to fstat to find the dev_t.

Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Daniel Stone <daniels@collabora.com>
core-symbols.txt
xf86drm.c
xf86drm.h