[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
Wed Jun 11 10:16:05 UTC 2025


Hi Melissa,
On 2025-06-01 at 16:14:46 -0300, 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>

Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

Are you ok with merging this one patch first?
This should also be tested again, as i915.Full were not run.

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);
> -- 
> 2.47.2
> 


More information about the igt-dev mailing list