From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7807F10EC5E for ; Fri, 28 Apr 2023 06:13:08 +0000 (UTC) From: Bhanuprakash Modem To: igt-dev@lists.freedesktop.org Date: Fri, 28 Apr 2023 11:37:37 +0530 Message-Id: <20230428060818.2446308-6-bhanuprakash.modem@intel.com> In-Reply-To: <20230428060818.2446308-1-bhanuprakash.modem@intel.com> References: <20230428060818.2446308-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 V4 05/46] 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