public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/kms: correct index validation logic
@ 2026-04-20  7:49 Jing-Ping Jan
  2026-04-20 18:16 ` Kamil Konieczny
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Jing-Ping Jan @ 2026-04-20  7:49 UTC (permalink / raw)
  To: igt-dev; +Cc: Jing-Ping Jan

Based on the original implementation and the comment above the function,
it appears the expected behavior is for the plane indices to remain
consistent with those in crtc->planes. Therefore, after swapping the old
and new primary planes, we must update the index in igt_plane_t to
ensure it matches the corresponding index in crtc->planes.

Therefore, we should expect the indices of the old and new primary
planes to remain unchanged after swapping them.

Signed-off-by: Jing-Ping Jan <jingpingjan@google.com>
---
 lib/igt_kms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index bec96f267..405a04640 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2982,8 +2982,8 @@ void igt_display_reset_outputs(igt_display_t *display)
 				igt_swap(*old_primary, *new_primary);
 				igt_swap(old_primary->index, new_primary->index);
 
-				igt_assert_neq(old_primary->index, 0);
-				igt_assert_eq(new_primary->index, 0);
+				igt_assert_eq(old_primary->index, 0);
+				igt_assert_neq(new_primary->index, 0);
 			} else {
 				igt_assert(old_primary == new_primary);
 
-- 
2.54.0.rc1.513.gad8abe7a5a-goog


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

end of thread, other threads:[~2026-04-23 10:40 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-20  7:49 [PATCH i-g-t] tests/kms: correct index validation logic Jing-Ping Jan
2026-04-20 18:16 ` Kamil Konieczny
2026-04-21  2:07   ` Jing-Ping Jan
2026-04-21  6:13     ` Karthik B S
2026-04-21  6:43       ` [PATCH i-g-t v2] " Jing-Ping Jan
2026-04-21  9:28         ` Karthik B S
2026-04-21 12:02         ` Jani Nikula
2026-04-22 17:05           ` Kamil Konieczny
2026-04-22 17:23             ` Ville Syrjälä
2026-04-23  9:21               ` Jing-Ping Jan
2026-04-23  9:28                 ` [PATCH i-g-t v3] " Jing-Ping Jan
2026-04-23 10:27                 ` [PATCH i-g-t v2] " Kamil Konieczny
2026-04-23 10:40                 ` Ville Syrjälä
2026-04-21 21:28 ` ✓ i915.CI.BAT: success for tests/kms: correct index validation logic (rev2) Patchwork
2026-04-21 22:20 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-22  2:36 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-04-22  5:16 ` ✓ i915.CI.Full: success " Patchwork

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