[PATCH i-g-t v3 9/9] XE3: tests/intel/kms_frontbuffer_tracking: platform based handling of x-tile cases

Clint Taylor clinton.a.taylor at intel.com
Thu Nov 14 19:03:39 UTC 2024


From: Vinod Govindapillai <vinod.govindapillai at intel.com>

x-tile is not supported from xe3 onwards. Handle this conclusively
in all the kms_frontbuffer_tracking subtest options.

Signed-off-by: Vinod Govindapillai <vinod.govindapillai at intel.com>
Signed-off-by: Clint Taylor <Clinton.A.Taylor at intel.com>
---
 tests/intel/kms_frontbuffer_tracking.c | 31 ++++++++++----------------
 1 file changed, 12 insertions(+), 19 deletions(-)

diff --git a/tests/intel/kms_frontbuffer_tracking.c b/tests/intel/kms_frontbuffer_tracking.c
index 8af41caf3..8ceb7b860 100644
--- a/tests/intel/kms_frontbuffer_tracking.c
+++ b/tests/intel/kms_frontbuffer_tracking.c
@@ -1271,7 +1271,7 @@ struct test_mode {
 		TILING_Y,
 		TILING_4,
 		TILING_COUNT,
-		TILING_DEFAULT = TILING_X,
+		TILING_AUTOSELECT,
 	} tiling;
 
 	enum igt_draw_method method;
@@ -1394,7 +1394,7 @@ struct {
 	.only_pipes = PIPE_COUNT,
 	.shared_fb_x_offset = 248,
 	.shared_fb_y_offset = 500,
-	.tiling = TILING_DEFAULT,
+	.tiling = TILING_AUTOSELECT,
 };
 
 struct modeset_params {
@@ -2421,12 +2421,7 @@ static void setup_modeset(void)
 	offscreen_fb.fb = NULL;
 	offscreen_fb.w = 1024;
 	offscreen_fb.h = 1024;
-
-	/* Xe3 remove x-tile from display + */
-	if (drm.display_ver <= 20)
-		create_fbs(FORMAT_DEFAULT, opt.tiling);
-	else
-		create_fbs(FORMAT_DEFAULT, TILING_4);
+	create_fbs(FORMAT_DEFAULT, opt.tiling);
 }
 
 static void teardown_modeset(void)
@@ -4476,6 +4471,14 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		setup_drm();
 		drm.devid = intel_get_drm_devid(drm.fd);
 		drm.display_ver = intel_display_ver(drm.devid);
+
+		/* TILING_X is not supported from Xe3 onwards. If the tiling
+		 * is not set explicitly using the commandline parameter,
+		 * handle the default tiling based on the platform.
+		 */
+		if (opt.tiling == TILING_AUTOSELECT)
+			opt.tiling = drm.display_ver >= 30 ? TILING_4 : TILING_X;
+
 		setup_environment();
 	}
 
@@ -4780,11 +4783,6 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 					if (t.tiling == TILING_4)
 						igt_require(intel_get_device_info(drm.devid)->has_4tile);
 
-					/* Xe3 remove x-tile from display + */
-					if (t.tiling == TILING_X) {
-						igt_require(drm.display_ver <= 20);
-					}
-
 					if (tiling_is_valid(t.feature, t.tiling))
 						draw_subtest(&t);
 					else
@@ -4816,12 +4814,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 	t.format = FORMAT_DEFAULT;
 	t.flip = FLIP_PAGEFLIP;
 	t.method = IGT_DRAW_BLT;
-
-	/* Xe3 remove x-tile from display + */
-	if (drm.display_ver <= 20)
-		t.tiling = opt.tiling;
-	else
-		t.tiling = TILING_4;
+	t.tiling = opt.tiling;
 
 	igt_subtest("basic") {
 		if (!is_xe_device(drm.fd))
-- 
2.25.1



More information about the igt-dev mailing list