[PATCH i-g-t 3/3] tests/kms_async_flip: skip subtest on AMD if invalid condition

Kamil Konieczny kamil.konieczny at linux.intel.com
Thu Jun 12 11:12:49 UTC 2025


Hi Karthik,
On 2025-06-03 at 09:25:19 +0530, Karthik B S wrote:
> 
> On 6/2/2025 12:44 AM, Melissa Wen wrote:
> > Async page flips can fail for any driver-specific reasons, i.e. when the
> > driver can't commit to async page flip request due to hw limitations,
> > the commit is rejected with -EINVAL since there is one or more
> > conditions that make the request invalid. These limitations vary between
> > vendors and hw versions. In case of AMD devices, async page flip cannot
> > be perfomed if fb memory type changes (VRAM vs GTT), but framebuffer
> > allocation type cannot be controlled by any userspace configuration.
> > 
> > Allow EINVAL failures on AMD device and skip the test. Async flips can
> > be still validated by the performance comparison assert if no EINVAL.
> > 
> > Signed-off-by: Melissa Wen <mwen at igalia.com>
> Acked-by: Karthik B S <karthik.b.s at intel.com>

Thank you, I merged this one.

Regards,
Kamil

> > ---
> >   tests/kms_async_flips.c | 7 ++++++-
> >   1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
> > index 97128cfad..065ac9c49 100644
> > --- a/tests/kms_async_flips.c
> > +++ b/tests/kms_async_flips.c
> > @@ -410,7 +410,12 @@ static void test_async_flip(data_t *data)
> >   		ret = perform_flip(data, frame, flags);
> > -		if (frame == 1 && data->allow_fail)
> > +		/* AMD cannot perform async page flip if fb mem type changes,
> > +		 * and this condition cannot be controlled by any userspace
> > +		 * configuration. Therefore allow EINVAL failure and skip the
> > +		 * test for AMD devices.
> > +		 */
> > +		if ((frame == 1 && data->allow_fail) || is_amdgpu_device(data->drm_fd))
> >   			igt_skip_on(ret == -EINVAL);
> >   		else
> >   			igt_assert_eq(ret, 0);


More information about the igt-dev mailing list