From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by gabe.freedesktop.org (Postfix) with ESMTPS id 777FA10E562 for ; Thu, 19 Oct 2023 21:23:24 +0000 (UTC) From: Harry Wentland To: Date: Thu, 19 Oct 2023 17:22:54 -0400 Message-ID: <20231019212301.245282-2-harry.wentland@amd.com> In-Reply-To: <20231019212301.245282-1-harry.wentland@amd.com> References: <20231019212301.245282-1-harry.wentland@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Subject: [igt-dev] [RFC PATCH v2 1/8] lib/drmtest: Add is_vkms_device() List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sasha McIntosh , Liviu Dudau , Victoria Brekenfeld , =?UTF-8?q?Michel=20D=C3=A4nzer?= , Sebastian Wick , Shashank Sharma , Christopher Braga , =?UTF-8?q?Jonas=20=C3=85dahl?= , Naseer Ahmed , Aleix Pol , Alexander Goins , Pekka Paalanen , Simon Ser , Hector Martin , Xaver Hugl , Sima , Joshua Ashton Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: Signed-off-by: Harry Wentland Cc: Ville Syrjala Cc: Pekka Paalanen Cc: Simon Ser Cc: Harry Wentland Cc: Melissa Wen Cc: Jonas Ådahl Cc: Sebastian Wick Cc: Shashank Sharma Cc: Alexander Goins Cc: Joshua Ashton Cc: Michel Dänzer Cc: Aleix Pol Cc: Xaver Hugl Cc: Victoria Brekenfeld Cc: Sima Cc: Uma Shankar Cc: Naseer Ahmed Cc: Christopher Braga Cc: Abhinav Kumar Cc: Arthur Grillo Cc: Hector Martin Cc: Liviu Dudau Cc: Sasha McIntosh --- lib/drmtest.c | 5 +++++ lib/drmtest.h | 1 + 2 files changed, 6 insertions(+) diff --git a/lib/drmtest.c b/lib/drmtest.c index e1da66c877e9..7ffd238bf499 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -106,6 +106,11 @@ static bool __is_device(int fd, const char *expect) return strcmp(expect, name) == 0; } +bool is_vkms_device(int fd) +{ + return __is_device(fd, "vkms"); +} + bool is_amdgpu_device(int fd) { return __is_device(fd, "amdgpu"); diff --git a/lib/drmtest.h b/lib/drmtest.h index 97ab6e759edf..eab8bc0b591f 100644 --- a/lib/drmtest.h +++ b/lib/drmtest.h @@ -116,6 +116,7 @@ void igt_require_nouveau(int fd); void igt_require_vc4(int fd); void igt_require_xe(int fd); +bool is_vkms_device(int fd); bool is_amdgpu_device(int fd); bool is_i915_device(int fd); bool is_mtk_device(int fd); -- 2.42.0