Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] igt/kms_frontbuffer_tracking: Skip over IGT_DRAW_BLT when there's no BLT

2019-09-16 Thread Chris Wilson
Quoting Petri Latvala (2019-09-16 13:06:04)
> 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 
> 
> 
> Reviewed-by: Petri Latvala 

Sadly, it needs a bit massaging of the underlying library to avoid using
the blitter it seems. Or I've missed a method == IGT_DRAW_BLT. (But iirc
there's some paths where the fb lib uses the blitter to detile.)
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] igt/kms_frontbuffer_tracking: Skip over IGT_DRAW_BLT when there's no BLT

2019-09-16 Thread Petri Latvala
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 


Reviewed-by: Petri Latvala 


> ---
>  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) ?  
> : 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 {
> +