Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v2] tests/kms_plane: allow pixel-format tests to run on drivers without legacy LUT
@ 2023-04-25 15:29 Maíra Canal
  2023-04-25 18:52 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  2023-05-22 13:20 ` [igt-dev] [PATCH i-g-t v2] " Kamil Konieczny
  0 siblings, 2 replies; 3+ messages in thread
From: Maíra Canal @ 2023-04-25 15:29 UTC (permalink / raw)
  To: Melissa Wen, Petri Latvala, Kamil Konieczny, Juha-Pekka Heikkila,
	Ville Syrjälä
  Cc: igt-dev

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@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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-22 13:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-25 15:29 [igt-dev] [PATCH i-g-t v2] tests/kms_plane: allow pixel-format tests to run on drivers without legacy LUT Maíra Canal
2023-04-25 18:52 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2023-05-22 13:20 ` [igt-dev] [PATCH i-g-t v2] " Kamil Konieczny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox