[PATCH i-g-t] tests/kms_plane_alpha_blend: Reduce test complexity for simulation

Samala, Pranay pranay.samala at intel.com
Mon Jul 28 03:51:09 UTC 2025


Hi Kamil,

> -----Original Message-----
> From: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> Sent: Wednesday, July 23, 2025 1:17 PM
> To: Samala, Pranay <pranay.samala at intel.com>
> Cc: igt-dev at lists.freedesktop.org; B S, Karthik <karthik.b.s at intel.com>;
> Lattannavar, Sameer <sameer.lattannavar at intel.com>
> Subject: Re: [PATCH i-g-t] tests/kms_plane_alpha_blend: Reduce test
> complexity for simulation
> 
> Hi Pranay,
> On 2025-07-19 at 22:38:38 +0530, Pranay Samala wrote:
> > Reduce the number of plane alpha value iterations, and limit execution
> > to a single plane for each pipe to enable this test on simulation.
> >
> > Signed-off-by: Pranay Samala <pranay.samala at intel.com>
> > ---
> >  tests/kms_plane_alpha_blend.c | 13 +++++++++++--
> >  1 file changed, 11 insertions(+), 2 deletions(-)
> >
> > diff --git a/tests/kms_plane_alpha_blend.c
> > b/tests/kms_plane_alpha_blend.c index 047cc57b4..696bb1e5e 100644
> > --- a/tests/kms_plane_alpha_blend.c
> > +++ b/tests/kms_plane_alpha_blend.c
> > @@ -79,6 +79,8 @@ typedef struct {
> >  	igt_pipe_crc_t *pipe_crc;
> >  } data_t;
> >
> > +static bool in_simulation;
> > +
> >  static void __draw_gradient(struct igt_fb *fb, int w, int h, double
> > a, cairo_t *cr)  {
> >  	cairo_pattern_t *pat;
> > @@ -289,7 +291,7 @@ static void basic_alpha(data_t *data, enum pipe
> > pipe, igt_plane_t *plane)  {
> >  	igt_display_t *display = &data->display;
> >  	igt_crc_t ref_crc, crc;
> > -	int i;
> > +	int i, max_alpha_value;
> >
> >  	/* Testcase 1: alpha = 0.0, plane should be transparent. */
> >  	igt_display_commit2(display, COMMIT_ATOMIC); @@ -298,8 +300,10
> @@
> > static void basic_alpha(data_t *data, enum pipe pipe, igt_plane_t
> > *plane)
> >
> >  	igt_plane_set_fb(plane, &data->argb_fb_0);
> >
> > +	max_alpha_value = in_simulation ? 160 : 256;
> > +
> >  	/* transparent fb should be transparent, no matter what.. */
> > -	for (i = 7; i < 256; i += 8) {
> > +	for (i = 7; i < max_alpha_value; i += 8) {
> >  		igt_plane_set_prop_value(plane, IGT_PLANE_ALPHA, i | (i <<
> 8));
> >  		igt_display_commit2(display, COMMIT_ATOMIC);
> >
> > @@ -564,6 +568,9 @@ static void run_test_on_pipe_planes(data_t *data,
> enum pipe pipe, igt_output_t *
> >  		igt_info("Testing plane %u\n", plane->index);
> >  		test(data, pipe, plane);
> >  		igt_plane_set_fb(plane, NULL);
> > +
> > +		if (in_simulation)
> > +			break;
> >  	}
> >
> >  	igt_output_set_pipe(output, PIPE_NONE); @@ -743,6 +750,8 @@
> > igt_main_args("e", NULL, help_str, opt_handler, NULL)
> >  		for_each_pipe(&data.display, pipe)
> >  			active_pipes[last_pipe++] = pipe;
> >  		last_pipe--;
> > +
> > +		in_simulation = igt_run_in_simulation();
> 
> Set this in first fixture in igt_main, not here.
I have set it in the first fixture in igt_main.

Regards,
Pranay
> 
> Regards,
> Kamil
> 
> >  	}
> >
> >  	run_subtests(&data);
> > --
> > 2.34.1
> >


More information about the igt-dev mailing list