[i-g-t] tests/kms_color: Fix ctm-0.* tests

Bhanuprakash Modem bhanuprakash.modem at intel.com
Sun Sep 25 12:57:10 UTC 2022


Fix the logic to generate the expected result to deal with the
hardware rounding issues.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 tests/kms_color.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/kms_color.c b/tests/kms_color.c
index ab285af8..2804bde8 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -770,7 +770,7 @@ run_ctm_tests_for_pipe(data_t *data, enum pipe p,
 			expected_colors[0].r =
 				expected_colors[1].g =
 				expected_colors[2].b =
-				0.5 + delta * (i - 2);
+				ctm[0] + delta * (i - (iter / 2));
 			if (test_pipe_ctm(data, data->primary, red_green_blue,
 					  expected_colors, ctm)) {
 				success = true;
-- 
2.37.3



More information about the Intel-gfx-trybot mailing list