[Intel-gfx] [PATCH i-g-t] kms_pipe_color: Don't assert on crc not equal.

Bob Paauwe bob.j.paauwe at intel.com
Wed Aug 3 18:37:00 UTC 2016


In this specific case, multiple color values are compared to the
reference with only one expected to have an equal crc. Asserting
on the first case where the crc values aren't equal causes the
various ctm-0-xx-pipex tests to fail.

This reverts

  commit 582ce4cd19c627606047b1a8fdd987c4dc07353c
  Author: Daniel Vetter <daniel.vetter at ffwll.ch>
  Date:   Wed Jul 27 13:17:38 2016 +0200

      lib/debugs: nuke igt_crc_equal again

for this test only and makes the igt_crc_equal function a local
function.

Signed-off-by: Bob Paauwe <bob.j.paauwe at intel.com>
---
 tests/kms_pipe_color.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/tests/kms_pipe_color.c b/tests/kms_pipe_color.c
index b0a2f07..8f85e99 100644
--- a/tests/kms_pipe_color.c
+++ b/tests/kms_pipe_color.c
@@ -652,6 +652,17 @@ static void test_pipe_legacy_gamma_reset(data_t *data,
 	free(gamma_zero);
 }
 
+static bool igt_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 +735,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 &= igt_crc_equal(&crc_software, &crc_hardware);
 
 		igt_output_set_pipe(output, PIPE_ANY);
 	}
-- 
2.7.4



More information about the Intel-gfx mailing list