[PATCH i-g-t v15 2/5] tests/kms_async_flips: use in_formats_async for async modifiers

Karthik B S karthik.b.s at intel.com
Thu Jun 26 08:39:56 UTC 2025


Hi Santhosh,

On 6/23/2025 4:39 PM, Santhosh Reddy Guddati wrote:
> Utilise IN_FORMATS_ASYNC property exposed to get the list of
> async supported modifier/format pair and improve the test coverage by
> iterating through all the supported modifiers with XRGB8888 format.
>
> V2: Improve run_test_with_modifiers to set data formats based on async
>      formats.
>      Update make_fb to use data formats instead of hard coded format
>
> V3: Update commit message, remove complicated iterations (Chaitanya)
>
> V4: Reduce the format+modifier combinations to reduce time needed to
>      execute the tests. (Chaitanya)
>
> V5: Remove unnecessary check for reduced formats. (Chaitanya)
>
> V6: Introduce new test for all formats and modifiers, executing only one
>      flip to reduce overall time.
>      Update test_with_modifiers to use async modifiers and formats X8888.
>
> V7: split the newly added subtest to separate commit and add condition
>      to skip the test if async format modifiers are not available. Also
>      remove data->fail as it is not needed with the new support (Chaitanya)
>
> v8: Refactor and clean up code.
>
> v9: Fix missing modifier assignment. (Introducd with rebase)
>
> Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah at intel.com>
> ---
>   tests/kms_async_flips.c | 9 ++++++---
>   1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
> index 065ac9c49..bf14a1a93 100644
> --- a/tests/kms_async_flips.c
> +++ b/tests/kms_async_flips.c
> @@ -436,6 +436,7 @@ static void test_async_flip(data_t *data)
>   			data->suspend_resume = false;
>   			igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
>   		}
> +
>   		frame++;
>   	} while (diff.tv_sec < RUN_TIME);
>   
> @@ -815,8 +816,11 @@ static void run_test_with_modifiers(data_t *data, void (*test)(data_t *))
>   	for_each_pipe_with_valid_output(&data->display, data->pipe, data->output) {
>   		test_init(data);
>   
> -		for (int i = 0; i < data->plane->format_mod_count; i++) {
> -			uint64_t modifier = data->plane->modifiers[i];
> +		igt_assert_f(data->plane->async_format_mod_count > 0,
> +			     "No async format/modifier supported\n");

This should be a skip instead of an assert IMHO, although this would 
only be hit on older platforms that don't support async flips.

With this updated,

Reviewed-by: Karthik B S <karthik.b.s at intel.com>

Regards,
Karthik.B.S
> +
> +		for (int i = 0; i < data->plane->async_format_mod_count; i++) {
> +			uint64_t modifier = data->plane->async_modifiers[i];
>   
>   			if (data->plane->formats[i] != DRM_FORMAT_XRGB8888)
>   				continue;
> @@ -824,7 +828,6 @@ static void run_test_with_modifiers(data_t *data, void (*test)(data_t *))
>   			if (modifier == DRM_FORMAT_MOD_LINEAR)
>   				continue;
>   
> -			data->allow_fail = true;
>   			data->modifier = modifier;
>   
>   			igt_dynamic_f("pipe-%s-%s-%s", kmstest_pipe_name(data->pipe),


More information about the igt-dev mailing list