Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pranay Samala <pranay.samala@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: karthik.b.s@intel.com, jeevan.b@intel.com,
	sameer.lattannavar@intel.com, pranay.samala@intel.com
Subject: [PATCH i-g-t] tests/intel/kms_big_fb: Introducing this restriction to optimize the test execution time on simulation
Date: Thu, 16 May 2024 09:46:10 +0530	[thread overview]
Message-ID: <20240516041610.409576-1-pranay.samala@intel.com> (raw)

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


             reply	other threads:[~2024-05-16  4:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-16  4:16 Pranay Samala [this message]
2024-05-16  5:19 ` ✓ CI.xeBAT: success for tests/intel/kms_big_fb: Introducing this restriction to optimize the test execution time on simulation 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240516041610.409576-1-pranay.samala@intel.com \
    --to=pranay.samala@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jeevan.b@intel.com \
    --cc=karthik.b.s@intel.com \
    --cc=sameer.lattannavar@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox