aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov2016-11-30 11:24:21 -0600
committerEmil Velikov2016-12-05 11:21:56 -0600
commit11687bf4180f7e21045ed9c4730533c40fe01ea5 (patch)
treecbd95eb0f513379487252cb13ae553f1bae3bfa0 /xf86drm.h
parentaae3f318d5aca81b87a14360116bb766a51e82ef (diff)
downloadexternal-libdrm-11687bf4180f7e21045ed9c4730533c40fe01ea5.tar.gz
external-libdrm-11687bf4180f7e21045ed9c4730533c40fe01ea5.tar.xz
external-libdrm-11687bf4180f7e21045ed9c4730533c40fe01ea5.zip
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);
801extern int drmGetDevices(drmDevicePtr devices[], int max_devices); 801extern int drmGetDevices(drmDevicePtr devices[], int max_devices);
802extern void drmFreeDevices(drmDevicePtr devices[], int count); 802extern void drmFreeDevices(drmDevicePtr devices[], int count);
803 803
804#define DRM_DEVICE_GET_PCI_REVISION (1 << 0)
805extern int drmGetDevice2(int fd, uint32_t flags, drmDevicePtr *device);
806extern int drmGetDevices2(uint32_t flags, drmDevicePtr devices[], int max_devices);
807
804#if defined(__cplusplus) 808#if defined(__cplusplus)
805} 809}
806#endif 810#endif