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

Borah, Chaitanya Kumar chaitanya.kumar.borah at intel.com
Mon Jun 23 08:08:34 UTC 2025



> -----Original Message-----
> From: Reddy Guddati, Santhosh <santhosh.reddy.guddati at intel.com>
> Sent: Monday, June 23, 2025 1:30 PM
> To: Borah, Chaitanya Kumar <chaitanya.kumar.borah at intel.com>; 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>
> Subject: Re: [PATCH i-g-t v14 5/5] tests/kms_async_flips: Skip Async Flips with
> Linear Modifier
> 
> 
> 
> On 23-06-2025 12:56, Borah, Chaitanya Kumar wrote:
> >
> >
> >> -----Original Message-----
> >> From: Reddy Guddati, Santhosh <santhosh.reddy.guddati at intel.com>
> >> Sent: Tuesday, June 17, 2025 7:57 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 v14 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)
> >>
> >> v5: Move the linear modifier support checks to run_test (Chaitanya)
> >>
> >> Signed-off-by: Santhosh Reddy Guddati
> >> <santhosh.reddy.guddati at intel.com>
> >> ---
> >>   tests/kms_async_flips.c | 32 ++++++++++++++++++++++++++++++++
> >>   1 file changed, 32 insertions(+)
> >>
> >> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c index
> >> e176b2a28..0c8f4afae 100644
> >> --- a/tests/kms_async_flips.c
> >> +++ b/tests/kms_async_flips.c
> >> @@ -799,6 +799,35 @@ 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) {
> >> +	enum pipe pipe = PIPE_A;
> >
> > This again the restrict the check only to PIPE A.
> 
> As format/ modifier support is output independent, PIPE_A is chosen here
> simply to ensure a valid output is available for the test setup.
> 
> This choice is intended to simplify the setup by choosing a known good pipe.
> 

This is true currently but there is no guarantee that this will always be the case.

What are the disadvantages of putting the logic inside?

for_each_pipe_with_valid_output(display, data->pipe, data->output)

Regards

Chaitanya

> >
> > Regards
> >
> > Chaitanya
> >
> >
> >> +
> >> +	data->output = igt_get_single_output_for_pipe(&data->display, pipe);
> >> +	igt_require_f(data->output, "No output found for pipe %s\n",
> >> +		      kmstest_pipe_name(pipe));
> >> +
> >> +	igt_output_set_pipe(data->output, pipe);
> >> +
> >> +	data->plane = igt_output_get_plane_type(data->output,
> >> DRM_PLANE_TYPE_PRIMARY);
> >> +	igt_require_f(data->plane, "No primary plane found for output %s\n",
> >> +		      data->output->name);
> >> +
> >> +	if(!igt_plane_has_prop(data->plane,
> >> IGT_PLANE_IN_FORMATS_ASYNC)) {
> >> +		data->modifier = DRM_FORMAT_MOD_LINEAR;
> >> +	} else {
> >> +		igt_assert_f(data->plane->async_format_mod_count > 0,
> >> +			     "No async format/modifier supported\n");
> >> +		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("No linear modifier supported for async flips\n");
> >> +	}
> >> +}
> >> +
> >>   static void run_test(data_t *data, void (*test)(data_t *))  {
> >>   	igt_display_t *display = &data->display; @@ -806,6 +835,9 @@
> >> static void run_test(data_t *data, void (*test)(data_t *))
> >>   	if (data->atomic_path)
> >>   		require_atomic_async_cap(data);
> >>
> >> +	if (data->linear_modifier)
> >> +		require_linear_modifier(data);
> >> +
> >>   	for_each_pipe_with_valid_output(display, data->pipe, data->output)
> >> {
> >>   		igt_display_reset(display);
> >>
> >> --
> >> 2.34.1
> >



More information about the igt-dev mailing list