All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 5/5] lib/igt_fb: Fix blitter limit checks
Date: Wed, 17 Apr 2019 21:52:21 +0100	[thread overview]
Message-ID: <155553434163.25904.14068687609399550170@skylake-alporthouse-com> (raw)
In-Reply-To: <20190417203544.22298-5-ville.syrjala@linux.intel.com>

Quoting Ville Syrjala (2019-04-17 21:35:44)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The earlier approach of checking the higher tiled stride
> limit has backfired. All out blits are between tiled and
> linear, but we only ever check this for the tiled fb. Thus
> we are taking the blitter path even though the linear fb
> exceeds the blitter limits. So let's just check the limits
> as if we are operating on linear fbs.
> 
> And let's toss in some width/height checks, and let's do
> the checks for all the color planes as well.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  lib/igt_fb.c | 26 +++++++++++++++++---------
>  1 file changed, 17 insertions(+), 9 deletions(-)
> 
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 794f0eef04a3..65fc94f98a69 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -1580,29 +1580,37 @@ struct fb_blit_upload {
>         struct intel_batchbuffer *batch;
>  };
>  
> -static int max_blitter_stride(int fd, uint64_t modifier)
> +static bool blitter_ok(const struct igt_fb *fb)
>  {
> -       int stride = 32768;
> -
> -       if (intel_gen(intel_get_drm_devid(fd)) >= 4 &&
> -           modifier != DRM_FORMAT_MOD_NONE)
> -               stride *= 4;
> +       for (int i = 0; i < fb->num_planes; i++) {
> +               /*
> +                * gen4+ stride limit is 4x this with tiling,
> +                * but since our blits are always between tiled
> +                * and linear and we do this check just for the
> +                * tiled fb we must use the lower linear stride
> +                * limit here.
> +                */

I had to read this a couple of times before I realised you meant
"but since our blits are always between tiled and linear surfaces,
we must use the lower limit for linear surfaces here".

So the fun fact about tiled surfaces having their limit in dwords was a
complete red herring. Sorry.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-04-17 20:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-17 20:35 [igt-dev] [PATCH i-g-t 1/5] lib/igt_fb: Unref the renderecopy scratch bos Ville Syrjala
2019-04-17 20:35 ` [igt-dev] [PATCH i-g-t 2/5] tests/i915/gem_render_copy: Don't leak bos between subtests Ville Syrjala
2019-04-17 20:41   ` Chris Wilson
2019-04-18 12:11   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2019-04-17 20:35 ` [igt-dev] [PATCH i-g-t 3/5] lib/intel_batchbuffer: Make blitter asserts more useful Ville Syrjala
2019-04-17 20:46   ` Chris Wilson
2019-04-18 11:52     ` Ville Syrjälä
2019-04-18 12:11   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2019-04-17 20:35 ` [igt-dev] [PATCH i-g-t 4/5] lib/igt_fb: Nuke redundant rendercopy cairo surface variant Ville Syrjala
2019-04-17 20:47   ` Chris Wilson
2019-04-18 11:53     ` Ville Syrjälä
2019-04-18 12:12   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2019-04-17 20:35 ` [igt-dev] [PATCH i-g-t 5/5] lib/igt_fb: Fix blitter limit checks Ville Syrjala
2019-04-17 20:52   ` Chris Wilson [this message]
2019-04-18 12:07     ` Ville Syrjälä
2019-04-18 12:12   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2019-04-17 20:38 ` [igt-dev] [PATCH i-g-t 1/5] lib/igt_fb: Unref the renderecopy scratch bos Chris Wilson
2019-04-18 11:51   ` Ville Syrjälä
2019-04-17 22:55 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/5] " Patchwork
2019-04-18 12:09 ` [igt-dev] [PATCH i-g-t v2 1/5] " Ville Syrjala
2019-04-18 12:50 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/5] lib/igt_fb: Unref the renderecopy scratch bos (rev6) Patchwork
2019-04-18 15:20 ` [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=155553434163.25904.14068687609399550170@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --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.