Re: [igt-dev] [PATCH i-g-t v2 0/4] kms_plane: Add clipping subtests

Imre Deak
2018-03-08T12:35:43Z

On Wed, Mar 07, 2018 at 09:44:09PM +0100, Daniel Vetter wrote:
> On Wed, Mar 07, 2018 at 07:29:55PM +0200, Imre Deak wrote:
> > On Wed, Mar 07, 2018 at 06:03:19PM +0100, Daniel Vetter wrote:
> > > On Tue, Mar 06, 2018 at 06:52:11PM +0200, Imre Deak wrote:
> > > > This is v2 of [1], fixing the issues reported by Arek and CI. Besides
> > > > the changes described in patch 4, there is also an FBC workaround
> > > > applied now in kernel. Without the WA the test cases using the primary
> > > > plane (with FBC) could trigger FIFO underflow errors.
> > > >
> > > > Note that the subtest takes ~40 seconds to run on a single pipe.
> > >
> > > Do we need to spend that much time testing clipping? What's the overlap
> > > with all the various other plane clipping tests we have already, which
> > > focus exclusively on the cursor?
> >
> > There's no other clipping tests using non-cursor planes. I think we are
> > missing coverage here: with the plane's start/end located close to the
> > screen edge triggered FIFO underflows due to two new issues already.
> >
> > To reduce the runtime: in this patchset I removed one redundant modeset
> > after capturing the CRC, so I can't see what to improve on that front.
> > It goes through all format-sizes/tiling/rotation and planes so we could
> > avoid doing some of that maybe splitting them into separate subtests and
> > not running them for patchwork checks.
> >
> > Not sure if CRC capturing is the most optimal in this test, I could look
> > into improving that. Maybe Maarten has some idea?
>
> Could we test multiple things at the same maybe? Like cursor in one
> corner, plane in the other. As long as the two are really far away the wms
> shouldn't influence each another really.

Good idea, will give it a go. The underflows (with the known cause) I
wanted to trigger originally depend on the position and plane type, but
AFAICS what only matters is if it's a cursor or not.

> Wrt CRC, if you're really efficient you can sample one every frame. Since
> you need two per tests (one for the reference image, one for the hw
> blending) that means 40*60/2 = 1200 different cases. But this only happens
> if you capture CRC continuously and make sure you're really careful with
> matching CRC frame ids correctly to your flips.
>
> If you restart crc cacpture each time you lose a few frames each (because
> there's issues we don't understand with the first few crcs, so need to
> drop those), which means you test througput drops by about a factor of 10.
>
> (I didn't look whether this is actually the case, too late in the evening
> now).

Ok, will check if it's the bottleneck at all. I see that the CRC read is
possibly retried with a 1ms delay, not sure what's that about.

>
> Cheers, Daniel
>
> >
> > --Imre
> >
> > >
> > > Note: Not blocking this, just want to make sure we have some overall plan
> > > here maybe and aren't digging ourselves some comfy graves :-)
> > >
> > > Cheers, Daniel
> > >
> > > >
> > > > [1]
> > > > https://lists.freedesktop.org/archives/igt-dev/2018-February/000523.html
> > > >
> > > > Cc: Mika Kahola <mika.kahola@intel.com>
> > > > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > > > Cc: Juha-Pekka Heikkil?? <juha-pekka.heikkila@intel.com>
> > > > Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> > > >
> > > > Imre Deak (4):
> > > > kms_plane: Remove redundant modeset after CRC capture
> > > > lib: Export helpers to get rotation/tiling strings
> > > > kms_plane: Split helpers creating reference FB and capturing CRC
> > > > kms_plane: Add clipping subtests
> > > >
> > > > lib/igt_fb.c | 23 +++
> > > > lib/igt_fb.h | 1 +
> > > > lib/igt_kms.c | 11 +-
> > > > lib/igt_kms.h | 1 +
> > > > tests/kms_plane.c | 502 +++++++++++++++++++++++++++++++++++++++++++++++++++---
> > > > 5 files changed, 517 insertions(+), 21 deletions(-)
> > > >
> > > > --
> > > > 2.13.2
> > > >
> > > > _______________________________________________
> > > > igt-dev mailing list
> > > > igt-dev@lists.freedesktop.org
> > > > https://lists.freedesktop.org/mailman/listinfo/igt-dev
> > >
> > > --
> > > Daniel Vetter
> > > Software Engineer, Intel Corporation
> > > http://blog.ffwll.ch
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch