From: Alex Hung <alex.hung@amd.com>
To: "André Almeida" <andrealmeid@igalia.com>,
igt-dev@lists.freedesktop.org, "Jeevan B" <jeevan.b@intel.com>,
"Kamil Konieczny" <kamil.konieczny@linux.intel.com>
Cc: kernel-dev@igalia.com, Vitaly Prosyak <vitaly.prosyak@amd.com>,
Melissa Wen <mwen@igalia.com>,
Rodrigo Siqueira <siqueira@igalia.com>
Subject: Re: [PATCH v8 2/4] tests/kms_async_flips: Check for atomic async flip cap
Date: Wed, 9 Apr 2025 09:29:37 -0600 [thread overview]
Message-ID: <f33c733e-5656-4c01-a11c-c8f125ceeacf@amd.com> (raw)
In-Reply-To: <20250409152206.132022-3-andrealmeid@igalia.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
On 4/9/25 09:22, André Almeida wrote:
> If a driver doesn't support doing an async flip through the atomic uAPI,
> the atomic tests fails. Instead of failing, create a function that
> checks for this capability and skip the test if is unsupported.
>
> Signed-off-by: André Almeida <andrealmeid@igalia.com>
> Reviewed-by: Melissa Wen <mwen@igalia.com>
> ---
> tests/kms_async_flips.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
> index c1637104e..f7a233045 100644
> --- a/tests/kms_async_flips.c
> +++ b/tests/kms_async_flips.c
> @@ -209,6 +209,14 @@ static void require_monotonic_timestamp(int fd)
> igt_require_f(ret == 1, "Monotonic timestamps not supported\n");
> }
>
> +static void require_atomic_async_cap(data_t *data)
> +{
> + int ret = igt_has_drm_cap(data->drm_fd, DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP);
> +
> + igt_require_f(ret >= 0, "Atomic async flip cap doesn't exist in this kernel\n");
> + igt_require_f(ret == 1, "Atomic async flip not supported by this driver\n");
> +}
> +
> static void test_init(data_t *data)
> {
> drmModeModeInfo *mode;
> @@ -689,6 +697,9 @@ static void run_test(data_t *data, void (*test)(data_t *))
> {
> igt_display_t *display = &data->display;
>
> + if (data->atomic_path)
> + require_atomic_async_cap(data);
> +
> for_each_pipe_with_valid_output(display, data->pipe, data->output) {
> igt_display_reset(display);
>
> @@ -714,6 +725,9 @@ static void run_test(data_t *data, void (*test)(data_t *))
>
> static void run_test_with_modifiers(data_t *data, void (*test)(data_t *))
> {
> + if (data->atomic_path)
> + require_atomic_async_cap(data);
> +
> for_each_pipe_with_valid_output(&data->display, data->pipe, data->output) {
> test_init(data);
>
next prev parent reply other threads:[~2025-04-09 15:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 15:22 [PATCH v8 0/4] tests/kms_async_flips: Create subtest for overlay planes André Almeida
2025-04-09 15:22 ` [PATCH v8 1/4] lib/ioctl_wrappers: let the caller handle capability check result André Almeida
2025-04-09 15:22 ` [PATCH v8 2/4] tests/kms_async_flips: Check for atomic async flip cap André Almeida
2025-04-09 15:29 ` Alex Hung [this message]
2025-04-09 15:22 ` [PATCH v8 3/4] kms_async_flips: Refactor data options André Almeida
2025-04-09 15:29 ` Alex Hung
2025-04-09 15:22 ` [PATCH v8 4/4] tests/kms_async_flips: Create subtest for overlay planes André Almeida
2025-04-09 20:15 ` ✓ i915.CI.BAT: success for " Patchwork
2025-04-09 20:21 ` ✓ Xe.CI.BAT: " Patchwork
2025-04-09 21:14 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-09 23:52 ` [PATCH v8 0/4] " Melissa Wen
2025-04-10 3:30 ` ✗ i915.CI.Full: 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=f33c733e-5656-4c01-a11c-c8f125ceeacf@amd.com \
--to=alex.hung@amd.com \
--cc=andrealmeid@igalia.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jeevan.b@intel.com \
--cc=kamil.konieczny@linux.intel.com \
--cc=kernel-dev@igalia.com \
--cc=mwen@igalia.com \
--cc=siqueira@igalia.com \
--cc=vitaly.prosyak@amd.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