[PATCH i-g-t] tests/intel/kms_psr2_sf: Modify kms_psr2_sf test

Pranay Samala pranay.samala at intel.com
Tue Aug 20 17:10:47 UTC 2024


In the current kms_psr2_sf tests, we identify PSR/PR/PR-SF dynamically.
This patch converts the test structure to execute on PSR/PR/PR-SF
at subtest level.

Signed-off-by: Pranay Samala <pranay.samala at intel.com>
---
 tests/intel/kms_psr2_sf.c | 242 +++++++++++++++++++++++++++-----------
 1 file changed, 171 insertions(+), 71 deletions(-)

diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
index 03ff1cddb..0c58cb37b 100644
--- a/tests/intel/kms_psr2_sf.c
+++ b/tests/intel/kms_psr2_sf.c
@@ -44,11 +44,20 @@
 #include <string.h>
 
 /**
- * SUBTEST: %s-plane-move-continuous-%s
+ * SUBTEST: psr2-%s-plane-move-continuous-%s
  * Description: Test that selective fetch works on moving %arg[1] plane %arg[2]
  *              visible area (no update)
  *
- * SUBTEST: fbc-%s-plane-move-continuous-%s
+ * SUBTEST: pr-%s-plane-move-continuous-%s
+ * Description: Test that selective fetch works on moving %arg[1] plane %arg[2]
+ *              visible area (no update)
+ *
+ * SUBTEST: fbc-psr2-%s-plane-move-continuous-%s
+ * Description: Test that fbc with selective fetch works on moving %arg[1] plane %arg[2]
+ *              visible area (no update)
+ * Functionality: plane, psr2, selective_fetch, fbc
+ *
+ * SUBTEST: fbc-pr-%s-plane-move-continuous-%s
  * Description: Test that fbc with selective fetch works on moving %arg[1] plane %arg[2]
  *              visible area (no update)
  * Functionality: plane, psr2, selective_fetch, fbc
@@ -66,51 +75,98 @@
  */
 
 /**
- * SUBTEST: cursor-plane-update-sf
+ * SUBTEST: psr2-cursor-plane-update-sf
  * Description: Test that selective fetch works on cursor plane
  *
- * SUBTEST: fbc-cursor-plane-update-sf
+ * SUBTEST: pr-cursor-plane-update-sf
+ * Description: Test that selective fetch works on cursor plane
+ *
+ * SUBTEST: fbc-psr2-cursor-plane-update-sf
+ * Description: Test that fbc with selective fetch works on cursor plane
+ * Functionality: plane, psr2, selective_fetch, fbc
+ *
+ * SUBTEST: fbc-pr-cursor-plane-update-sf
  * Description: Test that fbc with selective fetch works on cursor plane
  * Functionality: plane, psr2, selective_fetch, fbc
  *
- * SUBTEST: overlay-plane-update-continuous-sf
+ * SUBTEST: psr2-overlay-plane-update-continuous-sf
  * Description: Test that selective fetch works on overlay plane
  *
- * SUBTEST: fbc-overlay-plane-update-sf-dmg-area
+ * SUBTEST: pr-overlay-plane-update-continuous-sf
+ * Description: Test that selective fetch works on overlay plane
+ *
+ * SUBTEST: fbc-psr2-overlay-plane-update-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on overlay plane
+ * Functionality: plane, psr2, selective_fetch, fbc
+ *
+ * SUBTEST: fbc-pr-overlay-plane-update-sf-dmg-area
  * Description: Test that fbc with selective fetch works on overlay plane
  * Functionality: plane, psr2, selective_fetch, fbc
  *
- * SUBTEST: overlay-plane-update-sf-dmg-area
+ * SUBTEST: psr2-overlay-plane-update-sf-dmg-area
+ * Description: Test that selective fetch works on overlay plane
+ *
+ * SUBTEST: pr-overlay-plane-update-sf-dmg-area
  * Description: Test that selective fetch works on overlay plane
  *
- * SUBTEST: fbc-overlay-plane-update-continuous-sf
+ * SUBTEST: fbc-psr2-overlay-plane-update-continuous-sf
  * Description: Test that fbc with selective fetch works on overlay plane
  * Functionality: plane, psr2, selective_fetch, fbc
  *
- * SUBTEST: overlay-primary-update-sf-dmg-area
+ * SUBTEST: fbc-pr-overlay-plane-update-continuous-sf
+ * Description: Test that fbc with selective fetch works on overlay plane
+ * Functionality: plane, psr2, selective_fetch, fbc
+ *
+ * SUBTEST: psr2-overlay-primary-update-sf-dmg-area
+ * Description: Test that selective fetch works on primary plane with blended
+ *              overlay plane
+ *
+ * SUBTEST: pr-overlay-primary-update-sf-dmg-area
  * Description: Test that selective fetch works on primary plane with blended
  *              overlay plane
  *
- * SUBTEST: fbc-overlay-primary-update-sf-dmg-area
+ * SUBTEST: fbc-psr2-overlay-primary-update-sf-dmg-area
  * Description: Test that fbc with selective fetch works on primary plane with blended
  *              overlay plane
  * Functionality: plane, psr2, selective_fetch, fbc
  *
- * SUBTEST: plane-move-sf-dmg-area
+ * SUBTEST: fbc-pr-overlay-primary-update-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on primary plane with blended
+ *              overlay plane
+ * Functionality: plane, psr2, selective_fetch, fbc
+ *
+ * SUBTEST: psr2-plane-move-sf-dmg-area
+ * Description: Test that selective fetch works on moving overlay plane
+ *
+ * SUBTEST: pr-plane-move-sf-dmg-area
  * Description: Test that selective fetch works on moving overlay plane
  *
- * SUBTEST: fbc-plane-move-sf-dmg-area
+ * SUBTEST: fbc-psr2-plane-move-sf-dmg-area
  * Description: Test that fbc with selective fetch works on moving overlay plane
  * Functionality: plane, psr2, selective_fetch, fbc
  *
- * SUBTEST: primary-plane-update-sf-dmg-area
+ * SUBTEST: fbc-pr-plane-move-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on moving overlay plane
+ * Functionality: plane, psr2, selective_fetch, fbc
+ *
+ * SUBTEST: psr2-primary-plane-update-sf-dmg-area
  * Description: Test that selective fetch works on primary plane
  *
- * SUBTEST: fbc-primary-plane-update-sf-dmg-area
+ * SUBTEST: pr-primary-plane-update-sf-dmg-area
+ * Description: Test that selective fetch works on primary plane
+ *
+ * SUBTEST: fbc-psr2-primary-plane-update-sf-dmg-area
+ * Description: Test that fbc with selective fetch works on primary plane
+ * Functionality: plane, psr2, selective_fetch, fbc
+ *
+ * SUBTEST: fbc-pr-primary-plane-update-sf-dmg-area
  * Description: Test that fbc with selective fetch works on primary plane
  * Functionality: plane, psr2, selective_fetch, fbc
  *
- * SUBTEST: primary-plane-update-sf-dmg-area-big-fb
+ * SUBTEST: psr2-primary-plane-update-sf-dmg-area-big-fb
+ * Description: Test that selective fetch works on primary plane with big fb
+ *
+ * SUBTEST: pr-primary-plane-update-sf-dmg-area-big-fb
  * Description: Test that selective fetch works on primary plane with big fb
  */
 
@@ -1045,13 +1101,21 @@ pipe_output_combo_valid(igt_display_t *display,
 	return ret;
 }
 
+static bool check_psr_mode_supported(data_t *data, int psr_stat)
+{
+	if (data->psr_mode == psr_stat)
+		return true;
+	else
+		return false;
+}
+
 igt_main
 {
 	bool output_supports_pr_psr2_sel_fetch = false;
 	bool pr_psr2_sel_fetch_supported = false;
 	data_t data = {};
 	igt_output_t *outputs[IGT_MAX_PIPES * IGT_MAX_PIPES];
-	int i, j, k, y;
+	int i, j, k, y, z;
 	int pipes[IGT_MAX_PIPES * IGT_MAX_PIPES];
 	int n_pipes = 0;
 	int coexist_features[IGT_MAX_PIPES * IGT_MAX_PIPES];
@@ -1061,6 +1125,12 @@ igt_main
 	};
 	int fbc_status[] = {FBC_DISABLED, FBC_ENABLED};
 
+	const char *append_psr_subtest[2] = {
+		"psr2-",
+		"pr-"
+	};
+	int psr_status[] = {PSR_MODE_2, PR_MODE_SEL_FETCH};
+
 	igt_fixture {
 		drmModeResPtr res;
 
@@ -1103,15 +1173,18 @@ igt_main
 	}
 
 	for (y = 0; y < ARRAY_SIZE(fbc_status); y++) {
+		for (z = 0; z < ARRAY_SIZE(psr_status); z++) {
 		data.op = PLANE_UPDATE;
 		data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
 		data.primary_format = DRM_FORMAT_XRGB8888;
 		data.big_fb_test = 0;
 
 		data.op_fbc_mode = fbc_status[y];
+		data.psr_mode = psr_status[z];
 		/* Verify primary plane selective fetch */
 		igt_describe("Test that selective fetch works on primary plane");
-		igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area", append_fbc_subtest[y],
+		igt_subtest_with_dynamic_f("%s%sprimary-%s-sf-dmg-area", append_fbc_subtest[y],
+					   append_psr_subtest[z],
 					   op_str(data.op)) {
 			for (i = 0; i < n_pipes; i++) {
 				if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
@@ -1121,11 +1194,14 @@ igt_main
 				igt_assert_f(set_sel_fetch_mode_for_output(&data),
 							 "Selective fetch is not supported\n");
 
+				if (!check_psr_mode_supported(&data, psr_status[z]))
+					continue;
+
 				for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
 					if (j != FEATURE_NONE && !(coexist_features[i] & j))
 						continue;
-					igt_dynamic_f("%s-pipe-%s-%s%s", get_psr_mode_str_for_output(&data),
-							  kmstest_pipe_name(pipes[i]),
+					igt_dynamic_f("pipe-%s-%s%s",
+						      kmstest_pipe_name(pipes[i]),
 						      igt_output_name(outputs[i]),
 						      coexist_feature_str(j)) {
 						data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
@@ -1146,8 +1222,10 @@ igt_main
 			data.big_fb_test = 1;
 			igt_describe("Test that selective fetch works on primary plane with "
 				     "big fb");
-			igt_subtest_with_dynamic_f("%sprimary-%s-sf-dmg-area-big-fb",
-						   append_fbc_subtest[y], op_str(data.op)) {
+			igt_subtest_with_dynamic_f("%s%sprimary-%s-sf-dmg-area-big-fb",
+						   append_fbc_subtest[y],
+						   append_psr_subtest[z],
+						   op_str(data.op)) {
 				for (i = 0; i < n_pipes; i++) {
 					if (!pipe_output_combo_valid(&data.display, pipes[i],
 								     outputs[i]))
@@ -1156,12 +1234,13 @@ igt_main
 					data.output = outputs[i];
 					igt_assert_f(set_sel_fetch_mode_for_output(&data),
 								 "Selective fetch is not supported\n");
+					if (!check_psr_mode_supported(&data, psr_status[z]))
+						continue;
 
 					for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
 						if (j != FEATURE_NONE && !(coexist_features[i] & j))
 							continue;
-						igt_dynamic_f("%s-pipe-%s-%s%s",
-								  get_psr_mode_str_for_output(&data),
+						igt_dynamic_f("pipe-%s-%s%s",
 							      kmstest_pipe_name(pipes[i]),
 							      igt_output_name(outputs[i]),
 							      coexist_feature_str(j)) {
@@ -1183,8 +1262,8 @@ igt_main
 		data.big_fb_test = 0;
 		/* Verify overlay plane selective fetch */
 		igt_describe("Test that selective fetch works on overlay plane");
-		igt_subtest_with_dynamic_f("%soverlay-%s-sf-dmg-area", append_fbc_subtest[y],
-					   op_str(data.op)) {
+		igt_subtest_with_dynamic_f("%s%soverlay-%s-sf-dmg-area", append_fbc_subtest[y],
+					   append_psr_subtest[z], op_str(data.op)) {
 			for (i = 0; i < n_pipes; i++) {
 				if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
 					continue;
@@ -1192,12 +1271,14 @@ igt_main
 				data.output = outputs[i];
 				igt_assert_f(set_sel_fetch_mode_for_output(&data),
 							 "Selective fetch is not supported\n");
+				if (!check_psr_mode_supported(&data, psr_status[z]))
+					continue;
 
 				for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
 					if (j != FEATURE_NONE && !(coexist_features[i] & j))
 						continue;
-					igt_dynamic_f("%s-pipe-%s-%s%s", get_psr_mode_str_for_output(&data),
-							  kmstest_pipe_name(pipes[i]),
+					igt_dynamic_f("pipe-%s-%s%s",
+						      kmstest_pipe_name(pipes[i]),
 						      igt_output_name(outputs[i]),
 						      coexist_feature_str(j)) {
 						data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
@@ -1217,8 +1298,8 @@ igt_main
 		data.damage_area_count = 1;
 		/* Verify cursor plane selective fetch */
 		igt_describe("Test that selective fetch works on cursor plane");
-		igt_subtest_with_dynamic_f("%scursor-%s-sf", append_fbc_subtest[y],
-					   op_str(data.op)) {
+		igt_subtest_with_dynamic_f("%s%scursor-%s-sf", append_fbc_subtest[y],
+					   append_psr_subtest[z], op_str(data.op)) {
 			for (i = 0; i < n_pipes; i++) {
 				if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
 					continue;
@@ -1226,12 +1307,14 @@ igt_main
 				data.output = outputs[i];
 				igt_assert_f(set_sel_fetch_mode_for_output(&data),
 							 "Selective fetch is not supported\n");
+				if (!check_psr_mode_supported(&data, psr_status[z]))
+					continue;
 
 				for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
 					if (j != FEATURE_NONE && !(coexist_features[i] & j))
 						continue;
-					igt_dynamic_f("%s-pipe-%s-%s%s", get_psr_mode_str_for_output(&data),
-							  kmstest_pipe_name(pipes[i]),
+					igt_dynamic_f("pipe-%s-%s%s",
+						      kmstest_pipe_name(pipes[i]),
 						      igt_output_name(outputs[i]),
 						      coexist_feature_str(j)) {
 						data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
@@ -1246,8 +1329,8 @@ igt_main
 
 		data.op = PLANE_MOVE_CONTINUOUS;
 		igt_describe("Test that selective fetch works on moving cursor plane (no update)");
-		igt_subtest_with_dynamic_f("%scursor-%s-sf", append_fbc_subtest[y],
-					   op_str(data.op)) {
+		igt_subtest_with_dynamic_f("%s%scursor-%s-sf", append_fbc_subtest[y],
+					   append_psr_subtest[z], op_str(data.op)) {
 			for (i = 0; i < n_pipes; i++) {
 				if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
 					continue;
@@ -1255,12 +1338,14 @@ igt_main
 				data.output = outputs[i];
 				igt_assert_f(set_sel_fetch_mode_for_output(&data),
 							 "Selective fetch is not supported\n");
+				if (!check_psr_mode_supported(&data, psr_status[z]))
+					continue;
 
 				for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
 					if (j != FEATURE_NONE && !(coexist_features[i] & j))
 						continue;
-					igt_dynamic_f("%s-pipe-%s-%s%s", get_psr_mode_str_for_output(&data),
-							  kmstest_pipe_name(pipes[i]),
+					igt_dynamic_f("pipe-%s-%s%s",
+						      kmstest_pipe_name(pipes[i]),
 						      igt_output_name(outputs[i]),
 						      coexist_feature_str(j)) {
 						data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
@@ -1277,8 +1362,8 @@ igt_main
 		data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
 		igt_describe("Test that selective fetch works on moving cursor plane exceeding "
 			     "partially visible area (no update)");
-		igt_subtest_with_dynamic_f("%scursor-%s-sf", append_fbc_subtest[y],
-					   op_str(data.op)) {
+		igt_subtest_with_dynamic_f("%s%scursor-%s-sf", append_fbc_subtest[y],
+					   append_psr_subtest[z], op_str(data.op)) {
 			for (i = 0; i < n_pipes; i++) {
 				if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
 					continue;
@@ -1286,12 +1371,14 @@ igt_main
 				data.output = outputs[i];
 				igt_assert_f(set_sel_fetch_mode_for_output(&data),
 							 "Selective fetch is not supported\n");
+				if (!check_psr_mode_supported(&data, psr_status[z]))
+					continue;
 
 				for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
 					if (j != FEATURE_NONE && !(coexist_features[i] & j))
 						continue;
-					igt_dynamic_f("%s-pipe-%s-%s%s", get_psr_mode_str_for_output(&data),
-							  kmstest_pipe_name(pipes[i]),
+					igt_dynamic_f("pipe-%s-%s%s",
+						      kmstest_pipe_name(pipes[i]),
 						      igt_output_name(outputs[i]),
 						      coexist_feature_str(j)) {
 						data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
@@ -1307,8 +1394,8 @@ igt_main
 		data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
 		igt_describe("Test that selective fetch works on moving cursor plane exceeding "
 			     "fully visible area (no update)");
-		igt_subtest_with_dynamic_f("%scursor-%s-sf", append_fbc_subtest[y],
-					   op_str(data.op)) {
+		igt_subtest_with_dynamic_f("%s%scursor-%s-sf", append_fbc_subtest[y],
+					   append_psr_subtest[z], op_str(data.op)) {
 			for (i = 0; i < n_pipes; i++) {
 				if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
 					continue;
@@ -1316,12 +1403,14 @@ igt_main
 				data.output = outputs[i];
 				igt_assert_f(set_sel_fetch_mode_for_output(&data),
 							 "Selective fetch is not supported\n");
+				if (!check_psr_mode_supported(&data, psr_status[z]))
+					continue;
 
 				for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
 					if (j != FEATURE_NONE && !(coexist_features[i] & j))
 						continue;
-					igt_dynamic_f("%s-pipe-%s-%s%s", get_psr_mode_str_for_output(&data),
-							  kmstest_pipe_name(pipes[i]),
+					igt_dynamic_f("pipe-%s-%s%s",
+						      kmstest_pipe_name(pipes[i]),
 						      igt_output_name(outputs[i]),
 						      coexist_feature_str(j)) {
 						data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
@@ -1338,8 +1427,8 @@ igt_main
 		data.op = PLANE_MOVE;
 		/* Verify overlay plane move selective fetch */
 		igt_describe("Test that selective fetch works on moving overlay plane");
-		igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", append_fbc_subtest[y],
-					   op_str(data.op)) {
+		igt_subtest_with_dynamic_f("%s%s%s-sf-dmg-area", append_fbc_subtest[y],
+					   append_psr_subtest[z], op_str(data.op)) {
 			for (i = 0; i < n_pipes; i++) {
 				if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
 					continue;
@@ -1347,13 +1436,14 @@ igt_main
 				data.output = outputs[i];
 				igt_assert_f(set_sel_fetch_mode_for_output(&data),
 							 "Selective fetch is not supported\n");
+				if (!check_psr_mode_supported(&data, psr_status[z]))
+					continue;
 
 				for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
 					if (j != FEATURE_NONE && !(coexist_features[i] & j))
 						continue;
-					igt_dynamic_f("%s-pipe-%s-%s%s",
-							  get_psr_mode_str_for_output(&data),
-							  kmstest_pipe_name(pipes[i]),
+					igt_dynamic_f("pipe-%s-%s%s",
+						      kmstest_pipe_name(pipes[i]),
 						      igt_output_name(outputs[i]),
 						      coexist_feature_str(j)) {
 						data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
@@ -1371,8 +1461,8 @@ igt_main
 
 		data.op = PLANE_MOVE_CONTINUOUS;
 		igt_describe("Test that selective fetch works on moving overlay plane (no update)");
-		igt_subtest_with_dynamic_f("%soverlay-%s-sf", append_fbc_subtest[y],
-					   op_str(data.op)) {
+		igt_subtest_with_dynamic_f("%s%soverlay-%s-sf", append_fbc_subtest[y],
+					   append_psr_subtest[z], op_str(data.op)) {
 			for (i = 0; i < n_pipes; i++) {
 				if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
 					continue;
@@ -1380,19 +1470,21 @@ igt_main
 				data.output = outputs[i];
 				igt_assert_f(set_sel_fetch_mode_for_output(&data),
 							 "Selective fetch is not supported\n");
+				if (!check_psr_mode_supported(&data, psr_status[z]))
+					continue;
 
 				for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
 					if (j != FEATURE_NONE && !(coexist_features[i] & j))
 						continue;
-					igt_dynamic_f("%s-pipe-%s-%s%s", get_psr_mode_str_for_output(&data),
-							  kmstest_pipe_name(pipes[i]),
+					igt_dynamic_f("pipe-%s-%s%s",
+						      kmstest_pipe_name(pipes[i]),
 						      igt_output_name(outputs[i]),
 						      coexist_feature_str(j)) {
-					data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
-					data.coexist_feature = j;
-					prepare(&data);
-					run(&data);
-					cleanup(&data);
+						data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
+						data.coexist_feature = j;
+						prepare(&data);
+						run(&data);
+						cleanup(&data);
 					}
 				}
 			}
@@ -1401,8 +1493,8 @@ igt_main
 		data.op = PLANE_MOVE_CONTINUOUS_EXCEED;
 		igt_describe("Test that selective fetch works on moving overlay plane partially "
 			     "exceeding visible area (no update)");
-		igt_subtest_with_dynamic_f("%soverlay-%s-sf", append_fbc_subtest[y],
-					   op_str(data.op)) {
+		igt_subtest_with_dynamic_f("%s%soverlay-%s-sf", append_fbc_subtest[y],
+					   append_psr_subtest[z], op_str(data.op)) {
 			for (i = 0; i < n_pipes; i++) {
 				if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
 					continue;
@@ -1410,6 +1502,8 @@ igt_main
 				data.output = outputs[i];
 				igt_assert_f(set_sel_fetch_mode_for_output(&data),
 							 "Selective fetch is not supported\n");
+				if (!check_psr_mode_supported(&data, psr_status[z]))
+					continue;
 
 				for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
 					if (j != FEATURE_NONE && !(coexist_features[i] & j))
@@ -1431,8 +1525,8 @@ igt_main
 		data.op = PLANE_MOVE_CONTINUOUS_EXCEED_FULLY;
 		igt_describe("Test that selective fetch works on moving overlay plane fully "
 			     "exceeding visible area (no update)");
-		igt_subtest_with_dynamic_f("%soverlay-%s-sf", append_fbc_subtest[y],
-					   op_str(data.op)) {
+		igt_subtest_with_dynamic_f("%s%soverlay-%s-sf", append_fbc_subtest[y],
+					   append_psr_subtest[z], op_str(data.op)) {
 			for (i = 0; i < n_pipes; i++) {
 				if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
 					continue;
@@ -1440,12 +1534,14 @@ igt_main
 				data.output = outputs[i];
 				igt_assert_f(set_sel_fetch_mode_for_output(&data),
 							 "Selective fetch is not supported\n");
+				if (!check_psr_mode_supported(&data, psr_status[z]))
+					continue;
 
 				for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
 					if (j != FEATURE_NONE && !(coexist_features[i] & j))
 						continue;
-					igt_dynamic_f("%s-pipe-%s-%s%s", get_psr_mode_str_for_output(&data),
-							  kmstest_pipe_name(pipes[i]),
+					igt_dynamic_f("pipe-%s-%s%s",
+						      kmstest_pipe_name(pipes[i]),
 						      igt_output_name(outputs[i]),
 						      coexist_feature_str(j)) {
 						data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
@@ -1462,8 +1558,8 @@ igt_main
 		data.op = OVERLAY_PRIM_UPDATE;
 		igt_describe("Test that selective fetch works on primary plane "
 			     "with blended overlay plane");
-		igt_subtest_with_dynamic_f("%s%s-sf-dmg-area", append_fbc_subtest[y],
-					   op_str(data.op)) {
+		igt_subtest_with_dynamic_f("%s%s%s-sf-dmg-area", append_fbc_subtest[y],
+					   append_psr_subtest[z], op_str(data.op)) {
 			for (i = 0; i < n_pipes; i++) {
 				if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
 					continue;
@@ -1471,12 +1567,13 @@ igt_main
 				data.output = outputs[i];
 				igt_assert_f(set_sel_fetch_mode_for_output(&data),
 							 "Selective fetch is not supported\n");
+				if (!check_psr_mode_supported(&data, psr_status[z]))
+					continue;
 
 				for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
 					if (j != FEATURE_NONE && !(coexist_features[i] & j))
 						continue;
-					igt_dynamic_f("%s-pipe-%s-%s%s", kmstest_pipe_name(pipes[i]),
-							  get_psr_mode_str_for_output(&data),
+					igt_dynamic_f("%s-pipe-%s%s", kmstest_pipe_name(pipes[i]),
 						      igt_output_name(outputs[i]),
 						      coexist_feature_str(j)) {
 						for (k = 1; k <= MAX_DAMAGE_AREAS; k++) {
@@ -1499,8 +1596,8 @@ igt_main
 		 */
 		data.op = PLANE_UPDATE_CONTINUOUS;
 		igt_describe("Test that selective fetch works on overlay plane");
-		igt_subtest_with_dynamic_f("%soverlay-%s-sf", append_fbc_subtest[y],
-					   op_str(data.op)) {
+		igt_subtest_with_dynamic_f("%s%soverlay-%s-sf", append_fbc_subtest[y],
+					   append_psr_subtest[z], op_str(data.op)) {
 			for (i = 0; i < n_pipes; i++) {
 				if (!pipe_output_combo_valid(&data.display, pipes[i], outputs[i]))
 					continue;
@@ -1508,12 +1605,14 @@ igt_main
 				data.output = outputs[i];
 				igt_assert_f(set_sel_fetch_mode_for_output(&data),
 							 "Selective fetch is not supported\n");
+				if (!check_psr_mode_supported(&data, psr_status[z]))
+					continue;
 
 				for (j = FEATURE_NONE; j < FEATURE_COUNT; j++) {
 					if (j != FEATURE_NONE && !(coexist_features[i] & j))
 						continue;
-					igt_dynamic_f("%s-pipe-%s-%s%s", get_psr_mode_str_for_output(&data),
-							  kmstest_pipe_name(pipes[i]),
+					igt_dynamic_f("pipe-%s-%s%s",
+						      kmstest_pipe_name(pipes[i]),
 						      igt_output_name(outputs[i]),
 						      coexist_feature_str(j)) {
 						data.damage_area_count = 1;
@@ -1531,6 +1630,7 @@ igt_main
 			}
 		}
 	}
+	}
 
 	igt_fixture {
 		close(data.debugfs_fd);
-- 
2.34.1



More information about the Intel-gfx-trybot mailing list