xf86drm: implement drmParseSubsystemType for DragonFly
PATCH 1/2 xf86drm: implement drmParseSubsystemType for DragonFly
Like on OpenBSD, the DragonFly BSD kernel only contains pci drm drivers.
--- xf86drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xf86drm.c +1 -1
@@ -3016,7 +3016,7 @@ static int drmParseSubsystemType(int maj, int min) }return -EINVAL ; -#elif defined(__OpenBSD__) +#elif defined(__OpenBSD__) || defined(__DragonFly__)return DRM_BUS_PCI ;#else #warning "Missing implementation of drmParseSubsystemType"
Signature · 6 lines
2.19.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/2 libdrm: Use DRM_IOCTL_GET_PCIINFO on DragonFly
It is a cleaner and less fragile way to get PCI IDs than the one currently used by local DPorts patches.
--- xf86drm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
xf86drm.c +3 -3
@@ -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;
Signature · 6 lines
2.19.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH libdrm 2/2] libdrm: Use DRM_IOCTL_GET_PCIINFO on DragonFly
Quoted 4 lines · François Tigeot
It is a cleaner and less fragile way to get PCI IDs than the one currently used by local DPorts patches.
Thanks for these François. Props to Ilia for pushing these.
JFYI, once DragonFly gets PCI dynamic power management, the team may want to reconsider the ioctl approach.
Powering off/on the GPU (to issue the ioctl) may take some time, In the odd case the GPU may lock-up :-(
-Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel