intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/5] drm/i915: Use intel_fb_gtt_offset() also for gen2/3 primary plane
Date: Tue, 8 Nov 2016 15:55:19 +0200	[thread overview]
Message-ID: <20161108135519.GJ4617@intel.com> (raw)
In-Reply-To: <20161107212005.GR30925@nuc-i3427.alporthouse.com>

On Mon, Nov 07, 2016 at 09:20:05PM +0000, Chris Wilson wrote:
> On Mon, Nov 07, 2016 at 10:20:57PM +0200, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > The code to determine the primary plane offset for gen2/3 looks
> > different than the code for gen4+, but in fact it's doing the same
> > thing. Let's make it uniform. Allows us to eliminate the 'obj' from
> > the list of local variables as well.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 8 +++++---
> >  1 file changed, 5 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 817ed3f320f7..3d519d701e1c 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -3017,7 +3017,6 @@ static void i9xx_update_primary_plane(struct drm_plane *primary,
> >  	struct drm_i915_private *dev_priv = to_i915(dev);
> >  	struct intel_crtc *intel_crtc = to_intel_crtc(crtc_state->base.crtc);
> >  	struct drm_framebuffer *fb = plane_state->base.fb;
> > -	struct drm_i915_gem_object *obj = intel_fb_obj(fb);
> >  	int plane = intel_crtc->plane;
> >  	u32 linear_offset;
> >  	u32 dspcntr;
> > @@ -3112,8 +3111,11 @@ static void i9xx_update_primary_plane(struct drm_plane *primary,
> >  			   intel_crtc->dspaddr_offset);
> >  		I915_WRITE(DSPTILEOFF(plane), (y << 16) | x);
> >  		I915_WRITE(DSPLINOFF(plane), linear_offset);
> > -	} else
> > -		I915_WRITE(DSPADDR(plane), i915_gem_object_ggtt_offset(obj, NULL) + linear_offset);
> > +	} else {
> > +		I915_WRITE(DSPADDR(plane),
> > +			   intel_fb_gtt_offset(fb, rotation) +
> > +			   intel_crtc->dspaddr_offset);
> 
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Patches 3-5 pushed to dinq. Thanks for the review.

> 
> Though the reader might notice the same offset being passed to both gen4+
> DSPSURF and gen3- DSPADDR, and might reasonably ask if they should be
> sharing a variable.

Perhaps. I think I'll be merging the pre-ilk and ilk codepaths soon,
so I'll see if I can reorganize some of this offset stuff at the same
time a bit.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-11-08 13:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07 20:20 [PATCH 0/5] drm/i915: Assortment of plane fixes ville.syrjala
2016-11-07 20:20 ` [PATCH 1/5] drm/i915: Fix scaling check for 90/270 degree plane rotation ville.syrjala
2016-11-07 21:28   ` Chris Wilson
2016-11-08 10:58     ` Ville Syrjälä
2016-11-07 20:20 ` [PATCH 2/5] drm/i915: Ignore bogus plane coordinates on SKL when the plane is not visible ville.syrjala
2017-01-17 22:05   ` Matt Roper
2017-01-17 22:27     ` Matt Roper
2016-11-07 20:20 ` [PATCH 3/5] drm/i915: Grab the rotation from the passed plane state for VLV sprites ville.syrjala
2016-11-07 21:20   ` Chris Wilson
2016-11-07 20:20 ` [PATCH 4/5] drm/i915: Fix error handling for cursor/sprite plane create failure ville.syrjala
2016-11-07 21:17   ` Chris Wilson
2016-11-07 20:20 ` [PATCH 5/5] drm/i915: Use intel_fb_gtt_offset() also for gen2/3 primary plane ville.syrjala
2016-11-07 21:20   ` Chris Wilson
2016-11-08 13:55     ` Ville Syrjälä [this message]
2016-11-07 20:45 ` ✓ Fi.CI.BAT: success for drm/i915: Assortment of plane fixes 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=20161108135519.GJ4617@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).