public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_color: disable degamma/gamma by default for CTM tests
@ 2022-12-23  0:41 Melissa Wen
  2022-12-23  1:31 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Melissa Wen @ 2022-12-23  0:41 UTC (permalink / raw)
  To: igt-dev; +Cc: daniel.vetter, markyacoub

The DRM color mgmt doc states "Each of the properties are optional" so
CTM test should not depend on degamma/gamma properties to run. Also,
setting each property individually is the way that atomic degamma/gamma
tests work. However, from previous discussions around 64d0ff72 [1], i915
seems to need degamma/gamma settings around the CTM property (except for
the max CTM cases). Therefore, remove dependency on degamma/gamma
support from CTM tests and only set them for i915 (keeping the skip for
max CTM cases).

[1] https://patchwork.freedesktop.org/patch/296122/?series=58412&rev=9

Signed-off-by: Melissa Wen <mwen@igalia.com>
---
 tests/kms_color.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/tests/kms_color.c b/tests/kms_color.c
index d016cefb..e0c6a8bf 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -493,12 +493,15 @@ static bool test_pipe_ctm(data_t *data,
 	igt_assert(fb_modeset_id);
 	igt_plane_set_fb(primary, &fb_modeset);
 
+	disable_degamma(primary->pipe);
+	disable_gamma(primary->pipe);
+
 	/*
-	 * Don't program LUT's for max CTM cases, as limitation of
+	 * Only program LUT's for i915, but not for max CTM 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))) {
+	if (is_i915_device(data->drm_fd) && memcmp(before, after, sizeof(color_t))) {
 		igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_DEGAMMA_LUT));
 		igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_LUT));
 
@@ -507,10 +510,6 @@ static bool test_pipe_ctm(data_t *data,
 
 		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);
-- 
2.35.1

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

end of thread, other threads:[~2022-12-29  0:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-23  0:41 [igt-dev] [PATCH i-g-t] tests/kms_color: disable degamma/gamma by default for CTM tests Melissa Wen
2022-12-23  1:31 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2022-12-23  9:50 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2022-12-29  0:02 ` [igt-dev] [PATCH i-g-t] " Alex Hung

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