All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 09/14] drm/i915: Introduce i9xx_check_plane_surface()
Date: Mon, 20 Mar 2017 17:33:08 +0000	[thread overview]
Message-ID: <20170320173308.GK8004@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <20170320170755.GY31595@intel.com>

On Mon, Mar 20, 2017 at 07:07:55PM +0200, Ville Syrjälä wrote:
> On Fri, Mar 17, 2017 at 10:04:32PM +0000, Chris Wilson wrote:
> > On Fri, Mar 17, 2017 at 11:18:03PM +0200, ville.syrjala@linux.intel.com wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > Extract the primary plane surfae offset/x/y calculations for
> > > pre-SKL platforms into a common function, and call it during the
> > > atomic check phase to reduce the amount of stuff we have to do
> > > during the commit phase. SKL is already doing this.
> > > 
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/intel_display.c | 82 ++++++++++++++++++++++--------------
> > >  1 file changed, 50 insertions(+), 32 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > > index 2e0106a11f8f..024614cb47b6 100644
> > > --- a/drivers/gpu/drm/i915/intel_display.c
> > > +++ b/drivers/gpu/drm/i915/intel_display.c
> > > @@ -3026,6 +3026,43 @@ static u32 i9xx_plane_ctl(const struct intel_crtc_state *crtc_state,
> > >  	return dspcntr;
> > >  }
> > >  
> > > +static int i9xx_check_plane_surface(struct intel_plane_state *plane_state)
> > > +{
> > > +	struct drm_i915_private *dev_priv =
> > > +		to_i915(plane_state->base.plane->dev);
> > > +	int src_x = plane_state->base.src.x1 >> 16;
> > > +	int src_y = plane_state->base.src.y1 >> 16;
> > > +	u32 offset;
> > > +
> > > +	intel_add_fb_offsets(&src_x, &src_y, plane_state, 0);
> > > +
> > > +	if (INTEL_GEN(dev_priv) >= 4)
> > > +		offset = intel_compute_tile_offset(&src_x, &src_y,
> > > +						   plane_state, 0);
> > > +	else
> > > +		offset = 0;
> > > +
> > > +	/* HSW+ does this automagically in hardware */
> > > +	if (!IS_HASWELL(dev_priv) && !IS_BROADWELL(dev_priv)) {
> > 
> > if (INTEL_GEN() <= 7 && !IS_HASWELL()) {
> > 
> > would match the comment better.
> 
> That would leave out CHV.
> 
> I think 'HAS_GMCH || IS_GEN5 || IS_GEN6 || IS_IVB' might be
> a semi-decent way to put this. But it's still not quite as
> succinct as '!HSW && !BDW'.
> 
> What about if I just change the comment to "HSW/BDW do this ..."?

Prevents me showing my ignorance in that chv isn't include in that set.
Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-03-20 17:33 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-17 21:17 [PATCH 00/14] drm/i915: Moar plane update optimizations ville.syrjala
2017-03-17 21:17 ` [PATCH 01/14] drm/i915: Extract skl_plane_ctl() ville.syrjala
2017-03-17 21:46   ` Chris Wilson
2017-03-17 21:17 ` [PATCH 02/14] drm/i915: Use skl_plane_ctl() for the SKL "sprite" planes ville.syrjala
2017-03-17 21:48   ` Chris Wilson
2017-03-20 16:09     ` Ville Syrjälä
2017-03-20 16:16       ` Chris Wilson
2017-03-17 21:17 ` [PATCH 03/14] drm/i915: Extract i9xx_plane_ctl() ville.syrjala
2017-03-17 21:50   ` Chris Wilson
2017-03-20 16:47   ` [PATCH v2 03/14] drm/i915: Extract i9xx_plane_ctl() and ironlake_plane_ctl() ville.syrjala
2017-03-20 16:47     ` [PATCH 03.5/14] drm/i915: Nuke ironlake_plane_ctl() ville.syrjala
2017-03-17 21:17 ` [PATCH 04/14] drm/i915: Extract vlv_sprite_ctl() ville.syrjala
2017-03-17 21:51   ` Chris Wilson
2017-03-17 21:17 ` [PATCH 05/14] drm/i915: Extract ivb_sprite_ctl() ville.syrjala
2017-03-17 21:54   ` Chris Wilson
2017-03-17 21:18 ` [PATCH 06/14] drm/i915: Extract ilk_sprite_ctl() ville.syrjala
2017-03-17 21:54   ` Chris Wilson
2017-03-17 21:18 ` [PATCH 07/14] drm/i915: Extract i845_cursor_ctl() and i9xx_cursor_ctl() ville.syrjala
2017-03-17 21:58   ` Chris Wilson
2017-03-17 21:18 ` [PATCH 08/14] drm/i915: Pre-compute plane control register value ville.syrjala
2017-03-17 22:01   ` Chris Wilson
2017-03-17 21:18 ` [PATCH 09/14] drm/i915: Introduce i9xx_check_plane_surface() ville.syrjala
2017-03-17 22:04   ` Chris Wilson
2017-03-20 17:07     ` Ville Syrjälä
2017-03-20 17:33       ` Chris Wilson [this message]
2017-03-17 21:18 ` [PATCH 10/14] drm/i915: Eliminate ironlake_update_primary_plane() ville.syrjala
2017-03-17 22:06   ` Chris Wilson
2017-03-17 21:18 ` [PATCH 11/14] drm/i915: Use i9xx_check_plane_surface() for sprite planes as well ville.syrjala
2017-03-17 21:18 ` [PATCH 12/14] drm/i915: Keep vblanks enabled during the entire pipe update ville.syrjala
2017-03-17 21:28   ` Chris Wilson
2017-03-17 21:18 ` [RFC][PATCH 13/14] WIP/drm/i915: Protect the entire pipe update with uncore.lock ville.syrjala
2017-03-17 21:32   ` Chris Wilson
2017-03-17 21:18 ` [RFC][PATCH 14/14] WIP/drm/i915: Nuke posting reads from plane updates ville.syrjala
2017-03-17 22:12   ` Chris Wilson
2017-03-22 10:42     ` Maarten Lankhorst
2017-03-17 21:36 ` ✓ Fi.CI.BAT: success for drm/i915: Moar plane update optimizations Patchwork
2017-03-20 16:49 ` ✗ Fi.CI.BAT: failure for drm/i915: Moar plane update optimizations (rev3) Patchwork
2017-03-23 14:06 ` [PATCH 00/14] drm/i915: Moar plane update optimizations Ville Syrjälä

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=20170320173308.GK8004@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@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.