All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeevan B <jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: karthik.b.s@intel.com, Jeevan B <jeevan.b@intel.com>
Subject: [PATCH i-g-t] tests/kms_cursor_legacy: Skip timing checks in simulation to avoid false negatives
Date: Tue, 15 Sep 2026 13:49:59 +0530	[thread overview]
Message-ID: <20260915081959.257160-1-jeevan.b@intel.com> (raw)

Simulation environments often do not reflect real hardware timing
accurately, which can result in false negatives during the
flip-vs-cursor-busy-crc vblank and CRC checks. To prevent such issues,
this patch conditionally skips these timing validations when the test
runs in simulation.

Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
 tests/kms_cursor_legacy.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 62339855e..810c593f5 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -1775,8 +1775,10 @@ static void flip_vs_cursor_busy_crc(igt_display_t *display, bool atomic)
 		flip_nonblocking(display, crtc, atomic, &fb_info[1], NULL);
 		do_ioctl(display->drm_fd, DRM_IOCTL_MODE_CURSOR, &arg[i]);
 
-		igt_assert_eq(igt_crtc_get_vblank(crtc, 0),
-			      vblank_start);
+		/* Simulation ioctl latency can exceed a vblank period even without a real miss. */
+		if (!igt_run_in_simulation())
+			igt_assert_eq(igt_crtc_get_vblank(crtc, 0),
+				      vblank_start);
 
 		igt_pipe_crc_get_current(display->drm_fd, pipe_crc, &test_crc);
 
@@ -1792,7 +1794,11 @@ static void flip_vs_cursor_busy_crc(igt_display_t *display, bool atomic)
 		igt_plane_set_fb(plane_primary, &fb_info[0]);
 		igt_display_commit2(display, COMMIT_UNIVERSAL);
 
-		igt_assert_crc_equal(&crcs[i], &test_crc);
+		/* Simulation timing can shift when the busy CRC is sampled, causing a false mismatch. */
+		if (!igt_run_in_simulation())
+			igt_assert_crc_equal(&crcs[i], &test_crc);
+		else if (!igt_check_crc_equal(&crcs[i], &test_crc))
+			igt_info("CRC mismatch ignored on simulation for i=%d\n", i);
 	}
 
 	igt_pipe_crc_stop(pipe_crc);
-- 
2.43.0


             reply	other threads:[~2026-09-15  8:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15  8:19 Jeevan B [this message]
2026-09-15 12:29 ` ✓ i915.CI.BAT: success for tests/kms_cursor_legacy: Skip timing checks in simulation to avoid false negatives Patchwork
2026-09-15 12:48 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-15 16:06 ` ✓ Xe.CI.FULL: " Patchwork
2026-09-15 20:47 ` ✗ i915.CI.Full: failure " 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=20260915081959.257160-1-jeevan.b@intel.com \
    --to=jeevan.b@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=karthik.b.s@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.