From patchwork Mon Jul 8 09:35:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Yan X-Patchwork-Id: 13726330 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E3BCCC3271E for ; Mon, 8 Jul 2024 09:35:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 55A1210E11B; Mon, 8 Jul 2024 09:35:22 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=163.com header.i=@163.com header.b="YnGjuv4H"; dkim-atps=neutral X-Greylist: delayed 6493 seconds by postgrey-1.36 at gabe; Mon, 08 Jul 2024 09:35:20 UTC Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.3]) by gabe.freedesktop.org (Postfix) with ESMTP id 9B50610E11B for ; Mon, 8 Jul 2024 09:35:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=2It8D mTGwndGT82w+4INHMD+j/7m75zAYwqpz4U8ZAI=; b=YnGjuv4HLXm0JU2HHEawW fKXbjMKD4nTiuiGXSGlZRD1v5jTyA/MOTLlRlev+8bwE9jbyAF84VBPE0GGkqHzN bKbbF2N0WGyQ6BmVYYEpFWl30Pf2O/5LJBeuwx33wuWp54BGZrfHGnKT5iOaaUKd PLI92HoqrYiK3+BxM2IYoY= Received: from ProDesk.. (unknown [58.22.7.114]) by gzga-smtp-mta-g2-3 (Coremail) with SMTP id _____wDX32rOsotmxHmWBw--.63198S2; Mon, 08 Jul 2024 17:35:14 +0800 (CST) From: Andy Yan To: dri-devel@lists.freedesktop.org Cc: Andy Yan Subject: [PATCH libdrm] modtest: print libdrm version Date: Mon, 8 Jul 2024 17:35:08 +0800 Message-Id: <20240708093508.3908098-1-andyshrk@163.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CM-TRANSID: _____wDX32rOsotmxHmWBw--.63198S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7GFW5CrW8Zw48Jry3Zr48Xrb_yoWkWwcEg3 42vrn7GF43Ar1UAFWjvwsrZrWjkw48ZF1furn7JFW3Ja4jgr1qgFn7CF98Way29rW3ZFW3 tayDJry8Cr42kjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUU3kuDUUUUU== X-Originating-IP: [58.22.7.114] X-CM-SenderInfo: 5dqg52xkunqiywtou0bp/xtbB0hIWXmWXy3kH8gAAs9 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Andy Yan Signed-off-by: Andy Yan --- meson.build | 1 + tests/modetest/modetest.c | 1 + 2 files changed, 2 insertions(+) diff --git a/meson.build b/meson.build index 8fd0a196..fab61e09 100644 --- a/meson.build +++ b/meson.build @@ -45,6 +45,7 @@ dep_threads = dependency('threads') cc = meson.get_compiler('c') android = cc.compiles('''int func() { return __ANDROID__; }''') +add_global_arguments('-DLIBDRM_VERSION="@0@"'.format(meson.project_version()), language : 'c') # Solaris / Illumos if host_machine.system() == 'sunos' diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index d9e761e6..8cfc7e08 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -2129,6 +2129,7 @@ static void parse_fill_patterns(char *arg) static void usage(char *name) { fprintf(stderr, "usage: %s [-acDdefMoPpsCvrw]\n", name); + fprintf(stderr, "libdrm version: %s\n", LIBDRM_VERSION); fprintf(stderr, "\n Query options:\n\n"); fprintf(stderr, "\t-c\tlist connectors\n");