summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2018-02-26 10:59:27 +0100
committerThierry Reding <treding@nvidia.com>2019-08-23 18:07:25 +0200
commitfb7749896747308dea6c21315d7f252c9e6fa3d9 (patch)
treea9dcc4b1fa703db98186e72267266498ee2ed86a
parent91917ea67c253e1c85cd55645347d9fc84d8f98b (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 787702c73525..253827a40445 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -227,6 +227,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;