From: Martin Peres <martin.peres@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: Speed up by not testing every format
Date: Fri, 21 Feb 2020 09:16:00 +0200 [thread overview]
Message-ID: <23cbeaa2-70fd-58b1-5899-dbb91d8bca21@linux.intel.com> (raw)
In-Reply-To: <20200214165502.21990-1-ville.syrjala@linux.intel.com>
On 2020-02-14 18:55, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> As we did with kms_plane_scaling let's not test every pixel
> format for rotation fails either. Instead we test each "class"
> of formats as defined by igt_reduce_format(). The hope being
> that there are no specific bugs in the hw for different
> swizzles of the same underlying base format.
>
> On KBL:
> $ time ./build/tests/kms_rotation_crc --r sprite-rotation-90
> - real 0m39,851s
> - user 0m1,037s
> - sys 0m12,895s
> + real 0m16,773s
> + user 0m0,357s
> + sys 0m5,475s
>
> As per the usual recipe we add an --extended cmdline knob to
> force the full coverage.
>
> Only cuts ~30% of the total kms_rotation_crc runtime though.
> There are other subtests which take over 80s on this particular
> machine, so further work is clearly required to get the testing
> time to sane levels.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
This cuts the execution time of the test from 00:15:07 -> 00:06:53 on
TGL, so this is definitely welcomed!
As for the patch itself, I agree with the approach and I like that you
added the --extended flag just to cover our basis. One day, we should
work on running these extended tests randomly, but today is not the day.
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
Thanks!
> ---
> tests/kms_rotation_crc.c | 58 +++++++++++++++++++++++++++++++++++++---
> 1 file changed, 55 insertions(+), 3 deletions(-)
>
> diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
> index 2a7b10e990e2..fc4c13389953 100644
> --- a/tests/kms_rotation_crc.c
> +++ b/tests/kms_rotation_crc.c
> @@ -23,6 +23,7 @@
> */
>
> #include "igt.h"
> +#include "igt_vec.h"
> #include <math.h>
>
> #define MAX_FENCES 32
> @@ -65,6 +66,7 @@ typedef struct {
>
> struct p_struct *multiplaneoldview;
> struct p_point planepos[MAXMULTIPLANESAMOUNT];
> + bool extended;
> } data_t;
>
> typedef struct {
> @@ -371,6 +373,28 @@ static void test_single_case(data_t *data, enum pipe pipe,
> }
> }
>
> +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->gfx_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);
> +
> + return true;
> +}
> +
> static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_format)
> {
> igt_display_t *display = &data->display;
> @@ -408,15 +432,21 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
> continue;
>
> if (!data->override_fmt) {
> + struct igt_vec tested_formats;
> +
> + igt_vec_init(&tested_formats, sizeof(uint32_t));
> +
> for (j = 0; j < plane->drm_plane->count_formats; j++) {
> uint32_t format = plane->drm_plane->formats[j];
>
> - if (!igt_fb_supported_format(format))
> + if (!test_format(data, &tested_formats, format))
> continue;
>
> test_single_case(data, pipe, output, plane, i,
> format, test_bad_format);
> }
> +
> + igt_vec_fini(&tested_formats);
> } else {
> test_single_case(data, pipe, output, plane, i,
> data->override_fmt, test_bad_format);
> @@ -738,7 +768,30 @@ static const char *tiling_test_str(uint64_t tiling)
> }
> }
>
> -igt_main
> +static int opt_handler(int opt, int opt_index, void *_data)
> +{
> + data_t *data = _data;
> +
> + switch (opt) {
> + case 'e':
> + data->extended = true;
> + break;
> + }
> +
> + return IGT_OPT_HANDLER_SUCCESS;
> +}
> +
> +static const struct option long_opts[] = {
> + { .name = "extended", .has_arg = false, .val = 'e', },
> + {}
> +};
> +
> +static const char help_str[] =
> + " --extended\t\tRun the extended tests\n";
> +
> +static data_t data;
> +
> +igt_main_args("", long_opts, help_str, opt_handler, &data)
> {
> struct rot_subtest {
> unsigned plane;
> @@ -771,7 +824,6 @@ igt_main
> { 0, 0 }
> };
>
> - data_t data = {};
> int gen = 0;
>
> igt_fixture {
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
prev parent reply other threads:[~2020-02-21 7:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-14 16:55 [igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: Speed up by not testing every format Ville Syrjala
2020-02-14 18:48 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-02-15 21:02 ` [igt-dev] [PATCH i-g-t] " Chris Wilson
2020-02-17 22:43 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork
2020-02-21 7:16 ` Martin Peres [this message]
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=23cbeaa2-70fd-58b1-5899-dbb91d8bca21@linux.intel.com \
--to=martin.peres@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/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.