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 1A9E210E816 for ; Tue, 18 Apr 2023 16:50:08 +0000 (UTC) From: Bhanuprakash Modem To: igt-dev@lists.freedesktop.org Date: Tue, 18 Apr 2023 22:14:50 +0530 Message-Id: <20230418164501.1687266-35-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 34/45] tests/kms_hdmi_inject: 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_hdmi_inject.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/kms_hdmi_inject.c b/tests/kms_hdmi_inject.c index b6418faf0..2085d1453 100644 --- a/tests/kms_hdmi_inject.c +++ b/tests/kms_hdmi_inject.c @@ -29,6 +29,7 @@ #include "igt.h" #include "igt_edid.h" #include "igt_eld.h" +#include "xe/xe_query.h" #define HDISPLAY_4K 3840 #define VDISPLAY_4K 2160 @@ -83,7 +84,7 @@ hdmi_inject_4k(int drm_fd, drmModeConnector *connector) struct igt_fb fb; uint8_t found_4k_mode = 0; - if (is_i915_device(drm_fd)) { + if (is_intel_device(drm_fd)) { uint32_t devid = intel_get_drm_devid(drm_fd); /* 4K requires at least HSW */ @@ -205,6 +206,9 @@ igt_main igt_require(connector); kmstest_unset_all_crtcs(drm_fd, res); + + if (is_xe_device(drm_fd)) + xe_device_get(drm_fd); } igt_describe("Make sure that 4K modes exposed by DRM match the " @@ -219,6 +223,10 @@ igt_main igt_fixture { drmModeFreeConnector(connector); + + if (is_xe_device(drm_fd)) + xe_device_put(drm_fd); + close(drm_fd); } } -- 2.40.0