From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Santhosh Reddy Guddati <santhosh.reddy.guddati@intel.com>
Cc: igt-dev@lists.freedesktop.org, karthik.b.s@intel.com,
swati2.sharma@intel.com
Subject: Re: [PATCH i-g-t v1] tests/kms_async_flips: validate mode before proceeding with fb creation
Date: Thu, 26 Feb 2026 10:48:57 +0200 [thread overview]
Message-ID: <aaAI0zP8UVB6TAjS@intel.com> (raw)
In-Reply-To: <20260225110510.1801049-1-santhosh.reddy.guddati@intel.com>
On Wed, Feb 25, 2026 at 04:35:10PM +0530, Santhosh Reddy Guddati wrote:
> Validate mode before proceeding with creating frame buffers to avoid
> passing invalid parameters to the ioctl.
>
> Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati@intel.com>
> ---
> tests/kms_async_flips.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
> index 014b7f347..d00b36544 100644
> --- a/tests/kms_async_flips.c
> +++ b/tests/kms_async_flips.c
> @@ -298,6 +298,12 @@ static void test_init(data_t *data)
> igt_display_commit(&data->display);
>
> mode = igt_output_get_mode(data->output);
How would that even return some kind of invalid mode?
And why would it be a problem only for kms_async_flips?
> + igt_require_f(kmstest_mode_is_valid(mode),
> + "Invalid mode on %s (%dx%d@%d)",
> + data->output->name,
> + mode ? mode->hdisplay : 0,
> + mode ? mode->vdisplay : 0,
> + mode ? mode->vrefresh : 0);
>
> data->crtc_id = data->crtc->crtc_id;
> data->refresh_rate = mode->vrefresh;
> @@ -327,6 +333,12 @@ static void test_init_fbs(data_t *data)
> drmModeModeInfo *mode;
>
> mode = igt_output_get_mode(data->output);
> + igt_require_f(kmstest_mode_is_valid(mode),
> + "Invalid mode on %s (%dx%d@%d)",
> + data->output->name,
> + mode ? mode->hdisplay : 0,
> + mode ? mode->vdisplay : 0,
> + mode ? mode->vrefresh : 0);
> width = mode->hdisplay;
> height = mode->vdisplay;
>
> @@ -672,6 +684,12 @@ static void test_invalid(data_t *data)
> igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
>
> mode = igt_output_get_mode(data->output);
> + igt_require_f(kmstest_mode_is_valid(mode),
> + "Invalid mode on %s (%dx%d@%d)",
> + data->output->name,
> + mode ? mode->hdisplay : 0,
> + mode ? mode->vdisplay : 0,
> + mode ? mode->vrefresh : 0);
> width = mode->hdisplay;
> height = mode->vdisplay;
>
> --
> 2.34.1
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2026-02-26 8:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 11:05 [PATCH i-g-t v1] tests/kms_async_flips: validate mode before proceeding with fb creation Santhosh Reddy Guddati
2026-02-25 22:21 ` ✗ Xe.CI.BAT: failure for " Patchwork
2026-02-25 22:30 ` ✗ i915.CI.BAT: " Patchwork
2026-02-26 0:33 ` ✗ Xe.CI.FULL: " Patchwork
2026-02-26 8:48 ` Ville Syrjälä [this message]
2026-02-26 11:19 ` [PATCH i-g-t v1] " Reddy Guddati, Santhosh
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=aaAI0zP8UVB6TAjS@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=karthik.b.s@intel.com \
--cc=santhosh.reddy.guddati@intel.com \
--cc=swati2.sharma@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