[PATCH i-g-t] kms_psr2_sf: Add dynamic subtests which use DSC feature

Jouni Högander jouni.hogander at intel.com
Tue Dec 13 16:08:30 UTC 2022


Add mechanism to add coexisting features with selective fetch
and add subtest for DSC as coexisting feature.

Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
---
 tests/i915/kms_psr2_sf.c | 394 ++++++++++++++++++++++++++++-----------
 1 file changed, 285 insertions(+), 109 deletions(-)

diff --git a/tests/i915/kms_psr2_sf.c b/tests/i915/kms_psr2_sf.c
index cfde6cfc..714b1cef 100644
--- a/tests/i915/kms_psr2_sf.c
+++ b/tests/i915/kms_psr2_sf.c
@@ -85,6 +85,13 @@ typedef struct {
 	cairo_t *cr;
 	uint32_t screen_changes;
 	int cur_x, cur_y;
+	bool force_dsc_en_orig;
+	int force_dsc_restore_fd;
+	enum {
+		FEATURE_NONE  = 0,
+		FEATURE_DSC   = 1,
+		FEATURE_COUNT = 2,
+	} coexist_feature;
 } data_t;
 
 static const char *op_str(enum operations op)
@@ -103,6 +110,71 @@ static const char *op_str(enum operations op)
 	return name[op];
 }
 
+static const char *coexist_feature_str(int coexist_feature)
+{
+	switch (coexist_feature) {
+	case FEATURE_NONE:
+		return "";
+	case FEATURE_DSC:
+		return "-dsc";
+	default:
+		igt_assert(false);
+	}
+}
+
+static void force_dsc_enable(data_t *data)
+{
+	int ret;
+
+	igt_debug("Forcing DSC enable on %s\n", data->output->name);
+	ret = igt_force_dsc_enable(data->drm_fd,
+				   data->output->name);
+	igt_assert_f(ret > 0, "debugfs_write failed");
+}
+
+static void save_force_dsc_en(data_t *data)
+{
+	data->force_dsc_en_orig =
+		igt_is_force_dsc_enabled(data->drm_fd,
+					 data->output->name);
+	data->force_dsc_restore_fd =
+		igt_get_dsc_debugfs_fd(data->drm_fd,
+				       data->output->name);
+	igt_assert(data->force_dsc_restore_fd >= 0);
+}
+
+static void restore_force_dsc_en(data_t *data)
+{
+	if (data->force_dsc_restore_fd < 0)
+		return;
+
+	igt_debug("Restoring DSC enable\n");
+	igt_assert(write(data->force_dsc_restore_fd, data->force_dsc_en_orig ? "1" : "0", 1) == 1);
+
+	close(data->force_dsc_restore_fd);
+	data->force_dsc_restore_fd = -1;
+}
+
+static bool check_dsc_on_connector(data_t *data)
+{
+	igt_output_t *output = data->output;
+
+	if (!igt_is_dsc_supported(data->drm_fd, output->name)) {
+		igt_debug("DSC not supported on connector %s\n",
+			  output->name);
+		return false;
+	}
+
+	if (!output_is_internal_panel(output) &&
+	    !igt_is_fec_supported(data->drm_fd, output->name)) {
+		igt_debug("DSC cannot be enabled without FEC on %s\n",
+			  output->name);
+		return false;
+	}
+
+	return true;
+}
+
 static void setup_output(data_t *data)
 {
 	igt_display_t *display = &data->display;
@@ -237,11 +309,16 @@ static void plane_move_setup_square(data_t *data, igt_fb_t *fb, uint32_t h,
 	set_clip(&data->plane_move_clip, x, y, SQUARE_SIZE, SQUARE_SIZE);
 }
 
-static void prepare(data_t *data, igt_output_t *output)
+static void prepare(data_t *data)
 {
 	igt_plane_t *primary, *sprite = NULL, *cursor = NULL;
 	int fb_w, fb_h, x, y, view_w, view_h;
 
+	if (data->coexist_feature & FEATURE_DSC) {
+		save_force_dsc_en(data);
+		force_dsc_enable(data);
+	}
+
 	if (data->big_fb_test) {
 		fb_w = data->big_fb_width;
 		fb_h = data->big_fb_height;
@@ -262,12 +339,12 @@ static void prepare(data_t *data, igt_output_t *output)
 			    0.0, 1.0, 0.0,
 			    &data->fb_primary);
 
-	primary = igt_output_get_plane_type(output,
+	primary = igt_output_get_plane_type(data->output,
 			DRM_PLANE_TYPE_PRIMARY);
 
 	switch (data->test_plane_id) {
 	case DRM_PLANE_TYPE_OVERLAY:
-		sprite = igt_output_get_plane_type(output,
+		sprite = igt_output_get_plane_type(data->output,
 						   DRM_PLANE_TYPE_OVERLAY);
 		/*All blue plane*/
 		igt_create_color_fb(data->drm_fd,
@@ -318,7 +395,7 @@ static void prepare(data_t *data, igt_output_t *output)
 		data->test_plane = primary;
 
 		if (data->op == OVERLAY_PRIM_UPDATE) {
-			sprite = igt_output_get_plane_type(output,
+			sprite = igt_output_get_plane_type(data->output,
 						   DRM_PLANE_TYPE_OVERLAY);
 
 			igt_create_color_fb(data->drm_fd, fb_w, fb_h,
@@ -338,7 +415,7 @@ static void prepare(data_t *data, igt_output_t *output)
 		break;
 
 	case DRM_PLANE_TYPE_CURSOR:
-		cursor = igt_output_get_plane_type(output,
+		cursor = igt_output_get_plane_type(data->output,
 						   DRM_PLANE_TYPE_CURSOR);
 		igt_plane_set_position(cursor, 0, 0);
 
@@ -808,12 +885,12 @@ static void run(data_t *data)
 	}
 }
 
-static void cleanup(data_t *data, igt_output_t *output)
+static void cleanup(data_t *data)
 {
 	igt_plane_t *primary;
 	igt_plane_t *sprite;
 
-	primary = igt_output_get_plane_type(output,
+	primary = igt_output_get_plane_type(data->output,
 					    DRM_PLANE_TYPE_PRIMARY);
 
 	igt_plane_set_fb(primary, NULL);
@@ -824,7 +901,7 @@ static void cleanup(data_t *data, igt_output_t *output)
 	}
 
 	if (data->op == OVERLAY_PRIM_UPDATE) {
-		sprite = igt_output_get_plane_type(output,
+		sprite = igt_output_get_plane_type(data->output,
 				DRM_PLANE_TYPE_OVERLAY);
 		igt_plane_set_position(sprite, 0, 0);
 		igt_plane_set_fb(sprite, NULL);
@@ -836,22 +913,23 @@ static void cleanup(data_t *data, igt_output_t *output)
 	igt_remove_fb(data->drm_fd, &data->fb_overlay);
 	igt_remove_fb(data->drm_fd, &data->fb_cursor);
 	igt_remove_fb(data->drm_fd, &data->fb_test);
+
+	if (data->coexist_feature & FEATURE_DSC)
+		restore_force_dsc_en(data);
 }
 
 static int check_psr2_support(data_t *data, enum pipe pipe)
 {
 	int status;
 
-	igt_output_t *output;
 	igt_display_t *display = &data->display;
 
 	igt_display_reset(display);
-	output = data->output;
-	igt_output_set_pipe(output, pipe);
+	igt_output_set_pipe(data->output, pipe);
 
-	prepare(data, output);
+	prepare(data);
 	status = psr_wait_entry(data->debugfs_fd, PSR_MODE_2);
-	cleanup(data, output);
+	cleanup(data);
 
 	return status;
 }
@@ -860,10 +938,11 @@ igt_main
 {
 	data_t data = {};
 	igt_output_t *outputs[IGT_MAX_PIPES * IGT_MAX_PIPES];
-	int i, j;
+	int i, j, k;
 	enum pipe pipe;
 	int pipes[IGT_MAX_PIPES * IGT_MAX_PIPES];
 	int n_pipes = 0;
+	int coexist_features[IGT_MAX_PIPES * IGT_MAX_PIPES];
 
 	igt_fixture {
 		drmModeResPtr res;
@@ -902,6 +981,12 @@ igt_main
 			if (check_psr2_support(&data, pipe)) {
 				pipes[n_pipes] = pipe;
 				outputs[n_pipes] = data.output;
+
+				coexist_features[n_pipes] = 0;
+
+				if (check_dsc_on_connector(&data))
+					coexist_features[n_pipes] |= FEATURE_DSC;
+
 				n_pipes++;
 			}
 		}
@@ -911,15 +996,22 @@ igt_main
 	igt_describe("Test that selective fetch works on primary plane");
 	igt_subtest_with_dynamic_f("primary-%s-sf-dmg-area", op_str(data.op)) {
 		for (i = 0; i < n_pipes; i++) {
-			igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipes[i]),
-					igt_output_name(outputs[i])) {
-				igt_output_set_pipe(outputs[i], pipes[i]);
-				for (j = 1; j <= MAX_DAMAGE_AREAS; j++) {
-					data.damage_area_count = j;
+			for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
+				if (j != FEATURE_NONE && !(coexist_features[i] & j))
+					continue;
+				igt_dynamic_f("pipe-%s-%s%s", kmstest_pipe_name(pipes[i]),
+					      igt_output_name(outputs[i]),
+					      coexist_feature_str(j)) {
+					igt_output_set_pipe(outputs[i], pipes[i]);
 					data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
-					prepare(&data, outputs[i]);
-					run(&data);
-					cleanup(&data, outputs[i]);
+					data.output = outputs[i];
+					data.coexist_feature = j;
+					for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
+						data.damage_area_count = k;
+						prepare(&data);
+						run(&data);
+						cleanup(&data);
+					}
 				}
 			}
 		}
@@ -930,15 +1022,22 @@ igt_main
 	igt_describe("Test that selective fetch works on primary plane with big fb");
 	igt_subtest_with_dynamic_f("primary-%s-sf-dmg-area-big-fb", op_str(data.op)) {
 		for (i = 0; i < n_pipes; i++) {
-			igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipes[i]),
-					igt_output_name(outputs[i])) {
-				igt_output_set_pipe(outputs[i], pipes[i]);
-				for (j = 1; j <= MAX_DAMAGE_AREAS; j++) {
-					data.damage_area_count = j;
+			for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
+				if (j != FEATURE_NONE && !(coexist_features[i] & j))
+					continue;
+				igt_dynamic_f("pipe-%s-%s%s", kmstest_pipe_name(pipes[i]),
+					      igt_output_name(outputs[i]),
+					      coexist_feature_str(j)) {
+					igt_output_set_pipe(outputs[i], pipes[i]);
 					data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
-					prepare(&data, outputs[i]);
-					run(&data);
-					cleanup(&data, outputs[i]);
+					data.output = outputs[i];
+					data.coexist_feature = j;
+					for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
+						data.damage_area_count = k;
+						prepare(&data);
+						run(&data);
+						cleanup(&data);
+					}
 				}
 			}
 		}
@@ -949,15 +1048,22 @@ igt_main
 	igt_describe("Test that selective fetch works on overlay plane");
 	igt_subtest_with_dynamic_f("overlay-%s-sf-dmg-area", op_str(data.op)) {
 		for (i = 0; i < n_pipes; i++) {
-			igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipes[i]),
-					igt_output_name(outputs[i])) {
-				igt_output_set_pipe(outputs[i], pipes[i]);
-				for (j = 1; j <= MAX_DAMAGE_AREAS; j++) {
-					data.damage_area_count = j;
+			for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
+				if (j != FEATURE_NONE && !(coexist_features[i] & j))
+					continue;
+				igt_dynamic_f("pipe-%s-%s%s", kmstest_pipe_name(pipes[i]),
+					      igt_output_name(outputs[i]),
+					      coexist_feature_str(j)) {
+					igt_output_set_pipe(outputs[i], pipes[i]);
 					data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
-					prepare(&data, outputs[i]);
-					run(&data);
-					cleanup(&data, outputs[i]);
+					data.output = outputs[i];
+					data.coexist_feature = j;
+					for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
+						data.damage_area_count = k;
+						prepare(&data);
+						run(&data);
+						cleanup(&data);
+					}
 				}
 			}
 		}
@@ -968,13 +1074,20 @@ igt_main
 	igt_describe("Test that selective fetch works on cursor plane");
 	igt_subtest_with_dynamic_f("cursor-%s-sf", op_str(data.op)) {
 		for (i = 0; i < n_pipes; i++) {
-			igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipes[i]),
-					igt_output_name(outputs[i])) {
-				igt_output_set_pipe(outputs[i], pipes[i]);
-				data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
-				prepare(&data, outputs[i]);
-				run(&data);
-				cleanup(&data, outputs[i]);
+			for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
+				if (j != FEATURE_NONE && !(coexist_features[i] & j))
+					continue;
+				igt_dynamic_f("pipe-%s-%s%s", kmstest_pipe_name(pipes[i]),
+					      igt_output_name(outputs[i]),
+					      coexist_feature_str(j)) {
+					igt_output_set_pipe(outputs[i], pipes[i]);
+					data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
+					data.output = outputs[i];
+					data.coexist_feature = j;
+					prepare(&data);
+					run(&data);
+					cleanup(&data);
+				}
 			}
 		}
 	}
@@ -983,13 +1096,20 @@ igt_main
 	igt_describe("Test that selective fetch works on moving cursor plane (no update)");
 	igt_subtest_with_dynamic_f("cursor-%s-sf", op_str(data.op)) {
 		for (i = 0; i < n_pipes; i++) {
-			igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipes[i]),
-					igt_output_name(outputs[i])) {
-				igt_output_set_pipe(outputs[i], pipes[i]);
-				data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
-				prepare(&data, outputs[i]);
-				run(&data);
-				cleanup(&data, outputs[i]);
+			for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
+				if (j != FEATURE_NONE && !(coexist_features[i] & j))
+					continue;
+				igt_dynamic_f("pipe-%s-%s%s", kmstest_pipe_name(pipes[i]),
+					      igt_output_name(outputs[i]),
+					      coexist_feature_str(j)) {
+					igt_output_set_pipe(outputs[i], pipes[i]);
+					data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
+					data.output = outputs[i];
+					data.coexist_feature = j;
+					prepare(&data);
+					run(&data);
+					cleanup(&data);
+				}
 			}
 		}
 	}
@@ -998,13 +1118,20 @@ igt_main
 	igt_describe("Test that selective fetch works on moving cursor plane exceeding partially visible area (no update)");
 	igt_subtest_with_dynamic_f("cursor-%s-sf", op_str(data.op)) {
 		for (i = 0; i < n_pipes; i++) {
-			igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipes[i]),
-					igt_output_name(outputs[i])) {
-				igt_output_set_pipe(outputs[i], pipes[i]);
-				data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
-				prepare(&data, outputs[i]);
-				run(&data);
-				cleanup(&data, outputs[i]);
+			for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
+				if (j != FEATURE_NONE && !(coexist_features[i] & j))
+					continue;
+				igt_dynamic_f("pipe-%s-%s%s", kmstest_pipe_name(pipes[i]),
+					      igt_output_name(outputs[i]),
+					      coexist_feature_str(j)) {
+					igt_output_set_pipe(outputs[i], pipes[i]);
+					data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
+					data.output = outputs[i];
+					data.coexist_feature = j;
+					prepare(&data);
+					run(&data);
+					cleanup(&data);
+				}
 			}
 		}
 	}
@@ -1013,13 +1140,20 @@ igt_main
 	igt_describe("Test that selective fetch works on moving cursor plane exceeding fully visible area (no update)");
 	igt_subtest_with_dynamic_f("cursor-%s-sf", op_str(data.op)) {
 		for (i = 0; i < n_pipes; i++) {
-			igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipes[i]),
-					igt_output_name(outputs[i])) {
-				igt_output_set_pipe(outputs[i], pipes[i]);
-				data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
-				prepare(&data, outputs[i]);
-				run(&data);
-				cleanup(&data, outputs[i]);
+			for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
+				if (j != FEATURE_NONE && !(coexist_features[i] & j))
+					continue;
+				igt_dynamic_f("pipe-%s-%s%s", kmstest_pipe_name(pipes[i]),
+					      igt_output_name(outputs[i]),
+					      coexist_feature_str(j)) {
+					igt_output_set_pipe(outputs[i], pipes[i]);
+					data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
+					data.output = outputs[i];
+					data.coexist_feature = j;
+					prepare(&data);
+					run(&data);
+					cleanup(&data);
+				}
 			}
 		}
 	}
@@ -1030,15 +1164,22 @@ igt_main
 	igt_describe("Test that selective fetch works on moving overlay plane");
 	igt_subtest_with_dynamic_f("%s-sf-dmg-area", op_str(data.op)) {
 		for (i = 0; i < n_pipes; i++) {
-			igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipes[i]),
-					igt_output_name(outputs[i])) {
-				igt_output_set_pipe(outputs[i], pipes[i]);
-				for (j = POS_TOP_LEFT; j <= POS_BOTTOM_RIGHT ; j++) {
-					data.pos = j;
+			for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
+				if (j != FEATURE_NONE && !(coexist_features[i] & j))
+					continue;
+				igt_dynamic_f("pipe-%s-%s%s", kmstest_pipe_name(pipes[i]),
+					      igt_output_name(outputs[i]),
+					      coexist_feature_str(j)) {
+					igt_output_set_pipe(outputs[i], pipes[i]);
+					data.output = outputs[i];
 					data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
-					prepare(&data, outputs[i]);
-					run(&data);
-					cleanup(&data, outputs[i]);
+					data.coexist_feature = j;
+					for (k = POS_TOP_LEFT; k <= POS_BOTTOM_RIGHT ; k++) {
+						data.pos = k;
+						prepare(&data);
+						run(&data);
+						cleanup(&data);
+					}
 				}
 			}
 		}
@@ -1048,13 +1189,20 @@ igt_main
 	igt_describe("Test that selective fetch works on moving overlay plane (no update)");
 	igt_subtest_with_dynamic_f("overlay-%s-sf", op_str(data.op)) {
 		for (i = 0; i < n_pipes; i++) {
-			igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipes[i]),
-					igt_output_name(outputs[i])) {
+			for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
+				if (j != FEATURE_NONE && !(coexist_features[i] & j))
+					continue;
+				igt_dynamic_f("pipe-%s-%s%s", kmstest_pipe_name(pipes[i]),
+					      igt_output_name(outputs[i]),
+					      coexist_feature_str(j)) {
 				igt_output_set_pipe(outputs[i], pipes[i]);
 				data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
-				prepare(&data, outputs[i]);
+				data.output = outputs[i];
+				data.coexist_feature = j;
+				prepare(&data);
 				run(&data);
-				cleanup(&data, outputs[i]);
+				cleanup(&data);
+				}
 			}
 		}
 	}
@@ -1063,13 +1211,20 @@ igt_main
 	igt_describe("Test that selective fetch works on moving overlay plane partially exceeding visible area (no update)");
 	igt_subtest_with_dynamic_f("overlay-%s-sf", op_str(data.op)) {
 		for (i = 0; i < n_pipes; i++) {
-			igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipes[i]),
-					igt_output_name(outputs[i])) {
-				igt_output_set_pipe(outputs[i], pipes[i]);
-				data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
-				prepare(&data, outputs[i]);
-				run(&data);
-				cleanup(&data, outputs[i]);
+			for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
+				if (j != FEATURE_NONE && !(coexist_features[i] & j))
+					continue;
+				igt_dynamic_f("pipe-%s-%s%s", kmstest_pipe_name(pipes[i]),
+					      igt_output_name(outputs[i]),
+					      coexist_feature_str(j)) {
+					igt_output_set_pipe(outputs[i], pipes[i]);
+					data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
+					data.output = outputs[i];
+					data.coexist_feature = j;
+					prepare(&data);
+					run(&data);
+					cleanup(&data);
+				}
 			}
 		}
 	}
@@ -1078,13 +1233,20 @@ igt_main
 	igt_describe("Test that selective fetch works on moving overlay plane fully exceeding visible area (no update)");
 	igt_subtest_with_dynamic_f("overlay-%s-sf", op_str(data.op)) {
 		for (i = 0; i < n_pipes; i++) {
-			igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipes[i]),
-					igt_output_name(outputs[i])) {
-				igt_output_set_pipe(outputs[i], pipes[i]);
-				data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
-				prepare(&data, outputs[i]);
-				run(&data);
-				cleanup(&data, outputs[i]);
+			for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
+				if (j != FEATURE_NONE && !(coexist_features[i] & j))
+					continue;
+				igt_dynamic_f("pipe-%s-%s%s", kmstest_pipe_name(pipes[i]),
+					      igt_output_name(outputs[i]),
+					      coexist_feature_str(j)) {
+					igt_output_set_pipe(outputs[i], pipes[i]);
+					data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
+					data.output = outputs[i];
+					data.coexist_feature = j;
+					prepare(&data);
+					run(&data);
+					cleanup(&data);
+				}
 			}
 		}
 	}
@@ -1095,15 +1257,22 @@ igt_main
 		     "with blended overlay plane");
 	igt_subtest_with_dynamic_f("%s-sf-dmg-area", op_str(data.op)) {
 		for (i = 0; i < n_pipes; i++) {
-			igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipes[i]),
-					igt_output_name(outputs[i])) {
-				igt_output_set_pipe(outputs[i], pipes[i]);
-				for (j = 1; j <= MAX_DAMAGE_AREAS; j++) {
-					data.damage_area_count = j;
-					data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
-					prepare(&data, outputs[i]);
-					run(&data);
-					cleanup(&data, outputs[i]);
+			for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
+				if (j != FEATURE_NONE && !(coexist_features[i] & j))
+					continue;
+				igt_dynamic_f("pipe-%s-%s%s", kmstest_pipe_name(pipes[i]),
+					      igt_output_name(outputs[i]),
+					      coexist_feature_str(j)) {
+					igt_output_set_pipe(outputs[i], pipes[i]);
+					for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
+						data.damage_area_count = k;
+						data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+						data.output = outputs[i];
+						data.coexist_feature = j;
+						prepare(&data);
+						run(&data);
+						cleanup(&data);
+					}
 				}
 			}
 		}
@@ -1118,14 +1287,21 @@ igt_main
 	igt_describe("Test that selective fetch works on overlay plane");
 	igt_subtest_with_dynamic_f("overlay-%s-sf", op_str(data.op)) {
 		for (i = 0; i < n_pipes; i++) {
-			igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipes[i]),
-					igt_output_name(outputs[i])) {
-				igt_output_set_pipe(outputs[i], pipes[i]);
-				data.damage_area_count = 1;
-				data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
-				prepare(&data, outputs[i]);
-				run(&data);
-				cleanup(&data, outputs[i]);
+			for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
+				if (j != FEATURE_NONE && !(coexist_features[i] & j))
+					continue;
+				igt_dynamic_f("pipe-%s-%s%s", kmstest_pipe_name(pipes[i]),
+					      igt_output_name(outputs[i]),
+					      coexist_feature_str(j)) {
+					igt_output_set_pipe(outputs[i], pipes[i]);
+					data.damage_area_count = 1;
+					data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
+					data.output = outputs[i];
+					data.coexist_feature = j;
+					prepare(&data);
+					run(&data);
+					cleanup(&data);
+				}
 			}
 		}
 	}
-- 
2.34.1



More information about the Intel-gfx-trybot mailing list