All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 3/3] tests/kms_plane_scaling: Don't test every pixel format
Date: Thu, 30 Jan 2020 17:57:18 +0200	[thread overview]
Message-ID: <20200130155718.GF13686@intel.com> (raw)
In-Reply-To: <158039885873.18112.16131853497278614661@skylake-alporthouse-com>

On Thu, Jan 30, 2020 at 03:40:58PM +0000, Chris Wilson wrote:
> Quoting Ville Syrjala (2020-01-30 15:12:29)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > We probably don't need to test every pixel format, so let's just
> > test one format for each format "class" (as defined by
> > igt_reduce_format()).
> > 
> > Speeds up the test considerably (on KBL):
> > $ time ./build/tests/kms_plane_scaling --r pipe-A-scaler-with-clipping-clamping
> > - real  0m25,186s
> > + real  0m3,440s
> > 
> > As with kms_plane we'll add a new command line argument (--extended)
> > which can be used to test all formats.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  tests/kms_plane_scaling.c | 80 ++++++++++++++++++++++++++++++++++++---
> >  1 file changed, 74 insertions(+), 6 deletions(-)
> > 
> > diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> > index 35aac8dad078..19087286a0f9 100644
> > --- a/tests/kms_plane_scaling.c
> > +++ b/tests/kms_plane_scaling.c
> > @@ -23,6 +23,7 @@
> >   */
> >  
> >  #include "igt.h"
> > +#include "igt_vec.h"
> >  #include <math.h>
> >  
> >  
> > @@ -43,6 +44,7 @@ typedef struct {
> >         igt_plane_t *plane2;
> >         igt_plane_t *plane3;
> >         igt_plane_t *plane4;
> > +       bool extended;
> >  } data_t;
> >  
> >  static int get_num_scalers(data_t* d, enum pipe pipe)
> > @@ -221,6 +223,28 @@ static bool can_scale(data_t *d, unsigned format)
> >         }
> >  }
> >  
> > +static bool test_format(data_t *data,
> > +                       struct igt_vec *tested_formats,
> > +                       uint32_t format)
> > +{
> > +       if (!igt_fb_supported_format(format))
> > +               return false;
> > +
> > +       if (!is_i915_device(data->drm_fd) ||
> > +           data->extended)
> > +               return true;
> > +
> > +       format = igt_reduce_format(format);
> > +
> > +       /* only test each format "class" once */
> > +       if (igt_vec_index(tested_formats, &format) >= 0)
> > +               return false;
> > +
> > +       igt_vec_push(tested_formats, &format);
> 
> Ok, that does exactly what you describe.
> 
> However, that lookup is giving me the shivers, but it does the job so
> long as we don't have too many formats.

Yeah, this being the reduced format we should only have a handful of
these. But I'd be totally fine using a better data structure if
someone wants to write me one ;)

> 
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Thanks.

-- 
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2020-01-30 15:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-30 15:12 [igt-dev] [PATCH i-g-t 1/3] lib/vec: Add igt_vec Ville Syrjala
2020-01-30 15:12 ` [igt-dev] [PATCH i-g-t 2/3] lib/igt_kms: Add igt_reduce_format() Ville Syrjala
2020-01-30 15:38   ` Chris Wilson
2020-02-03 16:35   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2020-01-30 15:12 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_plane_scaling: Don't test every pixel format Ville Syrjala
2020-01-30 15:40   ` Chris Wilson
2020-01-30 15:57     ` Ville Syrjälä [this message]
2020-01-30 15:31 ` [igt-dev] [PATCH i-g-t 1/3] lib/vec: Add igt_vec Chris Wilson
2020-01-30 15:54   ` Ville Syrjälä
2020-01-30 16:00     ` Chris Wilson
2020-01-30 16:10 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] " Patchwork
2020-02-02  4:41 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-02-03 16:34 ` [igt-dev] [PATCH i-g-t v2 1/3] " Ville Syrjala
2020-02-04 12:36 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/3] lib/vec: Add igt_vec (rev3) Patchwork
2020-02-06 10:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200130155718.GF13686@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.