[Intel-gfx] [PATCH 16/23] drm/i915: Add planes affected by bigjoiner to the state

Ville Syrjälä ville.syrjala at linux.intel.com
Tue Nov 17 15:14:56 UTC 2020


On Mon, Nov 16, 2020 at 04:09:01PM -0800, Navare, Manasi wrote:
> On Sat, Nov 14, 2020 at 12:03:51AM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > 
> > Make sure both the bigjoiner "master" and "slave" plane are
> > in the state whenever either of them is in the state.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c | 42 ++++++++++++++++++++
> >  1 file changed, 42 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > index 465877097582..1118ff73c0d4 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -15069,6 +15069,44 @@ static bool active_planes_affects_min_cdclk(struct drm_i915_private *dev_priv)
> >  		IS_IVYBRIDGE(dev_priv) || (INTEL_GEN(dev_priv) >= 11);
> >  }
> >  
> > +static int intel_crtc_add_bigjoiner_planes(struct intel_atomic_state *state,
> > +					   struct intel_crtc *crtc,
> > +					   struct intel_crtc *other)
> > +{
> > +	const struct intel_plane_state *plane_state;
> > +	struct intel_plane *plane;
> > +	u8 plane_ids = 0;
> > +	int i;
> > +
> > +	for_each_new_intel_plane_in_state(state, plane, plane_state, i) {
> > +		if (plane->pipe == crtc->pipe)
> > +			plane_ids |= BIT(plane->id);
> > +	}
> > +
> > +	return intel_crtc_add_planes_to_state(state, other, plane_ids);
> 
> We call this function intel_crtc_add_planes_to_state again in intel_atomic_check_planes again at
> the end, so arent we adding the planes to state twice for both master and slave?
> 
> Do we need some condition to avoid adding it again at the end of intel_atomic_check_planes ?

No. That other stuff is there for the min_cdclk calculation.

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list