Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/intel/kms_big_fb: Introducing this restriction to optimize the test execution time on simulation
@ 2024-05-16  4:16 Pranay Samala
  2024-05-16  5:19 ` ✓ CI.xeBAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Pranay Samala @ 2024-05-16  4:16 UTC (permalink / raw)
  To: igt-dev; +Cc: karthik.b.s, jeevan.b, sameer.lattannavar, pranay.samala

This test executes on all the availble planes and set of 6 coordinates.
Due to this, test takes long duration to executes on simulation and
gets timeout.

Signed-off-by: Pranay Samala <pranay.samala@intel.com>
---
 tests/intel/kms_big_fb.c | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/tests/intel/kms_big_fb.c b/tests/intel/kms_big_fb.c
index 1e45d8e42..a26465b67 100644
--- a/tests/intel/kms_big_fb.c
+++ b/tests/intel/kms_big_fb.c
@@ -443,18 +443,26 @@ static bool test_plane(data_t *data)
 	struct igt_fb *big_fb = &data->big_fb;
 	int w = data->big_fb_width - small_fb->width;
 	int h = data->big_fb_height - small_fb->height;
+	int m;
 	struct {
 		int x, y;
 	} coords[] = {
 		/* bunch of coordinates pulled out of thin air */
+		{ w, h, },
 		{ 0, 0, },
 		{ w * 4 / 7, h / 5, },
 		{ w * 3 / 7, h / 3, },
 		{ w / 2, h / 2, },
 		{ w / 3, h * 3 / 4, },
-		{ w, h, },
 	};
 
+	if (igt_run_in_simulation()) {
+		m = 1;
+		plane = igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_PRIMARY);
+		igt_plane_set_fb(plane, NULL);
+	} else
+		m = ARRAY_SIZE(coords);
+
 	if (!igt_plane_has_format_mod(plane, data->format, data->modifier))
 		return false;
 
@@ -465,7 +473,7 @@ static bool test_plane(data_t *data)
 		igt_plane_set_rotation(plane, data->rotation);
 	igt_plane_set_position(plane, 0, 0);
 
-	for (int i = 0; i < ARRAY_SIZE(coords); i++) {
+	for (int i = 0; i < m; i++) {
 		igt_crc_t small_crc, big_crc;
 		int x = coords[i].x;
 		int y = coords[i].y;
@@ -595,10 +603,14 @@ static bool test_pipe(data_t *data)
 	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe,
 					  IGT_PIPE_CRC_SOURCE_AUTO);
 
-	for_each_plane_on_pipe(&data->display, data->pipe, data->plane) {
+	if (igt_run_in_simulation())
 		ret = test_plane(data);
-		if (ret)
-			break;
+	else {
+		for_each_plane_on_pipe(&data->display, data->pipe, data->plane) {
+			ret = test_plane(data);
+			if (ret)
+				break;
+		}
 	}
 
 	if (data->format == DRM_FORMAT_C8)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-05-16 14:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-16  4:16 [PATCH i-g-t] tests/intel/kms_big_fb: Introducing this restriction to optimize the test execution time on simulation Pranay Samala
2024-05-16  5:19 ` ✓ CI.xeBAT: success for " Patchwork
2024-05-16  5:27 ` ✓ Fi.CI.BAT: " Patchwork
2024-05-16  6:50 ` ✗ CI.xeFULL: failure " Patchwork
2024-05-16  8:03 ` [PATCH i-g-t] " Kamil Konieczny
2024-05-16 14:18 ` ✗ Fi.CI.IGT: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox