[PATCH libdrm v2 4/4] tests/drmdevice: Add USB, platform and host1x support
Thierry Reding
thierry.reding at gmail.com
Thu Jan 12 22:04:29 UTC 2017
From: Thierry Reding <treding at nvidia.com>
Extend the drmdevice test with support for the newly added USB, platform
and host1x busses.
Signed-off-by: Thierry Reding <treding at nvidia.com>
---
tests/drmdevice.c | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/tests/drmdevice.c b/tests/drmdevice.c
index 8c4f091a9972..9dd5098a211f 100644
--- a/tests/drmdevice.c
+++ b/tests/drmdevice.c
@@ -62,6 +62,43 @@ print_device_info(drmDevicePtr device, int i, bool print_revision)
else
printf("\t\t\trevision_id\tIGNORED\n");
+ } else if (device->bustype == DRM_BUS_USB) {
+ printf("\t\tusb\n");
+ printf("\t\t\tbus\t%03u\n", device->businfo.usb->bus);
+ printf("\t\t\tdev\t%03u\n", device->businfo.usb->dev);
+
+ printf("\tdeviceinfo\n");
+ printf("\t\tusb\n");
+ printf("\t\t\tvendor\t%04x\n", device->deviceinfo.usb->vendor);
+ printf("\t\t\tproduct\t%04x\n", device->deviceinfo.usb->product);
+ } else if (device->bustype == DRM_BUS_PLATFORM) {
+ char **compatible = device->deviceinfo.platform->compatible;
+
+ printf("\t\tplatform\n");
+ printf("\t\t\tfullname\t%s\n", device->businfo.platform->fullname);
+
+ printf("\tdeviceinfo\n");
+ printf("\t\tplatform\n");
+ printf("\t\t\tcompatible\n");
+
+ while (*compatible) {
+ printf("\t\t\t\t%s\n", *compatible);
+ compatible++;
+ }
+ } else if (device->bustype == DRM_BUS_HOST1X) {
+ char **compatible = device->deviceinfo.platform->compatible;
+
+ printf("\t\thost1x\n");
+ printf("\t\t\tfullname\t%s\n", device->businfo.host1x->fullname);
+
+ printf("\tdeviceinfo\n");
+ printf("\t\tplatform\n");
+ printf("\t\t\tcompatible\n");
+
+ while (*compatible) {
+ printf("\t\t\t\t%s\n", *compatible);
+ compatible++;
+ }
} else {
printf("Unknown/unhandled bustype\n");
}
--
2.11.0
More information about the xorg-devel
mailing list