[igt-dev] [PATCH i-g-t v2] tests/kms_plane: allow pixel-format tests to run on drivers without legacy LUT

Maíra Canal mcanal at igalia.com
Tue Apr 25 15:29:04 UTC 2023


Currently, the tests pixel-format and pixel-format-source-clamping
fail for drivers that doesn't have support for legacy LUT, as they
are not able to complete drmModeCrtcSetGamma() successfully. Therefore,
if !crtc->gamma_size, don't set legacy LUT and allow the pixel-format
tests to run even if the driver doesn't support legacy LUT.

Signed-off-by: Maíra Canal <mcanal at igalia.com>
---
 tests/kms_plane.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 62aee9ad..9b49f951 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -455,6 +455,9 @@ static void set_legacy_lut(data_t *data, enum pipe pipe,
 	lut_size = crtc->gamma_size;
 	drmModeFreeCrtc(crtc);
 
+	if (!crtc->gamma_size)
+		return;
+
 	lut = malloc(sizeof(uint16_t) * lut_size);
 
 	for (i = 0; i < lut_size; i++)
-- 
2.40.0



More information about the igt-dev mailing list