summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2018-02-26 10:59:27 +0100
committerThierry Reding <treding@nvidia.com>2019-12-04 12:00:10 +0100
commit7fff211998bc15ee8abb26c8c5dc4baf9dd9762a (patch)
treecd6539fa062689b073cb7118cdc37998aed208fd
parentb0c07c4a58345a67be9abc821583e69a88e11daf (diff)
loader: Add support for USB devices
Allow USB devices to be used as output slaves for PRIME. Note that this currently doesn't work on the X.Org server's built-in modesetting driver because it requires glamor in order to expose the necessary capabilities through RandR. It should be possible to use this in order to accelerate Wayland clients on the GPU, though it's questionable how useful that is without having a compositor that gets accelerated. Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--src/loader/loader.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/loader/loader.c b/src/loader/loader.c
index 9ea8c89c16b..280a60e5b9d 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -231,6 +231,11 @@ static char *drm_construct_id_path_tag(drmDevicePtr device)
device->businfo.pci->func) < 0) {
return NULL;
}
+ } else if (device->bustype == DRM_BUS_USB) {
+ if (asprintf(&tag, "usb-%03u_%03u", device->businfo.usb->bus,
+ device->businfo.usb->dev) < 0) {
+ return NULL;
+ }
} else if (device->bustype == DRM_BUS_PLATFORM ||
device->bustype == DRM_BUS_HOST1X) {
char *fullname, *name, *address;