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 1C81210E821 for ; Tue, 18 Apr 2023 16:50:17 +0000 (UTC) From: Bhanuprakash Modem To: igt-dev@lists.freedesktop.org Date: Tue, 18 Apr 2023 22:14:58 +0530 Message-Id: <20230418164501.1687266-43-bhanuprakash.modem@intel.com> In-Reply-To: <20230418164501.1687266-1-bhanuprakash.modem@intel.com> References: <20230418164501.1687266-1-bhanuprakash.modem@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [i-g-t 42/45] tests/kms_setmode: Add XE support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: Add XE driver support for kms tests. Signed-off-by: Bhanuprakash Modem --- tests/kms_setmode.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c index bfa108916..a611d9382 100644 --- a/tests/kms_setmode.c +++ b/tests/kms_setmode.c @@ -30,6 +30,7 @@ #include #include #include +#include "xe/xe_query.h" #define MAX_CONNECTORS 10 #define MAX_CRTCS 6 @@ -954,6 +955,9 @@ igt_main_args("det:", NULL, help_str, opt_handler, NULL) drm_resources = drmModeGetResources(drm_fd); igt_require(drm_resources); + + if (is_xe_device(drm_fd)) + xe_device_get(drm_fd); } for (i = 0; i < ARRAY_SIZE(tests); i++) { @@ -971,6 +975,9 @@ igt_main_args("det:", NULL, help_str, opt_handler, NULL) igt_fixture { drmModeFreeResources(drm_resources); + if (is_xe_device(drm_fd)) + xe_device_put(drm_fd); + close(drm_fd); } } -- 2.40.0