diff options
author | Thierry Reding <thierry.reding@gmail.com> | 2016-12-22 00:39:36 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2017-01-20 16:25:53 +0100 |
commit | f8484ccbd12ba33ea5b3895efb7a39d986271be0 (patch) | |
tree | 842d2450df0e3f9751d0c9253f4eab1342e36e89 /xf86drm.h | |
parent | 2e57bba870399926e1a0d0be3f4918a0a8432474 (diff) | |
download | libdrm-f8484ccbd12ba33ea5b3895efb7a39d986271be0.tar.gz libdrm-f8484ccbd12ba33ea5b3895efb7a39d986271be0.tar.bz2 libdrm-f8484ccbd12ba33ea5b3895efb7a39d986271be0.zip |
xf86drm: Add USB support
Allow DRM/KMS devices hosted on USB to be detected by the drmDevice
infrastructure.
v4:
- continue on error to process USB devices
v3:
- guard Linux-specific sysfs parsing code with #ifdef __linux__
v2:
- make sysfs_uevent_get() more flexible using a format string
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'xf86drm.h')
-rw-r--r-- | xf86drm.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -767,6 +767,7 @@ extern char *drmGetPrimaryDeviceNameFromFd(int fd); extern char *drmGetRenderDeviceNameFromFd(int fd); #define DRM_BUS_PCI 0 +#define DRM_BUS_USB 1 typedef struct _drmPciBusInfo { uint16_t domain; @@ -783,15 +784,27 @@ typedef struct _drmPciDeviceInfo { uint8_t revision_id; } drmPciDeviceInfo, *drmPciDeviceInfoPtr; +typedef struct _drmUsbBusInfo { + uint8_t bus; + uint8_t dev; +} drmUsbBusInfo, *drmUsbBusInfoPtr; + +typedef struct _drmUsbDeviceInfo { + uint16_t vendor; + uint16_t product; +} drmUsbDeviceInfo, *drmUsbDeviceInfoPtr; + typedef struct _drmDevice { char **nodes; /* DRM_NODE_MAX sized array */ int available_nodes; /* DRM_NODE_* bitmask */ int bustype; union { drmPciBusInfoPtr pci; + drmUsbBusInfoPtr usb; } businfo; union { drmPciDeviceInfoPtr pci; + drmUsbDeviceInfoPtr usb; } deviceinfo; } drmDevice, *drmDevicePtr; |