Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Maíra Canal" <mcanal@igalia.com>
To: "Melissa Wen" <mwen@igalia.com>,
	"Petri Latvala" <adrinael@adrinael.net>,
	"Kamil Konieczny" <kamil.konieczny@linux.intel.com>,
	"Juha-Pekka Heikkila" <juhapekka.heikkila@gmail.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v2] tests/kms_plane: allow pixel-format tests to run on drivers without legacy LUT
Date: Tue, 25 Apr 2023 12:29:04 -0300	[thread overview]
Message-ID: <20230425152904.238487-1-mcanal@igalia.com> (raw)

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

             reply	other threads:[~2023-04-25 15:29 UTC|newest]

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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230425152904.238487-1-mcanal@igalia.com \
    --to=mcanal@igalia.com \
    --cc=adrinael@adrinael.net \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.com \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=mwen@igalia.com \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox