xf86drm: introduce drmGetDevice[s]2

Graphics / Mesa 3D Graphics Library / libdrm - Emil Velikov [collabora.com] - 5 December 2016 11:21 UTC

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 Cc: Nicolai Hähnle Cc: Mauro Santos Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98502

11687bf xf86drm: introduce drmGetDevice[s]2
xf86drm.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
xf86drm.h | 4 ++++
2 files changed, 66 insertions(+), 8 deletions(-)

Upstream: cgit.freedesktop.org


  • Share