[igt-dev] [PATCH v3] tests/kms_plane: Handle hw without legacy gamma support

Rob Clark robdclark at gmail.com
Mon Aug 7 16:54:11 UTC 2023


From: Rob Clark <robdclark at chromium.org>

Skip the tests which require legacy gamma, instead of failing, if the hw
does not support legacy gamma.

v2: igt_require(lut_size > 0) instead
v3: simplify patch

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

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 67cff61d6cd1..44cad2bf2491 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -469,6 +469,8 @@ static void set_legacy_lut(data_t *data, enum pipe pipe,
 	lut_size = crtc->gamma_size;
 	drmModeFreeCrtc(crtc);
 
+	igt_require(lut_size > 0);
+
 	lut = malloc(sizeof(uint16_t) * lut_size);
 
 	for (i = 0; i < lut_size; i++)
-- 
2.41.0



More information about the igt-dev mailing list