public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [v4] tests/kms_color: Fix CRC mismatch issues with ctm test
@ 2019-03-28 21:59 Uma Shankar
  2019-03-28 22:08 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_color: Fix CRC mismatch issues with ctm test (rev8) Patchwork
  2019-03-29  8:39 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  0 siblings, 2 replies; 16+ messages in thread
From: Uma Shankar @ 2019-03-28 21:59 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.

v3: Fixed a fumble with compilation.

v4: Disabling degamma and gamma for ctm max tests, after the logic
in kernel has been updated by Ville's series.

v5: Disabled gamma/degamma for all ctm tests as suggested by Ville.

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

diff --git a/tests/kms_color.c b/tests/kms_color.c
index decf3c2..2a6f4b7 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -696,9 +696,10 @@ 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);
+		disable_degamma(primary->pipe);
+		disable_gamma(primary->pipe);
 		disable_ctm(primary->pipe);
+
 		igt_display_commit(&data->display);
 
 		paint_rectangles(data, mode, after, &fb);
-- 
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] 16+ messages in thread
* [igt-dev] [v4] tests/kms_color: Fix CRC mismatch issues with ctm test
@ 2019-03-28 21:19 Uma Shankar
  2019-03-28 20:56 ` Ville Syrjälä
  2019-03-29  9:00 ` Daniel Vetter
  0 siblings, 2 replies; 16+ messages in thread
From: Uma Shankar @ 2019-03-28 21:19 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.

v3: Fixed a fumble with compilation.

v4: Disabling degamma and gamma for ctm max tests, after the logic
in kernel has been updated by Ville's series.

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

diff --git a/tests/kms_color.c b/tests/kms_color.c
index decf3c2..0951ffc 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -696,8 +696,19 @@ 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);
+		} else {
+			/* Disable Degamma and Gamma for ctm max test */
+			disable_degamma(primary->pipe);
+			disable_gamma(primary->pipe);
+		}
+
 		disable_ctm(primary->pipe);
 		igt_display_commit(&data->display);
 
-- 
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] 16+ messages in thread

end of thread, other threads:[~2019-04-03  9:29 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-28 21:59 [igt-dev] [v4] tests/kms_color: Fix CRC mismatch issues with ctm test Uma Shankar
2019-03-28 22:08 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_color: Fix CRC mismatch issues with ctm test (rev8) Patchwork
2019-03-29  8:39 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-03-28 21:19 [igt-dev] [v4] tests/kms_color: Fix CRC mismatch issues with ctm test Uma Shankar
2019-03-28 20:56 ` Ville Syrjälä
2019-03-28 21:31   ` Shankar, Uma
2019-03-28 21:41   ` Shankar, Uma
2019-03-29  9:00 ` Daniel Vetter
2019-03-29  9:05   ` Daniel Vetter
2019-03-29 10:38     ` Ville Syrjälä
2019-04-01  7:26       ` Daniel Vetter
2019-04-01 17:51         ` Ville Syrjälä
2019-04-02  8:52           ` Daniel Vetter
2019-04-02 12:54             ` Shankar, Uma
2019-04-03  8:32               ` Daniel Vetter
2019-04-03  9:29                 ` Shankar, Uma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox