[igt-dev] [PATCH i-g-t 2/6] RFC Added is_xe to check if xe device

Kunal Joshi kunal1.joshi at intel.com
Thu Jun 1 05:09:24 UTC 2023


Added is_xe for test to have XE checks

Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
---
 tests/i915/kms_frontbuffer_tracking.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/i915/kms_frontbuffer_tracking.c b/tests/i915/kms_frontbuffer_tracking.c
index c2b99670..3bef46b6 100644
--- a/tests/i915/kms_frontbuffer_tracking.c
+++ b/tests/i915/kms_frontbuffer_tracking.c
@@ -309,6 +309,8 @@ struct {
 	.stop = true,
 };
 
+static bool is_xe;
+
 static drmModeModeInfo *get_connector_smallest_mode(igt_output_t *output)
 {
 	drmModeConnector *c = output->config.connector;
@@ -1341,6 +1343,12 @@ static void setup_drm(void)
 	drm.fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
 	drm.debugfs = igt_debugfs_dir(drm.fd);
 
+	/*
+	 * Test has XE checks as we don't have gem IOCTLS
+	 * on XE used in this test, for now ignore it if XE
+	 */
+	is_xe = is_xe_device(drm.fd);
+
 	kmstest_set_vt_graphics_mode();
 	igt_display_require(&drm.display, drm.fd);
 
-- 
2.25.1



More information about the igt-dev mailing list