[PATCH i-g-t v1 1/2] tests/kms_async_flips: Split subtest to handle linear buffers separately

Karthik B S karthik.b.s at intel.com
Wed Apr 16 12:43:59 UTC 2025


Hi Santhosh,

On 4/15/2025 9:21 PM, Santhosh Reddy Guddati wrote:
> As linear buffers are considered corner cases, split the existing subtests
> run_with_modifiers to handle as a separate subtest.
>
> Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
> ---
>   tests/kms_async_flips.c | 41 +++++++++++++++++++++++++++++++++++++++--
>   1 file changed, 39 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
> index 031417ed8..df3e136b7 100644
> --- a/tests/kms_async_flips.c
> +++ b/tests/kms_async_flips.c
> @@ -88,6 +88,14 @@
>    *
>    * SUBTEST: overlay-atomic
>    * Description: Verify overlay planes with async flips in atomic API
> + *
> + * SUBTEST: async-flip-with-page-flip-events-linear
> + * Description: Verify the async flip functionality and the fps during async flips
> + *		with linear modifier
> + *
> + * SUBTEST: async-flip-with-page-flip-events-atomic-linear
> + * Description: Verify the async flip functionality and the fps during async flips
> + *		with linear modifier in Atomic API
>    */
Please rename the existing test to '-tiled'.
>   
>   #define CURSOR_POS 128
> @@ -128,6 +136,7 @@ typedef struct {
>   	struct buf_ops *bops;
>   	bool atomic_path;
>   	bool overlay_path;
> +	bool linear_modifier;
>   } data_t;
>   
>   static void flip_handler(int fd_, unsigned int sequence, unsigned int tv_sec,
> @@ -266,6 +275,7 @@ static void test_init_ops(data_t *data)
>   	data->alternate_sync_async = false;
>   	data->atomic_path = false;
>   	data->overlay_path = false;
> +	data->linear_modifier = false;
>   }
>   
>   static void test_init_fbs(data_t *data)
> @@ -792,15 +802,23 @@ static void run_test_with_modifiers(data_t *data, void (*test)(data_t *))
>   		test_init(data);
>   
>   		for (int i = 0; i < data->plane->format_mod_count; i++) {
> +			uint64_t modifier = data->plane->modifiers[i];
> +
>   			if (data->plane->formats[i] != DRM_FORMAT_XRGB8888)
>   				continue;
>   
> +			if (data->linear_modifier && modifier != DRM_FORMAT_MOD_LINEAR)
> +				continue;
> +
> +			if (!data->linear_modifier && modifier == DRM_FORMAT_MOD_LINEAR)
> +				continue;
> +
>   			data->allow_fail = true;
> -			data->modifier = data->plane->modifiers[i];
> +			data->modifier = modifier;
>   
>   			igt_dynamic_f("pipe-%s-%s-%s", kmstest_pipe_name(data->pipe),
>   				      data->output->name,
> -				      igt_fb_modifier_name(data->modifier)) {
> +				      igt_fb_modifier_name(modifier)) {
>   				      /*
>   				       * FIXME: joiner+async flip is busted currently in KMD.
>   				       * Remove this check once the issues are fixed in KMD.
> @@ -863,6 +881,25 @@ igt_main
>   				run_test(&data, test_async_flip);
>   		}
>   
> +		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") {
> +			test_init_ops(&data);
> +			data.linear_modifier = true;
> +			igt_require(is_intel_device(data.drm_fd));
> +			run_test_with_modifiers(&data, test_async_flip);
> +		}
> +
> +		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-atomic-linear") {
> +			test_init_ops(&data);
> +			data.atomic_path = true;
> +			data.linear_modifier = true;
> +			igt_require(is_intel_device(data.drm_fd));

This would always skip on non-intel platforms? Is that the intention as 
linear should be supported on all?

I think can reverse this and we can make tiled subtest intel specific as 
even now we call run_test which eventually will have linear modifier itself?

Regards,
Karthik.B.S
> +			run_test_with_modifiers(&data, test_async_flip);
> +		}
> +
>   		igt_describe("Alternate between sync and async flips");
>   		igt_subtest_with_dynamic("alternate-sync-async-flip") {
>   			test_init_ops(&data);


More information about the igt-dev mailing list