[i-g-t] tests/kms_color: Fix all ctm tests
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Sun Sep 25 12:54:03 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 | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/tests/kms_color.c b/tests/kms_color.c
index ab285af8..f887f734 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -456,11 +456,6 @@ static bool test_pipe_ctm(data_t *data,
color_t *after,
double *ctm_matrix)
{
- const double ctm_identity[] = {
- 1.0, 0.0, 0.0,
- 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;
@@ -509,13 +504,10 @@ static bool test_pipe_ctm(data_t *data,
disable_degamma(primary->pipe);
disable_gamma(primary->pipe);
}
-
disable_ctm(primary->pipe);
- igt_display_commit(&data->display);
paint_rectangles(data, mode, after, &fb);
igt_plane_set_fb(primary, &fb);
- set_ctm(primary->pipe, ctm_identity);
igt_display_commit(&data->display);
igt_wait_for_vblank(data->drm_fd,
display->pipes[primary->pipe->pipe].crtc_offset);
@@ -534,7 +526,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);
@@ -770,7 +762,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