From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org,
Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t v3 1/2] lib/igt_fb: Don't use blitter for large buffers
Date: Tue, 9 Apr 2019 15:25:55 +0300 [thread overview]
Message-ID: <20190409122554.GK3888@intel.com> (raw)
In-Reply-To: <155474405002.26510.886493900127464002@skylake-alporthouse-com>
On Mon, Apr 08, 2019 at 06:20:50PM +0100, Chris Wilson wrote:
> Quoting Chris Wilson (2019-04-08 18:19:26)
> > Quoting Ville Syrjala (2019-04-08 18:13:06)
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > The blitter stride is limited to <32k. Fall back to gtt mmap or
> > > rendercopy if we're about to exceed that.
> > >
> > > Not quite sure why we're not just using gtt mmap for Y tiling
> > > always. But let's keep it like that for now.
> > >
> > > v2: Use rendercopy as the fallback for Yf
> > > v3: Deal with gen4+ tiled stride correctly (Chris)
> > >
> > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > > lib/igt_fb.c | 36 +++++++++++++++++++++++++++++-------
> > > 1 file changed, 29 insertions(+), 7 deletions(-)
> > >
> > > diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> > > index 6adf422228e8..d2f756dba2e9 100644
> > > --- a/lib/igt_fb.c
> > > +++ b/lib/igt_fb.c
> > > @@ -1576,6 +1576,31 @@ struct fb_blit_upload {
> > > struct intel_batchbuffer *batch;
> > > };
> > >
> > > +static int max_blitter_stride(int fd, uint64_t modifier)
> > > +{
> > > + int stride = 32768;
> > > +
> > > + if (intel_gen(intel_get_drm_devid(fd)) >= 4 &&
> > > + modifier != DRM_FORMAT_MOD_NONE)
> >
> > * fingers crossed that the modifier is the single truth
> >
> > > + stride *= 4;
> > > +
> > > + return stride;
> > > +}
> > > +
> > > +static bool use_rendercopy(const struct igt_fb *fb)
> > > +{
> > > + return is_ccs_modifier(fb->modifier) ||
> > > + (fb->modifier == I915_FORMAT_MOD_Yf_TILED &&
> > > + fb->strides[0] >= max_blitter_stride(fb->fd, fb->modifier));
> > > +}
> > > +
> > > +static bool use_blitter(const struct igt_fb *fb)
> > > +{
> > > + return (fb->modifier == I915_FORMAT_MOD_Y_TILED ||
> > > + fb->modifier == I915_FORMAT_MOD_Yf_TILED) &&
>
> Oh but you would prefer to use rendercopy for Y_TILED (not just
> Yf_TILED). The blitter does work with Y_TILED, but it is quite slow.
Or we could just switch Y tiled to always use gtt mmap?
I'm not sure why it wants to use the blitter. Some historical
reason I presume.
--
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-04-09 12:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-28 17:54 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Don't use blitter for large buffers Ville Syrjala
2019-03-28 17:54 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_fb: Don't leak the bufmgr and batch for converted surfaces Ville Syrjala
2019-04-02 23:01 ` Dhinakaran Pandiyan
2019-03-28 18:17 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_fb: Don't use blitter for large buffers Patchwork
2019-03-28 18:25 ` [igt-dev] [PATCH i-g-t 1/2] " Chris Wilson
2019-04-02 22:41 ` Dhinakaran Pandiyan
2019-04-03 15:24 ` Ville Syrjälä
2019-03-29 4:20 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] " Patchwork
2019-04-08 17:13 ` [igt-dev] [PATCH i-g-t v3 1/2] " Ville Syrjala
2019-04-08 17:19 ` Chris Wilson
2019-04-08 17:20 ` Chris Wilson
2019-04-09 12:25 ` Ville Syrjälä [this message]
2019-04-09 19:49 ` Chris Wilson
2019-04-09 20:12 ` Ville Syrjälä
2019-04-08 18:02 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/2] lib/igt_fb: Don't use blitter for large buffers (rev2) Patchwork
2019-04-08 21:09 ` [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=20190409122554.GK3888@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=dhinakaran.pandiyan@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox