[igt-dev] [PATCH i-g-t] igt/kms_frontbuffer_tracking: Skip over IGT_DRAW_BLT when there's no BLT
Petri Latvala
petri.latvala at intel.com
Mon Sep 16 12:06:04 UTC 2019
On Sun, Sep 15, 2019 at 10:39:48AM +0100, Chris Wilson wrote:
> If the blitter is not available, we cannot use it as a source for dirty
> rectangles. We shall have to rely on the other engines to create GPU
> dirty instead.
>
> v2: Try using lots of subgroup+fixtures
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Petri Latvala <petri.latvala at intel.com>
> ---
> tests/kms_frontbuffer_tracking.c | 58 ++++++++++++++++++++++++++++++--
> 1 file changed, 56 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
> index c788b59ee..eaa4b6ef1 100644
> --- a/tests/kms_frontbuffer_tracking.c
> +++ b/tests/kms_frontbuffer_tracking.c
> @@ -3022,6 +3022,9 @@ static void basic_subtest(const struct test_mode *t)
> fb1 = params->primary.fb;
>
> for (r = 0, method = 0; method < IGT_DRAW_METHOD_COUNT; method++, r++) {
> + if (method == IGT_DRAW_BLT && !gem_has_blitter(drm.fd))
> + continue;
> +
> if (r == pattern->n_rects) {
> params->primary.fb = (params->primary.fb == fb1) ? &fb2 : fb1;
>
> @@ -3248,10 +3251,11 @@ static const char *flip_str(enum flip_type flip)
> continue; \
> if (!opt.show_hidden && t.fbs == FBS_SHARED && \
> (t.plane == PLANE_CUR || t.plane == PLANE_SPR)) \
> - continue;
> + continue; \
> + igt_subtest_group {
>
>
> -#define TEST_MODE_ITER_END } } } } } }
> +#define TEST_MODE_ITER_END } } } } } } }
>
> struct option long_options[] = {
> { "no-status-check", 0, 0, 's'},
> @@ -3297,6 +3301,10 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
> }
>
> TEST_MODE_ITER_BEGIN(t)
> + igt_fixture {
> + if (t.method == IGT_DRAW_BLT)
> + gem_require_blitter(drm.fd);
> + }
> igt_subtest_f("%s-%s-%s-%s-%s-draw-%s",
> feature_str(t.feature),
> pipes_str(t.pipes),
> @@ -3313,6 +3321,11 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
> (!opt.show_hidden && t.method != IGT_DRAW_BLT))
> continue;
>
> + igt_fixture {
> + if (t.method == IGT_DRAW_BLT)
> + gem_require_blitter(drm.fd);
> + }
> +
> for (t.flip = 0; t.flip < FLIP_COUNT; t.flip++)
> igt_subtest_f("%s-%s-%s-%s-%sflip-%s",
> feature_str(t.feature),
> @@ -3331,6 +3344,11 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
> (t.feature & FEATURE_FBC) == 0)
> continue;
>
> + igt_fixture {
> + if (t.method == IGT_DRAW_BLT)
> + gem_require_blitter(drm.fd);
> + }
> +
> igt_subtest_f("%s-%s-%s-fliptrack",
> feature_str(t.feature),
> pipes_str(t.pipes),
> @@ -3344,6 +3362,11 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
> t.plane == PLANE_PRI)
> continue;
>
> + igt_fixture {
> + if (t.method == IGT_DRAW_BLT)
> + gem_require_blitter(drm.fd);
> + }
> +
> igt_subtest_f("%s-%s-%s-%s-%s-move",
> feature_str(t.feature),
> pipes_str(t.pipes),
> @@ -3367,6 +3390,11 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
> t.plane != PLANE_SPR)
> continue;
>
> + igt_fixture {
> + if (t.method == IGT_DRAW_BLT)
> + gem_require_blitter(drm.fd);
> + }
> +
> igt_subtest_f("%s-%s-%s-%s-%s-fullscreen",
> feature_str(t.feature),
> pipes_str(t.pipes),
> @@ -3383,6 +3411,11 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
> (!opt.show_hidden && t.fbs != FBS_INDIVIDUAL))
> continue;
>
> + igt_fixture {
> + if (t.method == IGT_DRAW_BLT)
> + gem_require_blitter(drm.fd);
> + }
> +
> igt_subtest_f("%s-%s-%s-%s-multidraw",
> feature_str(t.feature),
> pipes_str(t.pipes),
> @@ -3399,6 +3432,11 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
> t.method != IGT_DRAW_MMAP_GTT)
> continue;
>
> + igt_fixture {
> + if (t.method == IGT_DRAW_BLT)
> + gem_require_blitter(drm.fd);
> + }
> +
> igt_subtest_f("%s-farfromfence", feature_str(t.feature))
> farfromfence_subtest(&t);
> TEST_MODE_ITER_END
> @@ -3410,6 +3448,11 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
> t.fbs != FBS_INDIVIDUAL)
> continue;
>
> + igt_fixture {
> + if (t.method == IGT_DRAW_BLT)
> + gem_require_blitter(drm.fd);
> + }
> +
> for (t.format = 0; t.format < FORMAT_COUNT; t.format++) {
> /* Skip what we already tested. */
> if (t.format == FORMAT_DEFAULT)
> @@ -3429,6 +3472,12 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
> t.plane != PLANE_PRI ||
> t.method != IGT_DRAW_BLT)
> continue;
> +
> + igt_fixture {
> + if (t.method == IGT_DRAW_BLT)
> + gem_require_blitter(drm.fd);
> + }
> +
> igt_subtest_f("%s-%s-scaledprimary",
> feature_str(t.feature),
> fbs_str(t.fbs))
> @@ -3443,6 +3492,11 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
> t.method != IGT_DRAW_BLT)
> continue;
>
> + igt_fixture {
> + if (t.method == IGT_DRAW_BLT)
> + gem_require_blitter(drm.fd);
> + }
> +
> igt_subtest_f("%s-modesetfrombusy", feature_str(t.feature))
> modesetfrombusy_subtest(&t);
>
> --
> 2.23.0
>
> _______________________________________________
> igt-dev mailing list
> igt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
More information about the igt-dev
mailing list