Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH 1/2] tests/kms_plane: Handle hw without legacy gamma support
@ 2023-08-08 14:53 Rob Clark
  2023-08-08 14:53 ` [igt-dev] [PATCH 2/2] tests/kms_plane: Skip QCOM_COMPRESSED Rob Clark
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Rob Clark @ 2023-08-08 14:53 UTC (permalink / raw)
  To: igt-dev; +Cc: Rob Clark

From: Rob Clark <robdclark@chromium.org>

Skip the legacy gamma on hw that doesn't support it, instead of failing.
The legacy LUT support was used to drop the precision down to 6 bits, to
paper over errors introduced y RGB<->YCbCr conversion, but this isn't
necessarily needed on all hw.

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

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_plane.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 67cff61d6cd1..a444cdca23e2 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -469,6 +469,10 @@ static void set_legacy_lut(data_t *data, enum pipe pipe,
 	lut_size = crtc->gamma_size;
 	drmModeFreeCrtc(crtc);
 
+	/* Skip if legacy LUT is not supported: */
+	if (!lut_size)
+		return;
+
 	lut = malloc(sizeof(uint16_t) * lut_size);
 
 	for (i = 0; i < lut_size; i++)
-- 
2.41.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [igt-dev] [PATCH 1/2] tests/kms_plane: Handle hw without legacy gamma support
@ 2023-08-07 20:12 Rob Clark
  2023-08-08  7:51 ` Juha-Pekka Heikkila
  0 siblings, 1 reply; 11+ messages in thread
From: Rob Clark @ 2023-08-07 20:12 UTC (permalink / raw)
  To: igt-dev; +Cc: Rob Clark

From: Rob Clark <robdclark@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@chromium.org>
---
 tests/kms_plane.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 67cff61d6cd1..a444cdca23e2 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -469,6 +469,10 @@ static void set_legacy_lut(data_t *data, enum pipe pipe,
 	lut_size = crtc->gamma_size;
 	drmModeFreeCrtc(crtc);
 
+	/* Skip if legacy LUT is not supported: */
+	if (!lut_size)
+		return;
+
 	lut = malloc(sizeof(uint16_t) * lut_size);
 
 	for (i = 0; i < lut_size; i++)
-- 
2.41.0

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

end of thread, other threads:[~2023-08-09  1:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-08 14:53 [igt-dev] [PATCH 1/2] tests/kms_plane: Handle hw without legacy gamma support Rob Clark
2023-08-08 14:53 ` [igt-dev] [PATCH 2/2] tests/kms_plane: Skip QCOM_COMPRESSED Rob Clark
2023-08-08 15:18   ` Juha-Pekka Heikkila
2023-08-08 16:57   ` Abhinav Kumar
2023-08-08 15:58 ` [igt-dev] ✗ GitLab.Pipeline: warning for series starting with [1/2] tests/kms_plane: Handle hw without legacy gamma support Patchwork
2023-08-08 16:32 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-08-08 16:55 ` [igt-dev] [PATCH 1/2] " Abhinav Kumar
2023-08-08 20:32 ` [igt-dev] ○ CI.xeBAT: info for series starting with [1/2] " Patchwork
2023-08-09  1:49 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-08-07 20:12 [igt-dev] [PATCH 1/2] " Rob Clark
2023-08-08  7:51 ` Juha-Pekka Heikkila

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