public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 8/9] drm/i915: Use state->visible in wm calculation
Date: Tue, 10 Mar 2015 20:01:10 +0200	[thread overview]
Message-ID: <20150310180110.GL11371@intel.com> (raw)
In-Reply-To: <20150310171956.GK27526@intel.com>

On Tue, Mar 10, 2015 at 10:19:56AM -0700, Matt Roper wrote:
> On Tue, Mar 10, 2015 at 01:15:28PM +0200, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The actual diff here needs to be regenerated since my patch got merged
> and changed this area of the code, but your final solution looks right
> to me.  The main difference between your patch here and what got merged
> yesterday is that your patch starts using state->visible rather than
> state->fb, which is the right move to make.
> 
> So assuming you rebase your changes onto the latest code,
> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

Yep, I was expecting a slight conflict here since you were working in the
same vicinity. So I'll respin this one on top of the latest stuff.

And I should change the vlv/chv code while I'm at it...

> 
> > ---
> >  drivers/gpu/drm/i915/intel_pm.c | 24 +++++++++++++++++-------
> >  1 file changed, 17 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> > index a06a2c7..499e054 100644
> > --- a/drivers/gpu/drm/i915/intel_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > @@ -1955,6 +1955,7 @@ static void ilk_compute_wm_parameters(struct drm_crtc *crtc,
> >  	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> >  	enum pipe pipe = intel_crtc->pipe;
> >  	struct drm_plane *plane;
> > +	const struct intel_plane_state *state;
> >  
> >  	if (!intel_crtc->active)
> >  		return;
> > @@ -1962,13 +1963,22 @@ static void ilk_compute_wm_parameters(struct drm_crtc *crtc,
> >  	p->active = true;
> >  	p->pipe_htotal = intel_crtc->config->base.adjusted_mode.crtc_htotal;
> >  	p->pixel_rate = ilk_pipe_pixel_rate(dev, crtc);
> > -	p->pri.bytes_per_pixel = crtc->primary->state->fb->bits_per_pixel / 8;
> > -	p->cur.bytes_per_pixel = 4;
> > -	p->pri.horiz_pixels = intel_crtc->config->pipe_src_w;
> > -	p->cur.horiz_pixels = intel_crtc->base.cursor->state->crtc_w;
> > -	/* TODO: for now, assume primary and cursor planes are always enabled. */
> > -	p->pri.enabled = true;
> > -	p->cur.enabled = true;
> > +
> > +	state = to_intel_plane_state(crtc->primary->state);
> > +	if (state->visible) {
> > +		p->pri.enabled = true;
> > +		p->pri.bytes_per_pixel =
> > +			drm_format_plane_cpp(state->base.fb->pixel_format, 0);
> > +		p->pri.horiz_pixels = drm_rect_width(&state->dst);
> > +	}
> > +
> > +	state = to_intel_plane_state(crtc->cursor->state);
> > +	if (state->visible) {
> > +		p->cur.enabled = true;
> > +		p->cur.bytes_per_pixel =
> > +			drm_format_plane_cpp(state->base.fb->pixel_format, 0);
> > +		p->cur.horiz_pixels = state->base.crtc_w;
> > +	}
> >  
> >  	drm_for_each_legacy_plane(plane, &dev->mode_config.plane_list) {
> >  		struct intel_plane *intel_plane = to_intel_plane(plane);
> > -- 
> > 2.0.5
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Matt Roper
> Graphics Software Engineer
> IoTG Platform Enabling & Development
> Intel Corporation
> (916) 356-2795

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

  reply	other threads:[~2015-03-10 18:01 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 11:15 [PATCH 0/9] drm/i915: Update derived plane state at crtc enable/disable ville.syrjala
2015-03-10 11:15 ` [PATCH 1/9] drm/i915: Remove debug prints from primary plane update funcs ville.syrjala
2015-03-10 15:55   ` Jesse Barnes
2015-03-10 11:15 ` [PATCH 2/9] drm/i915: Reduce clutter by using the local plane pointer ville.syrjala
2015-03-10 16:00   ` Jesse Barnes
2015-03-10 11:15 ` [PATCH 3/9] drm/i915: Use plane->state->fb instead of plane->fb in intel_plane_restore() ville.syrjala
2015-03-10 17:01   ` Matt Roper
2015-03-10 17:48     ` Ville Syrjälä
2015-03-11  9:41       ` Daniel Vetter
2015-03-11 10:04         ` Daniel Vetter
2015-03-10 11:15 ` [PATCH 4/9] drm/i915: Make derived plane state correct after crtc_enable ville.syrjala
2015-03-10 17:01   ` Matt Roper
2015-03-10 17:57     ` Ville Syrjälä
2015-03-11  9:52       ` Daniel Vetter
2015-03-11 10:03         ` Daniel Vetter
2015-03-11 10:05         ` Ville Syrjälä
2015-03-11 10:24           ` Daniel Vetter
2015-03-11 12:19             ` Ville Syrjälä
2015-03-11 16:23               ` Daniel Vetter
2015-03-11 16:40                 ` Ville Syrjälä
2015-03-10 11:15 ` [PATCH 5/9] drm/i915: Pass primary plane size to .update_primary_plane() ville.syrjala
2015-03-10 17:10   ` Matt Roper
2015-03-10 17:59     ` Ville Syrjälä
2015-03-10 20:57       ` Matt Roper
2015-03-11  9:42         ` Ville Syrjälä
2015-03-11  9:57       ` Daniel Vetter
2015-03-11  5:09   ` sonika
2015-03-11  9:27     ` Ville Syrjälä
2015-03-11  9:26       ` sonika
2015-03-19 14:28   ` [PATCH v2 " ville.syrjala
2015-03-20  9:49     ` Jindal, Sonika
2015-03-20 10:04       ` Ville Syrjälä
2015-03-20 10:53         ` Jindal, Sonika
2015-03-20 14:26           ` Ville Syrjälä
2015-03-23  4:11     ` sonika
2015-03-10 11:15 ` [PATCH 6/9] drm/i915: Pass the primary plane position " ville.syrjala
2015-03-19 14:29   ` [PATCH v2 " ville.syrjala
2015-03-20 11:22     ` Jindal, Sonika
2015-03-10 11:15 ` [PATCH 7/9] drm/i915: Update watermarks after the derived plane state is uptodate ville.syrjala
2015-03-10 17:13   ` Matt Roper
2015-03-11  9:59     ` Daniel Vetter
2015-03-10 11:15 ` [PATCH 8/9] drm/i915: Use state->visible in wm calculation ville.syrjala
2015-03-10 17:19   ` Matt Roper
2015-03-10 18:01     ` Ville Syrjälä [this message]
2015-03-19 14:31   ` [PATCH v2 " ville.syrjala
2015-03-10 11:15 ` [PATCH 9/9] drm/i915: Don't re-enable an explicitly disabled primary plane due to sprite coverage changes ville.syrjala
2015-03-10 17:58   ` shuang.he
2015-03-11 10:00   ` Daniel Vetter
2015-03-11 10:09     ` Ville Syrjälä
2015-03-11 10:28       ` Daniel Vetter

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=20150310180110.GL11371@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.d.roper@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox