[Intel-gfx] [PATCH 17/23] drm/i915: Get the uapi state from the correct plane when bigjoiner is used

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


On Mon, Nov 16, 2020 at 04:24:15PM -0800, Navare, Manasi wrote:
> On Sat, Nov 14, 2020 at 12:03:52AM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > 
> > When using bigjoiner userspace is only controlling the "master"
> > plane, so use its uapi state for the "slave" plane as well.
> > 
> > hw.crtc needs a bit of magic since we don't want to copy that from
> > the uapi state (as it points to the wrong pipe for the "slave
> > " plane). Instead we pass the right crtc in explicitly but only
> > assign it when the uapi state indicates the plane to be logically
> > enabled (ie. uapi.crtc != NULL).
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > ---
> >  .../gpu/drm/i915/display/intel_atomic_plane.c | 59 +++++++++++++------
> >  .../gpu/drm/i915/display/intel_atomic_plane.h |  3 +-
> >  drivers/gpu/drm/i915/display/intel_display.c  |  5 +-
> >  3 files changed, 46 insertions(+), 21 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > index f47558efb3c2..7abb0e3d6c0b 100644
> > --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > @@ -247,11 +247,19 @@ static void intel_plane_clear_hw_state(struct intel_plane_state *plane_state)
> >  }
> >  
> >  void intel_plane_copy_uapi_to_hw_state(struct intel_plane_state *plane_state,
> > -				       const struct intel_plane_state *from_plane_state)
> > +				       const struct intel_plane_state *from_plane_state,
> > +				       struct intel_crtc *crtc)
> >  {
> >  	intel_plane_clear_hw_state(plane_state);
> >  
> > -	plane_state->hw.crtc = from_plane_state->uapi.crtc;
> > +	/*
> > +	 * For the bigjoiner slave uapi.crtc will point at
> > +	 * the master crtc. So we explicitly assign the right
> > +	 * slave crtc to hw.crtc. uapi.crtc!=NULL simply indicates
> > +	 * the plane is logically enabled on the uapi level.
> > +	 */
> > +	plane_state->hw.crtc = from_plane_state->uapi.crtc ? &crtc->base : NULL;
> 
> But here in case of bigjoiner_slave we actualy compute new_master_plane_state from master_plane which is
> obtained from the slaves linked crtc.
> 
> So here, even for the slave plane's hw.crtc we are using master's uapi.crtc? Is that what is happening here?

Yes.

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list