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: [Intel-gfx] [PATCH 1/3] drm/i915: Disallow plane x+w>stride on ilk+ with X-tiling
Date: Tue, 9 Feb 2021 16:51:00 +0200 [thread overview]
Message-ID: <YCKhVOp5gpFi35mt@intel.com> (raw)
In-Reply-To: <YCKfvPL+j34G/YGb@intel.com>
On Tue, Feb 09, 2021 at 04:44:12PM +0200, Ville Syrjälä wrote:
> On Tue, Feb 09, 2021 at 09:50:28AM +0000, Chris Wilson wrote:
> > Quoting Chris Wilson (2021-02-09 09:22:09)
> > > Quoting Ville Syrjala (2021-02-09 02:19:16)
> > > > + while ((src_x + src_w) * cpp > plane_state->color_plane[0].stride) {
> > > > + if (offset == 0) {
> > > > + drm_dbg_kms(&dev_priv->drm,
> > > > + "Unable to find suitable display surface offset due to X-tiling\n");
> > > > + return -EINVAL;
> > > > + }
> > > > +
> > > > + offset = intel_plane_adjust_aligned_offset(&src_x, &src_y, plane_state, 0,
> > > > + offset, offset - alignment);
> >
> > > The reason for choosing a nearby tile offset was to reduce src_x/src_y
> > > to fit within the crtc limits. While remapping could be used to solve
> > > that, the aligned_offset computation allows reuse of a single view.
> >
> > Should there not be a second constraint on the loop to make sure src_x +
> > src_w is less than 4095/8191/etc?
>
> Yeah, but we don't have that in the skl code either atm.
> Should add it to both.
Actually no. We already cap the max stride such that it never
exceeds that limit. So the single check already covers that.
What I think we should be checking is that src_y stays below the
appropriate limit. Although I'm not sure if we could realistically
hit a case where that fails but still find a suitably aligned
offset before hitting 0. Oh and I've not actually confirmed
whether src_y+src_h also has an upper limit or not.
--
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:[~2021-02-09 14:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-09 2:19 [Intel-gfx] [PATCH 1/3] drm/i915: Disallow plane x+w>stride on ilk+ with X-tiling Ville Syrjala
2021-02-09 2:19 ` [Intel-gfx] [PATCH 2/3] drm/i915: Fix overlay frontbuffer tracking Ville Syrjala
2021-02-09 9:33 ` Chris Wilson
2021-02-09 2:19 ` [Intel-gfx] [PATCH 3/3] drm/i915: Warn when releasing a frontbuffer while in use Ville Syrjala
2021-02-09 9:39 ` Chris Wilson
2021-02-09 2:51 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: Disallow plane x+w>stride on ilk+ with X-tiling Patchwork
2021-02-09 3:22 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2021-02-09 15:09 ` Ville Syrjälä
2021-02-09 9:22 ` [Intel-gfx] [PATCH 1/3] " Chris Wilson
2021-02-09 9:50 ` Chris Wilson
2021-02-09 14:44 ` Ville Syrjälä
2021-02-09 14:51 ` Ville Syrjälä [this message]
2021-02-09 15:21 ` Ville Syrjälä
2021-02-10 12:05 ` Juha-Pekka Heikkila
2021-02-09 17:09 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/3] " Patchwork
2021-02-09 21:15 ` [Intel-gfx] ✓ 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=YCKhVOp5gpFi35mt@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