[igt-dev] [PATCH i-g-t v4] igt/tests: kms_plane_stress: Add plane stress test

Lisovskiy, Stanislav stanislav.lisovskiy at intel.com
Tue Mar 26 12:48:25 UTC 2019


On Tue, 2019-03-26 at 14:22 +0200, Petri Latvala wrote:
> On Tue, Mar 26, 2019 at 02:00:46PM +0200, Lisovskiy, Stanislav wrote:
> > On Tue, 2019-03-26 at 11:11 +0200, Petri Latvala wrote:
> > > On Mon, Mar 25, 2019 at 05:54:40PM +0200, Stanislav Lisovskiy
> > > wrote:
> > > > This test attempts to utilize all connected
> > > > outputs at the same time, using maximum possible
> > > > resolution and amount of planes, to check whether
> > > > we are hiting any kind of bandwidth, watermark or
> > > > other limitations.
> > > > 
> > > > v2: Added cpu and gpu load threads, which consume
> > > >     additional bandwidth.
> > > > 
> > > > v3: Removed binary picture file, using pattern fb
> > > >     instead.
> > > > 
> > > > v4: Moved FB creation/removal to better place.
> > > > 
> > > > Signed-off-by: Stanislav Lisovskiy <
> > > > stanislav.lisovskiy at intel.com>
> > > > ---
> > > >  lib/igt_kms.h            |   7 +
> > > >  tests/Makefile.sources   |   1 +
> > > >  tests/kms_plane_stress.c | 546
> > > > +++++++++++++++++++++++++++++++++++++++
> > > >  tests/meson.build        |   1 +
> > > >  4 files changed, 555 insertions(+)
> > > >  create mode 100644 tests/kms_plane_stress.c
> > > > 
> > > > diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> > > > index 407f3d64..0e6784ca 100644
> > > > --- a/lib/igt_kms.h
> > > > +++ b/lib/igt_kms.h
> > > > @@ -519,6 +519,13 @@ static inline bool
> > > > igt_output_is_connected(igt_output_t *output)
> > > >  		for_each_if ((((output) = &(display)-
> > > > >outputs[con__]),
> > > > \
> > > >  			     igt_pipe_connector_valid((pipe),
> > > > (output))))
> > > >  
> > > > +#define for_each_pipe_with_new_output(display, pipe, output) \
> > > > +			for (int con = 0, (pipe) = 0; con <
> > > > (display)-
> > > > > n_outputs; con++) \
> > > > 
> > > > +				for_each_if((output) =
> > > > &(display)-
> > > > > outputs[con]) \
> > > > 
> > > > +					for_each_if((pipe) <
> > > > IGT_MAX_PIPES) \
> > > > +						for_each_if(igt
> > > > _pipe_co
> > > > nnector_valid((pipe), (output)))
> > > 
> > > 
> > > Docs for this. And a very good explanation what is different from
> > > for_each_pipe_with_valid_output().
> > 
> > Sure, will add those. The reasoning is that
> > for_each_pipe_with_valid_output will try to test every possible
> > combination of pipe and output, while in this case it is not
> > needed.
> 
> 
> Gah, I should have asked for comparison to
> for_each_pipe_with_single_output.
> 
> Although I don't understand your loop anyway still. It doesn't update
> pipe, making the "for_each_pipe" part of the name misleading.

In fact, I didn't want to invent a new macro here, so I tried
for_each_pipe_with_single_output also - problem is that, when I'm using
pipes simultaneously, it tries to find a first suitable correct output 
and then we get a failure as the same output is already used on other
pipe.

Regarding pipe variable incrementing - totally true, don't like it
either, I will need to figure out something better.

> 
> 


More information about the igt-dev mailing list