summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2018-02-26 10:59:27 +0100
committerThierry Reding <treding@nvidia.com>2018-04-04 16:24:15 +0200
commit77d41722cf1f21577a7f19218d7dec4e8770cc2c (patch)
treea2ee861a13b1d2c8f9457d26f90a396c32694b82
parent89f1f3a5a228c0eab7119147183ceb8a24f8ab84 (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 1e3a3606fed..6fc7f25c7ea 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -120,6 +120,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;