[PATCH i-g-t v13 5/5] tests/kms_async_flips: Skip Async Flips with Linear Modifier

Borah, Chaitanya Kumar chaitanya.kumar.borah at intel.com
Fri Jun 6 06:02:13 UTC 2025


Hi Santhosh

> -----Original Message-----
> From: Reddy Guddati, Santhosh <santhosh.reddy.guddati at intel.com>
> Sent: Tuesday, June 3, 2025 2:58 PM
> To: igt-dev at lists.freedesktop.org
> Cc: B S, Karthik <karthik.b.s at intel.com>; Murthy, Arun R
> <arun.r.murthy at intel.com>; Borah, Chaitanya Kumar
> <chaitanya.kumar.borah at intel.com>; Reddy Guddati, Santhosh
> <santhosh.reddy.guddati at intel.com>
> Subject: [PATCH i-g-t v13 5/5] tests/kms_async_flips: Skip Async Flips with
> Linear Modifier
> 
> Skip the linear modifier subtest on unsupported platforms
> 
> V2: Remove platform check and use in_formats_async (Chaitanya)
>     Update the commit message
> 
> V3: Fix crash
> 
> v4: Handle the case for linear modifiers on platforms where
> IN_FORMATS_ASYNC is not supported. (Chaitanya)
> 
> Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
> ---
>  tests/kms_async_flips.c | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c index
> f824f60f9..586ee5d84 100644
> --- a/tests/kms_async_flips.c
> +++ b/tests/kms_async_flips.c
> @@ -901,6 +901,28 @@ static void
> run_test_with_async_format_modifiers(data_t *data, void (*test)(data
>  	igt_vec_fini(&tested_formats);
>  }
> 
> +static bool is_linear_supported(data_t *data) {
> +	int i;
> +
> +	for_each_pipe_with_valid_output(&data->display, data->pipe, data-
> >output) {
> +		test_init(data);
> +
> +		/* for drivers that doesn't support IN_FORMATS_ASYNC yet,
> +		 * assume linear modifier is supported.
> +		 */
> +		if (!igt_plane_has_prop(data->plane,
> IGT_PLANE_IN_FORMATS_ASYNC))
> +			return true;
> +
> +		for (i = 0; i < data->plane->async_format_mod_count; i++) {
> +			if (data->plane->async_modifiers[i] ==
> DRM_FORMAT_MOD_LINEAR)
> +				return true;
> +		}
> +	}
> +
> +	return false;
> +}
> +
>  static void run_test_with_modifiers(data_t *data, void (*test)(data_t *))  {
>  	if (data->atomic_path)
> @@ -988,6 +1010,8 @@ igt_main
>  		igt_describe("Wait for page flip events in between successive
> asynchronous "
>  			     "flips with linear modifiers");
>  		igt_subtest_with_dynamic("async-flip-with-page-flip-events-
> linear") {
> +			igt_skip_on_f(!is_linear_supported(&data),
> +						  "Async Flips with linear
> modifier are not supported");
>  			test_init_ops(&data);
>  			data.linear_modifier = true;
>  			run_test(&data, test_async_flip);
> @@ -996,6 +1020,8 @@ igt_main
>  		igt_describe("Wait for page flip events in between successive
> asynchronous "
>  			     "flips using atomic path with linear modifiers");
>  		igt_subtest_with_dynamic("async-flip-with-page-flip-events-
> linear-atomic") {
> +			igt_skip_on_f(!is_linear_supported(&data),
> +						  "Async Flips with linear
> modifier are not supported");

Programmatically, I think it makes more sense to put this check within run_test().

Current logic
	-> Check if *ANY* output support linear
              -> If above is true run test in *ALL* output

Proposed logic
	-> Check if the current output support linear modifier
	-> If yes, test it

However I am not sure if you can skip here. It will result in a "silent skip". Similar to


                if (!intel_pipe_output_combo_valid(display))
                        continue;

If that is acceptable we should take the later approach.

Regards

Chaitanya

>  			test_init_ops(&data);
>  			data.linear_modifier = true;
>  			run_test(&data, test_async_flip);
> --
> 2.34.1



More information about the igt-dev mailing list