[PATCH i-g-t 1/3] Revert "tests/kms: correct index validation logic"

Kamil Konieczny
2026-04-24T15:14:30Z

This reverts commit 4963e78e038806cc75f885d7d5713bb0d12c01d1.

It turns out asserts were correct, there was missing swap
which will be corrected in following commit.

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Jing-Ping Jan <jingpingjan@google.com>
Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.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 38c28f45f..2d758b63c 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2981,8 +2981,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_eq(old_primary->index, 0);
- igt_assert_neq(new_primary->index, 0);
+ igt_assert_neq(old_primary->index, 0);
+ igt_assert_eq(new_primary->index, 0);
} else {
igt_assert(old_primary == new_primary);

--
2.54.0