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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
Cc: Paul Kocialkowski <paul.kocialkowski@xxxxxxxxxxx>
Cc: Eric Anholt <eric@xxxxxxxxxx>
Cc: Boris Brezillon <boris.brezillon@xxxxxxxxxxx>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux