From patchwork Thu Jan 12 22:04:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 9514275 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E2B3660710 for ; Thu, 12 Jan 2017 22:05:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6458286CB for ; Thu, 12 Jan 2017 22:05:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7B9A28703; Thu, 12 Jan 2017 22:05:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 458BD286CB for ; Thu, 12 Jan 2017 22:05:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 651E66E00F; Thu, 12 Jan 2017 22:04:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 56B836ECD0 for ; Thu, 12 Jan 2017 22:04:40 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id c85so6933013wmi.1 for ; Thu, 12 Jan 2017 14:04:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GYSC0pl+cXp86yy6BIFzjT8v6OJD5AbezRWbDXxtWVE=; b=pnjo2E8gtIuAS6yI7GoMzSum4yDk3hFKMr9tCWfM+LV9V2Ca5CG0uAJWCacggg2WDM ts55O9eQO7rcWIFpKT3tGGuW9wHz6xFZffPO7wZlZDkFAAvgTvi1yQrhsygP8dK5fk17 2TMeL/12Y/glmm6Hu9KKshz+fezF7VuggOteNaai64Mhc+khuZH+E2B13gfGHN/83vnX RvlRAB5D0adbPOHEyi5Fu5ZwzEK2T8XaScov4VJ4yp+qzB8hLDq4WddjIWk7LKpCZL0m ftiNLRha7vPojsNLWhrcd2CRDAjv6wEhm6wi5YFrPrZgazSYdzhUag+oE5D1FPPevavY Jghw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GYSC0pl+cXp86yy6BIFzjT8v6OJD5AbezRWbDXxtWVE=; b=d3Udw/ZYbW3lXNJX/eCJW7BaeEpLQslVpouOoUNkKPsDYPIXAEqzkx77dRiBFnJKR9 XyqsQqL9kkJj2NjvJbrSgvaPe1gUDmyIjXM7PtZedRaseBbddlX6W/rI0B1ANu4GHMWK MgOSShE3VrnBKuUaLqXcd75BYfOzqSYy68hvz1plMPepDhKqQKyRCuTj4SCYZdgC7nQH HC/Uvb9EdRfGJzT4xUlegTC86oGzfhr2KqlDK63t08oIjC4K82mdBTBhWmqWjoiE+dhz DHHAit3gxjna5eN5Uxy+2ePlenSozs/JqDBQv96QxoSJXDTGNEGsQvYpXojDWCPgK/hw PGtQ== X-Gm-Message-State: AIkVDXK2XaUCCrGoIKYfsLyPmEw2GzKTLXPBX57Hhuq4cZK3S9ABapUyXUEv0B+9T2bKcg== X-Received: by 10.223.170.73 with SMTP id q9mr8933665wrd.153.1484258678962; Thu, 12 Jan 2017 14:04:38 -0800 (PST) Received: from localhost (port-6463.pppoe.wtnet.de. [84.46.25.88]) by smtp.gmail.com with ESMTPSA id k11sm5799051wmb.18.2017.01.12.14.04.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Jan 2017 14:04:37 -0800 (PST) From: Thierry Reding To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm v2 4/4] tests/drmdevice: Add USB, platform and host1x support Date: Thu, 12 Jan 2017 23:04:29 +0100 Message-Id: <20170112220429.28139-5-thierry.reding@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170112220429.28139-1-thierry.reding@gmail.com> References: <20170112220429.28139-1-thierry.reding@gmail.com> Cc: xorg-devel@lists.x.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding Extend the drmdevice test with support for the newly added USB, platform and host1x busses. Signed-off-by: Thierry Reding --- 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"); }