[PATCH libdrm 2/2] libdrm: Use DRM_IOCTL_GET_PCIINFO on DragonFly
François Tigeot
ftigeot at wolfpond.org
Wed Dec 12 19:48:36 UTC 2018
It is a cleaner and less fragile way to get PCI IDs than the one
currently used by local DPorts patches.
Signed-off-by: François Tigeot <ftigeot at wolfpond.org>
---
xf86drm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/xf86drm.c b/xf86drm.c
index 5ddf9366..6db1ab96 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -101,7 +101,7 @@
#define DRM_MAJOR 226 /* Linux */
#endif
-#ifdef __OpenBSD__
+#if defined(__OpenBSD__) || defined(__DragonFly__)
struct drm_pciinfo {
uint16_t domain;
uint8_t bus;
@@ -3065,7 +3065,7 @@ static int drmParsePciBusInfo(int maj, int min, drmPciBusInfoPtr info)
info->func = func;
return 0;
-#elif defined(__OpenBSD__)
+#elif defined(__OpenBSD__) || defined(__DragonFly__)
struct drm_pciinfo pinfo;
int fd, type;
@@ -3231,7 +3231,7 @@ static int drmParsePciDeviceInfo(int maj, int min,
return parse_config_sysfs_file(maj, min, device);
return 0;
-#elif defined(__OpenBSD__)
+#elif defined(__OpenBSD__) || defined(__DragonFly__)
struct drm_pciinfo pinfo;
int fd, type;
--
2.19.2
More information about the dri-devel
mailing list