summaryrefslogtreecommitdiff
path: root/xf86drm.h
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2016-11-30 17:24:21 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2016-12-05 17:21:56 +0000
commit11687bf4180f7e21045ed9c4730533c40fe01ea5 (patch)
treecbd95eb0f513379487252cb13ae553f1bae3bfa0 /xf86drm.h
parentaae3f318d5aca81b87a14360116bb766a51e82ef (diff)
xf86drm: introduce drmGetDevice[s]2
Relative to the original version, here one can provide a flags bitmask. Currently only DRM_DEVICE_IGNORE_PCI_REVISION is supported. Implementation detail: If it's set, we will only parse the separate sysfs files and we won't touch the config one. The latter awakes the device (causing delays) which is the core reason why this API was introduced. v2: - Initialize revision to 0xff if it's unread. - Change DRM_DEVICE_IGNORE_PCI_REVISION to DRM_DEVICE_GET_PCI_REVISION - Add explicit note that drmGetDevice[s]2 does not retrieve the revision by default. v3: - Correctly fold drmParsePciDeviceInfo() hunk in this patch. Cc: Michel Dänzer <michel@daenzer.net> Cc: Nicolai Hähnle <nhaehnle@gmail.com> Cc: Mauro Santos <registo.mailling@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98502 Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'xf86drm.h')
-rw-r--r--xf86drm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/xf86drm.h b/xf86drm.h
index 4da6bd3c..b340fc46 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -801,6 +801,10 @@ extern void drmFreeDevice(drmDevicePtr *device);
extern int drmGetDevices(drmDevicePtr devices[], int max_devices);
extern void drmFreeDevices(drmDevicePtr devices[], int count);
+#define DRM_DEVICE_GET_PCI_REVISION (1 << 0)
+extern int drmGetDevice2(int fd, uint32_t flags, drmDevicePtr *device);
+extern int drmGetDevices2(uint32_t flags, drmDevicePtr devices[], int max_devices);
+
#if defined(__cplusplus)
}
#endif