From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: xorg-devel-go0+a7rfsptAfugRpC6u6w@public.gmane.org,
Emil Velikov
<emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH libdrm v3 4/5] tests/drmdevice: Add USB, platform and host1x support
Date: Wed, 18 Jan 2017 10:02:08 +0100 [thread overview]
Message-ID: <20170118090209.13819-5-thierry.reding@gmail.com> (raw)
In-Reply-To: <20170118090209.13819-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
From: Thierry Reding <treding@nvidia.com>
Extend the drmdevice test with support for the newly added USB, platform
and host1x busses.
Signed-off-by: Thierry Reding <treding@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
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel
next prev parent reply other threads:[~2017-01-18 9:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-18 9:02 [PATCH libdrm v3 0/5] xf86drm: Add USB, platform and host1x bus support Thierry Reding
2017-01-18 9:02 ` [PATCH libdrm v3 1/5] xf86drm: Factor out drmDeviceAlloc() Thierry Reding
[not found] ` <20170118090209.13819-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-18 9:02 ` [PATCH libdrm v3 2/5] xf86drm: Add USB support Thierry Reding
[not found] ` <587F4FB3.2070006@bfs.de>
2017-01-19 10:20 ` Thierry Reding
[not found] ` <20170119102038.GB30182-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2017-01-21 17:44 ` walter harms
2017-01-18 9:02 ` [PATCH libdrm v3 3/5] xf86drm: Add platform and host1x bus support Thierry Reding
[not found] ` <587F8304.90105@bfs.de>
2017-01-19 10:25 ` Thierry Reding
[not found] ` <20170118090209.13819-4-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-20 14:03 ` Emil Velikov
2017-01-18 9:02 ` Thierry Reding [this message]
2017-01-18 9:02 ` [PATCH libdrm v3 5/5] xf86drm: Reuse sysfs_uevent_get() Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170118090209.13819-5-thierry.reding@gmail.com \
--to=thierry.reding-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=xorg-devel-go0+a7rfsptAfugRpC6u6w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox