From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Maíra Canal" <mcanal@igalia.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_plane: require GAMMA_LUT property for legacy_lut tests
Date: Mon, 24 Apr 2023 21:18:23 +0300 [thread overview]
Message-ID: <ZEbH75wVYbn63VIT@intel.com> (raw)
In-Reply-To: <20230424172407.451109-1-mcanal@igalia.com>
On Mon, Apr 24, 2023 at 02:24:07PM -0300, Maíra Canal wrote:
> Currently, the tests pixel-format and pixel-format-source-clamping
> fail for drivers that doesn't have the IGT_CRTC_GAMMA_LUT property,
> as they are not able to complete drmModeCrtcSetGamma() successfully.
> Therefore, require the IGT_CRTC_GAMMA_LUT property before running the
> tests. This way the tests can skip gracefully for drivers without
> this property.
>
> Signed-off-by: Maíra Canal <mcanal@igalia.com>
> ---
> tests/kms_plane.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index 62aee9ad..a0e4e80f 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -451,6 +451,8 @@ static void set_legacy_lut(data_t *data, enum pipe pipe,
> uint16_t *lut;
> int i, lut_size;
>
> + igt_require(igt_pipe_obj_has_prop(pipe_obj, IGT_CRTC_GAMMA_LUT));
Skipping all pixel format tests isn't a great plan.
Also, you want to check crtc->gamma_size intead. That is what
indicates support for the legacy gamma.
> +
> crtc = drmModeGetCrtc(data->drm_fd, pipe_obj->crtc_id);
> lut_size = crtc->gamma_size;
> drmModeFreeCrtc(crtc);
> @@ -474,6 +476,8 @@ static bool set_c8_legacy_lut(data_t *data, enum pipe pipe,
> uint16_t *r, *g, *b;
> int i, lut_size;
>
> + igt_require(igt_pipe_obj_has_prop(pipe_obj, IGT_CRTC_GAMMA_LUT));
> +
> crtc = drmModeGetCrtc(data->drm_fd, pipe_obj->crtc_id);
> lut_size = crtc->gamma_size;
> drmModeFreeCrtc(crtc);
> --
> 2.40.0
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2023-04-24 18:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-24 17:24 [igt-dev] [PATCH i-g-t] tests/kms_plane: require GAMMA_LUT property for legacy_lut tests Maíra Canal
2023-04-24 17:44 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
2023-04-24 18:06 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-04-24 18:18 ` Ville Syrjälä [this message]
2023-04-24 20:57 ` [igt-dev] [PATCH i-g-t] " Maíra Canal
2023-04-24 21:22 ` Ville Syrjälä
2023-04-24 21:39 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork
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=ZEbH75wVYbn63VIT@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=mcanal@igalia.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