[i-g-t] tests/kms_color: Fix CTM tests

Bhanuprakash Modem bhanuprakash.modem at intel.com
Wed Sep 21 13:55:12 UTC 2022


Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 tests/kms_color.c | 25 +++----------------------
 1 file changed, 3 insertions(+), 22 deletions(-)

diff --git a/tests/kms_color.c b/tests/kms_color.c
index ab285af8..53435991 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -461,7 +461,6 @@ static bool test_pipe_ctm(data_t *data,
 		0.0, 1.0, 0.0,
 		0.0, 0.0, 1.0
 	};
-	gamma_lut_t *degamma_linear, *gamma_linear;
 	igt_output_t *output = data->output;
 	bool ret = true;
 	igt_display_t *display = &data->display;
@@ -472,9 +471,6 @@ static bool test_pipe_ctm(data_t *data,
 
 	igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_CTM));
 
-	degamma_linear = generate_table(data->degamma_lut_size, 1.0);
-	gamma_linear = generate_table(data->gamma_lut_size, 1.0);
-
 	igt_output_set_pipe(output, primary->pipe->pipe);
 	igt_output_override_mode(output, mode);
 
@@ -496,20 +492,8 @@ static bool test_pipe_ctm(data_t *data,
 	igt_assert(fb_modeset_id);
 	igt_plane_set_fb(primary, &fb_modeset);
 
-	/*
-	 * Don't program LUT's for max CTM cases, as limitation of
-	 * representing intermediate values between 0 and 1.0 causes
-	 * rounding issues and inaccuracies leading to crc mismatch.
-	 */
-	if (memcmp(before, after, sizeof(color_t))) {
-		set_degamma(data, primary->pipe, degamma_linear);
-		set_gamma(data, primary->pipe, gamma_linear);
-	} else {
-		/* Disable Degamma and Gamma for ctm max test */
-		disable_degamma(primary->pipe);
-		disable_gamma(primary->pipe);
-	}
-
+	disable_degamma(primary->pipe);
+	disable_gamma(primary->pipe);
 	disable_ctm(primary->pipe);
 	igt_display_commit(&data->display);
 
@@ -534,7 +518,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.
 	 */
-	ret &= igt_skip_crc_compare || igt_check_crc_equal(&crc_software, &crc_hardware);
+	ret = igt_skip_crc_compare || igt_check_crc_equal(&crc_software, &crc_hardware);
 
 	igt_plane_set_fb(primary, NULL);
 	igt_output_set_pipe(output, PIPE_NONE);
@@ -542,9 +526,6 @@ static bool test_pipe_ctm(data_t *data,
 	igt_remove_fb(data->drm_fd, &fb);
 	igt_remove_fb(data->drm_fd, &fb_modeset);
 
-	free_lut(degamma_linear);
-	free_lut(gamma_linear);
-
 	return ret;
 }
 
-- 
2.37.3



More information about the Intel-gfx-trybot mailing list