From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id A8EBA10E2CE for ; Wed, 26 Apr 2023 11:52:14 +0000 (UTC) From: Bhanuprakash Modem To: igt-dev@lists.freedesktop.org Date: Wed, 26 Apr 2023 17:16:45 +0530 Message-Id: <20230426114725.2244653-6-bhanuprakash.modem@intel.com> In-Reply-To: <20230426114725.2244653-1-bhanuprakash.modem@intel.com> References: <20230426114725.2244653-1-bhanuprakash.modem@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [i-g-t V3 05/45] lib/drmtest: Add driver enum for i915/xe List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: From: Zbigniew Kempczyński Library code like intel-bb and intel-buf which requires adoption to handle both drivers should store driver on which fd they are working on instead of calling costful is_i915/xe_device() helper. Introduce intel_driver enum which will be used on library code adoption to Xe. Signed-off-by: Zbigniew Kempczyński --- lib/drmtest.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/drmtest.h b/lib/drmtest.h index 5878f6512..3c88b85c6 100644 --- a/lib/drmtest.h +++ b/lib/drmtest.h @@ -62,6 +62,14 @@ */ #define DRIVER_ANY ~(DRIVER_VGEM) +/* + * Compile friendly enum for i915/xe. + */ +enum intel_driver { + INTEL_DRIVER_I915 = 1, + INTEL_DRIVER_XE, +}; + void __set_forced_driver(const char *name); /** -- 2.40.0