diff options
author | Simon Ser <contact@emersion.fr> | 2021-03-01 10:30:57 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-11-19 15:30:30 +0100 |
commit | 57e0b0552e11b3f04e6d5704c1c7efea5f83ffe4 (patch) | |
tree | d4827aaec016044b7a30b9df1ccefa2b08ea52e0 /xf86drm.h | |
parent | dd3d6dd3216f817724238b3f7510b7ace41c9d8e (diff) | |
download | drm-57e0b0552e11b3f04e6d5704c1c7efea5f83ffe4.tar.gz |
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>
Diffstat (limited to 'xf86drm.h')
-rw-r--r-- | xf86drm.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -917,6 +917,8 @@ extern void drmFreeDevices(drmDevicePtr devices[], int count); extern int drmGetDevice2(int fd, uint32_t flags, drmDevicePtr *device); extern int drmGetDevices2(uint32_t flags, drmDevicePtr devices[], int max_devices); +extern int drmGetDeviceFromDevId(dev_t dev_id, uint32_t flags, drmDevicePtr *device); + extern int drmDevicesEqual(drmDevicePtr a, drmDevicePtr b); extern int drmSyncobjCreate(int fd, uint32_t flags, uint32_t *handle); |