[igt-dev] [PATCH i-g-t] tests/kms_chamelium: Make tests run without pipe color management support.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Mon Mar 5 18:14:16 UTC 2018


Only try to set those values if the properties are supported.
This fixes the kms_chameium tests to run on vc4 again.

Reported-by: Maxime Ripard <maxime.ripard at bootlin.com>
Cc: Paul Kocialkowski <paul.kocialkowski at bootlin.com>
Cc: Eric Anholt <eric at anholt.net>
Cc: Boris Brezillon <boris.brezillon at bootlin.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
 tests/kms_chamelium.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index 8855a8300049..2bc34d07788d 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -471,9 +471,12 @@ enable_output(data_t *data,
 	igt_output_override_mode(output, mode);
 
 	/* Clear any color correction values that might be enabled */
-	igt_pipe_obj_replace_prop_blob(primary->pipe, IGT_CRTC_DEGAMMA_LUT, NULL, 0);
-	igt_pipe_obj_replace_prop_blob(primary->pipe, IGT_CRTC_GAMMA_LUT, NULL, 0);
-	igt_pipe_obj_replace_prop_blob(primary->pipe, IGT_CRTC_CTM, NULL, 0);
+	if (igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_DEGAMMA_LUT))
+		igt_pipe_obj_replace_prop_blob(primary->pipe, IGT_CRTC_DEGAMMA_LUT, NULL, 0);
+	if (igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_LUT))
+		igt_pipe_obj_replace_prop_blob(primary->pipe, IGT_CRTC_GAMMA_LUT, NULL, 0);
+	if (igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_CTM))
+		igt_pipe_obj_replace_prop_blob(primary->pipe, IGT_CRTC_CTM, NULL, 0);
 
 	igt_display_commit2(display, COMMIT_ATOMIC);
 
-- 
2.16.2



More information about the igt-dev mailing list