[Intel-gfx] [PATCH i-g-t] tests: kms_pipe_color: fix ctm tests
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Tue Sep 20 08:46:58 UTC 2016
Some of the Intel platforms have odd numbers of LUT entries and we
need to tests a couple of values around the expected result. Bring
back the CRC equal function we need that doesn't trigger an assert
right away, while we still assert if we can't find a correct result in
the outter loop.
v2: update Fixes field (Jani)
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97691
Fixes: 582ce4cd19c6 ("lib/debugs: nuke igt_crc_equal again")
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: Christophe Prigent <christophe.prigent at intel.com>
---
tests/kms_pipe_color.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tests/kms_pipe_color.c b/tests/kms_pipe_color.c
index b0a2f07..ebfceab 100644
--- a/tests/kms_pipe_color.c
+++ b/tests/kms_pipe_color.c
@@ -652,6 +652,16 @@ static void test_pipe_legacy_gamma_reset(data_t *data,
free(gamma_zero);
}
+static bool crc_equal(igt_crc_t *a, igt_crc_t *b)
+{
+ int i;
+
+ for (i = 0; i < a->n_words; i++)
+ if (a->crc[i] != b->crc[i])
+ return false;
+ return true;
+}
+
/*
* Draw 3 rectangles using before colors with the ctm matrix apply and verify
* the CRC is equal to using after colors with an identify ctm matrix.
@@ -724,7 +734,7 @@ static bool test_pipe_ctm(data_t *data,
/* Verify that the CRC of the software computed output is
* equal to the CRC of the CTM matrix transformation output.
*/
- igt_assert_crc_equal(&crc_software, &crc_hardware);
+ ret &= crc_equal(&crc_software, &crc_hardware);
igt_output_set_pipe(output, PIPE_ANY);
}
--
2.8.1
More information about the Intel-gfx
mailing list