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

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


Hi Santhosh,

On 6/23/2025 4:39 PM, Santhosh Reddy Guddati wrote:
> 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)
>
> v5: Move the linear modifier support checks to run_test (Chaitanya)
>
> v6: Remove hard coding pipe and refactor to move checks inside run_test
> (Chaitanya)
>
> Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
> ---
>   tests/kms_async_flips.c | 23 ++++++++++++++++++++++-
>   1 file changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
> index e176b2a28..5a7daaf07 100644
> --- a/tests/kms_async_flips.c
> +++ b/tests/kms_async_flips.c
> @@ -799,6 +799,23 @@ static void test_crc(data_t *data)
>   	igt_assert_lt(data->frame_count * 2, data->flip_count);
>   }
>   
> +static void require_linear_modifier(data_t *data)
> +{
> +	if(!igt_plane_has_prop(data->plane, IGT_PLANE_IN_FORMATS_ASYNC)) {
> +		data->modifier = DRM_FORMAT_MOD_LINEAR;
> +		return;
> +	}
> +
> +	for (int i = 0; i < data->plane->async_format_mod_count; i++) {
> +		if (data->plane->async_modifiers[i] == DRM_FORMAT_MOD_LINEAR) {
> +			data->modifier = DRM_FORMAT_MOD_LINEAR;
> +			return;
> +		}
> +	}
> +
> +	igt_skip("Linear modifier not supported for async flips\n");

Nit: 'async flips' -> 'async flips on this platform'. IMHO, this update 
would make it clear.

Either case,

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

Regards,
Karthik.B.S
> +}
> +
>   static void run_test(data_t *data, void (*test)(data_t *))
>   {
>   	igt_display_t *display = &data->display;
> @@ -814,7 +831,11 @@ static void run_test(data_t *data, void (*test)(data_t *))
>   			continue;
>   
>   		test_init(data);
> -		data->modifier = data->linear_modifier ? DRM_FORMAT_MOD_LINEAR : default_modifier(data);
> +
> +		if (data->linear_modifier)
> +			require_linear_modifier(data);
> +		else
> +			data->modifier = default_modifier(data);
>   
>   		igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(data->pipe), data->output->name) {
>   			/*


More information about the igt-dev mailing list