From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 4/5] drm/i915: Bump gen4+ fb stride limit to 256KiB
Date: Fri, 14 Sep 2018 15:52:56 +0300 [thread overview]
Message-ID: <20180914125256.GZ5565@intel.com> (raw)
In-Reply-To: <153687044580.23741.15459993048467649492@skylake-alporthouse-com>
On Thu, Sep 13, 2018 at 09:27:25PM +0100, Chris Wilson wrote:
> Quoting Ville Syrjala (2018-09-13 21:01:39)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > With gtt remapping plugged in we can simply raise the stride
> > limit on gen4+. Let's just arbitraily pick 256 KiB as the limit.
> >
> > No remapping CCS because the virtual address of each page actually
> > matters due to the new hash mode
> > (WaCompressedResourceDisplayNewHashMode:skl,kbl etc.), and no remapping
> > on gen2/3 due to lack of fence on the remapped vma.
> >
> > v2: Rebase due to is_ccs_modifier()
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_display.c | 13 +++++++++++++
> > 1 file changed, 13 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 93b0de594c5d..346572cf734a 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -2506,6 +2506,19 @@ static
> > u32 intel_fb_max_stride(struct drm_i915_private *dev_priv,
> > u32 pixel_format, u64 modifier)
> > {
> > + /*
> > + * Arbitrary limit for gen4+. We can deal with any page
> > + * aligned stride via GTT remapping. Gen2/3 need a fence
> > + * for tiled scanout which the remapped vma won't have,
> > + * so we don't allow remapping on those platforms.
> > + *
> > + * Also the new hash mode we use for CCS isn't compatible
> > + * with remapping as the virtual address of the pages
> > + * affects the compressed data.
> > + */
> > + if (INTEL_GEN(dev_priv) >= 4 && !is_ccs_modifier(modifier))
> > + return 256*1024;
>
> If arbitrary, why 256k? Will we not go beyond 8 bytes per pixel in the
> future?
I'm not aware of 32bpc formats being a thing for the display. 16bpc is
a thing for sure and that was on factor I used to pick the 256 KiB.
Another one was the max fence stride we support is 256KiB. While that's
not necessarily important these days I figured at least it's a limit
we already have elsewhere so should hopefully avoid some unknown
overflows :)
> If you used U32_MAX then we will just reject v.large strides on
> other grounds (too large for GTT, stride/size overflow).
>
> Hmm, or is the 256k to keep the overflow checks simpler?
I was trying to keep it reasonably low to avoid introducing more
overflow possibilities. But I think I will have to review more of
the existing code against those even with the 256KiB limit. Didn't
really think through the tile/aligned offset calculations yet to
see if they are in danger now.
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-09-14 12:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-13 20:01 [PATCH v2 0/5] drm/i915: drm/i915: GTT remapping for display Ville Syrjala
2018-09-13 20:01 ` [PATCH v2 1/5] drm/i915: Decouple SKL stride units from intel_fb_stride_alignment() Ville Syrjala
2018-09-13 20:01 ` [PATCH v2 2/5] drm/i915: Add a new "remapped" gtt_view Ville Syrjala
2018-09-13 20:19 ` Chris Wilson
2018-09-14 12:58 ` Ville Syrjälä
2018-09-14 13:00 ` Chris Wilson
2018-09-13 20:01 ` [PATCH v2 3/5] drm/i915: Overcome display engine stride limits via GTT remapping Ville Syrjala
2018-09-13 20:16 ` Chris Wilson
2018-09-13 20:01 ` [PATCH v2 4/5] drm/i915: Bump gen4+ fb stride limit to 256KiB Ville Syrjala
2018-09-13 20:27 ` Chris Wilson
2018-09-14 12:52 ` Ville Syrjälä [this message]
2018-09-13 20:01 ` [PATCH v2 5/5] drm/i915: Bump gen4+ fb size limits to 32kx32k Ville Syrjala
2018-09-19 16:59 ` Ville Syrjälä
2018-09-20 8:09 ` Chris Wilson
2018-09-20 19:41 ` Ville Syrjälä
2018-09-20 19:46 ` Chris Wilson
2018-09-21 12:18 ` Ville Syrjälä
2018-09-13 21:01 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: drm/i915: GTT remapping for display Patchwork
2018-09-13 21:03 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-09-13 21:21 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-09-14 4:40 ` ✓ Fi.CI.BAT: success " Patchwork
2018-09-14 7:52 ` ✓ 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=20180914125256.GZ5565@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@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;
as well as URLs for NNTP newsgroup(s).