All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [v2] tests/kms_color: Fix CRC mismatch issues with ctm test
@ 2019-03-24 17:55 Uma Shankar
  2019-03-24 17:56 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_color: Fix CRC mismatch issues with ctm test (rev2) Patchwork
  2019-03-25  1:40 ` [igt-dev] [v2] tests/kms_color: Fix CRC mismatch issues with ctm test Lionel Landwerlin
  0 siblings, 2 replies; 10+ messages in thread
From: Uma Shankar @ 2019-03-24 17:55 UTC (permalink / raw)
  To: igt-dev; +Cc: ville.syrjala, maarten.lankhorst

Due to Gamma/Degamma limitation with precision (lack of
exact 1.0 representation) due to ABI restriction, applying
linear gamma affects crc. This patch fixes the same by making
ctm tests independant of gamma/degamma.

v2: Disable degamma/gamma programming for ctm max test as it
leads to crc mimsmatch. Limiting it to this test case alone as
other tests need it to be enabled, hence not touching those
scenarios.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108147
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
---
 tests/kms_color.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/tests/kms_color.c b/tests/kms_color.c
index decf3c2..93560d4 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -696,8 +696,15 @@ static bool test_pipe_ctm(data_t *data,
 		igt_assert(fb_modeset_id);
 		igt_plane_set_fb(primary, &fb_modeset);
 
-		set_degamma(data, primary->pipe, degamma_linear);
-		set_gamma(data, primary->pipe, gamma_linear);
+		/*
+		 * Don't program LUT's for max CTM cases as limitation of
+		 * representing 1.0 due to ABI limits causes crc mismatch
+		 */
+		if (memcmp(before, after, sizeof(color_t)))
+			set_degamma(data, primary->pipe, degamma_linear);
+			set_gamma(data, primary->pipe, gamma_linear);
+		}
+
 		disable_ctm(primary->pipe);
 		igt_display_commit(&data->display);
 
@@ -1005,6 +1012,11 @@ run_tests_for_pipe(data_t *data, enum pipe p)
 		 * produce with an 8 bits per color framebuffer. */
 		igt_require(!IS_CHERRYVIEW(data->devid));
 
+		/* Disable and let default luts be applied by kernel */
+		disable_degamma(primary->pipe);
+		disable_gamma(primary->pipe);
+		igt_display_commit(&data->display);
+
 		igt_assert(test_pipe_ctm(data, primary, red_green_blue,
 					 full_rgb, ctm));
 	}
-- 
1.9.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-03-25 13:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-24 17:55 [igt-dev] [v2] tests/kms_color: Fix CRC mismatch issues with ctm test Uma Shankar
2019-03-24 17:56 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_color: Fix CRC mismatch issues with ctm test (rev2) Patchwork
2019-03-25  1:40 ` [igt-dev] [v2] tests/kms_color: Fix CRC mismatch issues with ctm test Lionel Landwerlin
2019-03-25  6:36   ` Shankar, Uma
2019-03-25 10:15     ` Lionel Landwerlin
2019-03-25 10:40       ` Shankar, Uma
2019-03-25 10:51         ` Ville Syrjälä
2019-03-25 13:12           ` Shankar, Uma
2019-03-25 11:08         ` Lionel Landwerlin
2019-03-25 11:32           ` Shankar, Uma

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.