[i-g-t V2 30/44] tests/kms_force_connector_basic: Add XE support

Bhanuprakash Modem bhanuprakash.modem at intel.com
Mon Mar 27 16:09:12 UTC 2023


Add XE driver support for kms tests.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 tests/kms_force_connector_basic.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tests/kms_force_connector_basic.c b/tests/kms_force_connector_basic.c
index 4ff1efe3b..72d1a9349 100644
--- a/tests/kms_force_connector_basic.c
+++ b/tests/kms_force_connector_basic.c
@@ -23,6 +23,7 @@
  */
 
 #include "igt.h"
+#include "xe/xe_query.h"
 
 IGT_TEST_DESCRIPTION("Check the debugfs force connector/edid features work"
 		     " correctly.");
@@ -53,7 +54,8 @@ static void reset_connectors(void)
 		drmModeFreeConnector(connector);
 	}
 
-	igt_set_module_param_int(drm_fd, "load_detect_test", 0);
+	if (!is_xe_device(drm_fd))
+		igt_set_module_param_int(drm_fd, "load_detect_test", 0);
 
 	close(drm_fd);
 }
@@ -364,6 +366,9 @@ igt_main_args("", long_opts, help_str, opt_handler, NULL)
 end:
 		/* Reacquire status after clearing any previous overrides. */
 		connector = drmModeGetConnector(drm_fd, connector_id);
+
+		if(is_xe_device(drm_fd))
+			xe_device_get(drm_fd);
 	}
 
 	igt_describe("Test to detect forced load.");
@@ -378,6 +383,8 @@ end:
 
 	igt_fixture {
 		drmModeFreeConnector(connector);
+		if(is_xe_device(drm_fd))
+			xe_device_put(drm_fd);
 		close(drm_fd);
 
 		reset_connectors();
-- 
2.40.0



More information about the Intel-gfx-trybot mailing list