Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v4] tests/intel/kms_big_fb: Restrict runs on simulation
@ 2024-05-20 17:28 Pranay Samala
  2024-05-20 19:58 ` ✓ CI.xeBAT: success for tests/intel/kms_big_fb: Restrict runs on simulation (rev2) Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Pranay Samala @ 2024-05-20 17:28 UTC (permalink / raw)
  To: igt-dev; +Cc: karthik.b.s, jeevan.b, sameer.lattannavar, pranay.samala

This test executes on only one pipe and all the available planes with
set of 6 coordinates. Due to this, test takes long duration to execute
on simulation and gets timeout.

Restricting the test to execute only on one of the coordinates for
simulation.

v4:
- Inserted simulation check right after for loop (Kamil)
- Executing only on 1 coordinate (w, h) on simulation

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

diff --git a/tests/intel/kms_big_fb.c b/tests/intel/kms_big_fb.c
index 1e45d8e42..605813f7f 100644
--- a/tests/intel/kms_big_fb.c
+++ b/tests/intel/kms_big_fb.c
@@ -443,6 +443,7 @@ 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;
+	bool run_in_simulation = igt_run_in_simulation();
 	struct {
 		int x, y;
 	} coords[] = {
@@ -467,8 +468,13 @@ static bool test_plane(data_t *data)
 
 	for (int i = 0; i < ARRAY_SIZE(coords); i++) {
 		igt_crc_t small_crc, big_crc;
-		int x = coords[i].x;
-		int y = coords[i].y;
+		int x, y;
+
+		if (run_in_simulation)
+			i = ARRAY_SIZE(coords) - 1;
+
+		x = coords[i].x;
+		y = coords[i].y;
 
 		/* Hardware limitation */
 		if (data->format == DRM_FORMAT_RGB565 &&
@@ -540,6 +546,7 @@ static bool test_pipe(data_t *data)
 	drmModeModeInfo *mode;
 	igt_plane_t *primary;
 	bool ret = false;
+	bool run_in_simulation = igt_run_in_simulation();
 
 	igt_info("Using (pipe %s + %s) to run the subtest.\n",
 		 kmstest_pipe_name(data->pipe), igt_output_name(data->output));
@@ -597,7 +604,7 @@ static bool test_pipe(data_t *data)
 
 	for_each_plane_on_pipe(&data->display, data->pipe, data->plane) {
 		ret = test_plane(data);
-		if (ret)
+		if (ret || run_in_simulation)
 			break;
 	}
 
-- 
2.34.1


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

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-20 17:28 [PATCH i-g-t v4] tests/intel/kms_big_fb: Restrict runs on simulation Pranay Samala
2024-05-20 19:58 ` ✓ CI.xeBAT: success for tests/intel/kms_big_fb: Restrict runs on simulation (rev2) Patchwork
2024-05-20 20:13 ` ✓ Fi.CI.BAT: " Patchwork
2024-05-20 20:59 ` ✗ CI.xeFULL: failure " Patchwork
2024-05-21  9:18   ` Kamil Konieczny
2024-05-21  9:16 ` [PATCH i-g-t v4] tests/intel/kms_big_fb: Restrict runs on simulation Kamil Konieczny
2024-05-21 16:35 ` ✗ Fi.CI.IGT: failure for tests/intel/kms_big_fb: Restrict runs on simulation (rev2) Patchwork

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