On Wed, Feb 23, 2022 at 12:00:28PM -0800, Navare, Manasi wrote:
> On Wed, Feb 23, 2022 at 03:13:14PM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <[email protected]>
> > 
> > Replace the hardcoded 2 pipe assumptions when we're massaging
> > pipe_mode and the pipe_src rect to be suitable for bigjoiner.
> > Instead we can just count the number of pipes in the bitmask.
> > 
> > v2: Introduce intel_bigjoiner_num_pipes()
> > 
> > Signed-off-by: Ville Syrjälä <[email protected]>
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c | 31 +++++++++++++-------
> >  1 file changed, 20 insertions(+), 11 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
> > b/drivers/gpu/drm/i915/display/intel_display.c
> > index 9b4013ed3d98..7a09bb33c1eb 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -368,6 +368,11 @@ bool intel_crtc_is_bigjoiner_master(const struct 
> > intel_crtc_state *crtc_state)
> >             crtc->pipe == bigjoiner_master_pipe(crtc_state);
> >  }
> >  
> > +static int intel_bigjoiner_num_pipes(const struct intel_crtc_state 
> > *crtc_state)
> > +{
> > +   return hweight8(crtc_state->bigjoiner_pipes);
> > +}
> 
> Okay yes makes sense. Although bigjoiner will always be between just 2 pipes 
> so why not hardcode to 2 and
> use the  if (!crtc_state->bigjoiner_pipes) as the check instead of num_pipes 
> < 2.
> When we have a joiner for 4 pipes, in that case also bigjoiner will still be 
> only between 2 pipes.
> So in bigjoiner_pipe mask, it will always only have 2 pipes.

It'll be whatever pipes we have when we have more pipes.

-- 
Ville Syrjälä
Intel

Reply via email to