[igt-dev] [PATCH igt] tests/kms_color: Gamma tests should require hw support

Rob Clark robdclark at gmail.com
Sun Dec 11 19:52:13 UTC 2022


From: Rob Clark <robdclark at chromium.org>

Some qcom devices support CTM but not gamma/degamma LUT.

Note, the remaining failures on msm are due to CTM being supported on
one CRTC but not the other.  But the property is exposed on both.

Signed-off-by: Rob Clark <robdclark at chromium.org>
---
 tests/kms_color.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/kms_color.c b/tests/kms_color.c
index d016cefb..cf9c27fe 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -230,6 +230,8 @@ static bool test_pipe_legacy_gamma(data_t *data,
 	legacy_lut_size = kms_crtc->gamma_size;
 	drmModeFreeCrtc(kms_crtc);
 
+	igt_require(legacy_lut_size > 0);
+
 	red_lut = malloc(sizeof(uint16_t) * legacy_lut_size);
 	green_lut = malloc(sizeof(uint16_t) * legacy_lut_size);
 	blue_lut = malloc(sizeof(uint16_t) * legacy_lut_size);
-- 
2.38.1



More information about the igt-dev mailing list