All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 09/14] drm/i915: Introduce crtc_state->update_planes bitmask
Date: Thu, 8 Nov 2018 13:32:02 +0200	[thread overview]
Message-ID: <20181108113202.GR9144@intel.com> (raw)
In-Reply-To: <20181107214939.GL2237@intel.com>

On Wed, Nov 07, 2018 at 01:49:39PM -0800, Rodrigo Vivi wrote:
> On Thu, Nov 01, 2018 at 05:06:00PM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Keep track which planes need updating during the commit. For now this
> > is just (was_visible || is_visible) but I'll have need to update
> > invisible planes later on for skl plane ddbs and for pre-skl pipe
> > gamma/csc control (which lives in the primary plane control register).
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_atomic.c       | 1 +
> >  drivers/gpu/drm/i915/intel_atomic_plane.c | 8 ++++----
> >  drivers/gpu/drm/i915/intel_display.c      | 5 ++++-
> >  drivers/gpu/drm/i915/intel_drv.h          | 3 +++
> >  4 files changed, 12 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
> > index a5a2c8fe58a7..8cb02f28d30c 100644
> > --- a/drivers/gpu/drm/i915/intel_atomic.c
> > +++ b/drivers/gpu/drm/i915/intel_atomic.c
> > @@ -184,6 +184,7 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc)
> >  	crtc_state->fifo_changed = false;
> >  	crtc_state->wm.need_postvbl_update = false;
> >  	crtc_state->fb_bits = 0;
> > +	crtc_state->update_planes = 0;
> >  
> >  	return &crtc_state->base;
> >  }
> > diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
> > index 7d3685075201..010269a12390 100644
> > --- a/drivers/gpu/drm/i915/intel_atomic_plane.c
> > +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
> > @@ -137,6 +137,9 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
> >  	if (state->visible && state->fb->format->format == DRM_FORMAT_NV12)
> >  		crtc_state->nv12_planes |= BIT(intel_plane->id);
> >  
> > +	if (state->visible || old_plane_state->base.visible)
> > +		crtc_state->update_planes |= BIT(intel_plane->id);
> > +
> >  	return intel_plane_atomic_calc_changes(old_crtc_state,
> >  					       &crtc_state->base,
> >  					       old_plane_state,
> > @@ -171,14 +174,11 @@ void intel_update_planes_on_crtc(struct intel_atomic_state *old_state,
> >  				 struct intel_crtc_state *old_crtc_state,
> >  				 struct intel_crtc_state *new_crtc_state)
> >  {
> > +	u32 update_mask = new_crtc_state->update_planes;
> >  	struct intel_plane_state *new_plane_state;
> >  	struct intel_plane *plane;
> > -	u32 update_mask;
> >  	int i;
> >  
> > -	update_mask = old_crtc_state->active_planes;
> > -	update_mask |= new_crtc_state->active_planes;
> > -
> 
> maybe this useless update_mask removal deserved a separated patch,
> but not a big deal...

It's still there, just populated differently.

> 
> >  	for_each_new_intel_plane_in_state(old_state, plane, new_plane_state, i) {
> >  		if (crtc->pipe != plane->pipe ||
> >  		    !(update_mask & BIT(plane->id)))
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 852b5897e80b..33d73915b73e 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -10797,8 +10797,10 @@ static int icl_check_nv12_planes(struct intel_crtc_state *crtc_state)
> >  			continue;
> >  
> >  		plane_state->linked_plane = NULL;
> > -		if (plane_state->slave && !plane_state->base.visible)
> > +		if (plane_state->slave && !plane_state->base.visible) {
> >  			crtc_state->active_planes &= ~BIT(plane->id);
> > +			crtc_state->update_planes |= BIT(plane->id);
> > +		}
> >  
> >  		plane_state->slave = false;
> >  	}
> > @@ -10839,6 +10841,7 @@ static int icl_check_nv12_planes(struct intel_crtc_state *crtc_state)
> >  		linked_state->slave = true;
> >  		linked_state->linked_plane = plane;
> >  		crtc_state->active_planes |= BIT(linked->id);
> > +		crtc_state->update_planes |= BIT(linked->id);
> >  		DRM_DEBUG_KMS("Using %s as Y plane for %s\n", linked->base.name, plane->base.name);
> >  	}
> >  
> > diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> > index 5331bbed5e8c..7a55f5921d34 100644
> > --- a/drivers/gpu/drm/i915/intel_drv.h
> > +++ b/drivers/gpu/drm/i915/intel_drv.h
> > @@ -925,6 +925,9 @@ struct intel_crtc_state {
> >  	u8 active_planes;
> >  	u8 nv12_planes;
> >  
> > +	/* bitmask of planes that will be updated during the commit */
> 
> I noticed how bad we are with documentation compared to the rest of drm
> structs :/
> 
> but I'm glad you added the explanation in the comment here.
> 
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> 
> > +	u8 update_planes;
> > +
> >  	/* HDMI scrambling status */
> >  	bool hdmi_scrambling;
> >  
> > -- 
> > 2.18.1
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

  reply	other threads:[~2018-11-08 11:32 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-01 15:05 [PATCH 00/14] drm/i915: Program SKL+ watermarks/ddb more carefully Ville Syrjala
2018-11-01 15:05 ` [PATCH 01/14] drm/i915: Nuke posting reads from plane update/disable funcs Ville Syrjala
2018-11-01 18:08   ` Rodrigo Vivi
2018-11-01 15:05 ` [PATCH 02/14] drm/i915: Clean up skl_program_scaler() Ville Syrjala
2018-11-01 15:17   ` [PATCH v2 " Ville Syrjala
2018-11-01 18:13     ` Rodrigo Vivi
2018-11-07 18:29       ` Ville Syrjälä
2018-11-09 17:24         ` Ville Syrjälä
2018-11-01 15:05 ` [PATCH 03/14] drm/i915: Remove the PS_PWR_GATE write from skl_program_scaler() Ville Syrjala
2018-11-07 18:53   ` Rodrigo Vivi
2018-11-01 15:05 ` [PATCH 04/14] drm/i915: Polish the skl+ plane keyval/msk/max register setup Ville Syrjala
2018-11-07 18:41   ` [PATCH v2 " Ville Syrjala
2018-11-07 19:55   ` [PATCH " Rodrigo Vivi
2018-11-07 20:56     ` Ville Syrjälä
2018-11-01 15:05 ` [PATCH 05/14] drm/i915: Clean up skl+ PLANE_POS vs. scaler handling Ville Syrjala
2018-11-07 19:56   ` Rodrigo Vivi
2018-11-01 15:05 ` [PATCH 06/14] drm/i915: Reorganize plane register writes to make them more atomic Ville Syrjala
2018-11-07 18:42   ` [PATCH v2 " Ville Syrjala
2018-11-08 19:30     ` Matt Roper
2018-11-08 19:48       ` Ville Syrjälä
2018-11-07 21:26   ` [PATCH " Rodrigo Vivi
2018-11-07 21:38     ` Ville Syrjälä
2018-11-01 15:05 ` [PATCH 07/14] drm/i915: Move single buffered plane register writes to the end Ville Syrjala
2018-11-07 21:26   ` Rodrigo Vivi
2018-11-08 22:06   ` Matt Roper
2018-11-09 13:55     ` Ville Syrjälä
2018-11-01 15:05 ` [PATCH 08/14] drm/i915: Generalize skl_ddb_allocation_overlaps() Ville Syrjala
2018-11-07 21:28   ` Rodrigo Vivi
2018-11-01 15:06 ` [PATCH 09/14] drm/i915: Introduce crtc_state->update_planes bitmask Ville Syrjala
2018-11-07 21:49   ` Rodrigo Vivi
2018-11-08 11:32     ` Ville Syrjälä [this message]
2018-11-08 23:22   ` Matt Roper
2018-11-09 13:57     ` Ville Syrjälä
2018-11-01 15:06 ` [PATCH 10/14] drm/i915: Pass the new crtc_state to ->disable_plane() Ville Syrjala
2018-11-07 22:08   ` Rodrigo Vivi
2018-11-08 11:43     ` Ville Syrjälä
2018-11-08 23:52   ` Matt Roper
2018-11-09 14:32     ` Ville Syrjälä
2018-11-01 15:06 ` [PATCH 11/14] drm/i915: Fix latency==0 handling for level 0 watermark on skl+ Ville Syrjala
2018-11-07 22:09   ` Rodrigo Vivi
2018-11-09  0:01   ` Matt Roper
2018-11-09 14:34     ` Ville Syrjälä
2018-11-01 15:06 ` [PATCH 12/14] drm/i915: Remove some useless zeroing on skl+ wm calculations Ville Syrjala
2018-11-07 18:43   ` [PATCH v2 " Ville Syrjala
2018-11-07 22:11   ` [PATCH " Rodrigo Vivi
2018-11-08 11:46     ` Ville Syrjälä
2018-11-01 15:06 ` [PATCH 13/14] drm/i915: Move ddb/wm programming into plane update/disable hooks on skl+ Ville Syrjala
2018-11-07 18:44   ` [PATCH v2 " Ville Syrjala
2018-11-09  1:38     ` Matt Roper
2018-11-09 14:53       ` Ville Syrjälä
2018-11-01 15:06 ` [PATCH 14/14] drm/i915: Commit skl+ planes in an order that avoids ddb overlaps Ville Syrjala
2018-11-01 15:08 ` ✗ Fi.CI.BAT: failure for drm/i915: Program SKL+ watermarks/ddb more carefully Patchwork
2018-11-01 16:04 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Program SKL+ watermarks/ddb more carefully (rev2) Patchwork
2018-11-01 16:09 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-11-01 16:26 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-01 18:13 ` ✓ Fi.CI.IGT: " Patchwork
2018-11-07 19:01 ` ✗ Fi.CI.BAT: failure for drm/i915: Program SKL+ watermarks/ddb more carefully (rev6) 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=20181108113202.GR9144@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@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.