From patchwork Wed Sep 5 18:00:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10589237 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9272114E0 for ; Wed, 5 Sep 2018 18:00:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A27A2A893 for ; Wed, 5 Sep 2018 18:00:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86D472A819; Wed, 5 Sep 2018 18:00:42 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 424042A8C8 for ; Wed, 5 Sep 2018 18:00:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 152746E522; Wed, 5 Sep 2018 18:00:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kmu-office.ch (mail.kmu-office.ch [IPv6:2a02:418:6a02::a2]) by gabe.freedesktop.org (Postfix) with ESMTPS id 356776E521 for ; Wed, 5 Sep 2018 18:00:37 +0000 (UTC) Received: from trochilidae.toradex.int (75-146-58-181-Washington.hfc.comcastbusiness.net [75.146.58.181]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 4B58D5C00FA; Wed, 5 Sep 2018 20:00:35 +0200 (CEST) From: Stefan Agner To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 2/2] modeprint: print encoder type Date: Wed, 5 Sep 2018 11:00:21 -0700 Message-Id: <20180905180025.13282-4-stefan@agner.ch> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180905180025.13282-1-stefan@agner.ch> References: <20180905180025.13282-1-stefan@agner.ch> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 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 Print encoder types similar to connector types. Signed-off-by: Stefan Agner --- tests/modeprint/modeprint.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/modeprint/modeprint.c b/tests/modeprint/modeprint.c index 1d62270f..ad727e12 100644 --- a/tests/modeprint/modeprint.c +++ b/tests/modeprint/modeprint.c @@ -186,7 +186,13 @@ static int printConnector(int fd, drmModeResPtr res, drmModeConnectorPtr connect static int printEncoder(int fd, drmModeResPtr res, drmModeEncoderPtr encoder, uint32_t id) { - printf("Encoder\n"); + const char *encoder_name; + + encoder_name = util_lookup_encoder_type_name(encoder->encoder_type); + if (encoder_name) + printf("Encoder: %s\n", encoder_name); + else + printf("Encoder\n"); printf("\tid :%i\n", id); printf("\tcrtc_id :%d\n", encoder->crtc_id); printf("\ttype :%d\n", encoder->encoder_type);