On Thu, Jan 16, 2025 at 03:26:01PM +0800, Jun Nie wrote: > Currently, only 2 pipes are used at most for a plane. A stage structure > describes the configuration for a mixer pair. So only one stage is needed > for current usage cases. The quad-pipe case will be added in future and 2 > stages are used in the case. So extend the stage to an array with array size > STAGES_PER_PLANE and blend pipes per mixer pair with configuration in the > stage structure. > > Signed-off-by: Jun Nie <jun.nie@xxxxxxxxxx> > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 42 +++++++++++++++++------------ > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 1 + > 2 files changed, 26 insertions(+), 17 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c > index 81474823e6799..5ae640da53fbf 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c > @@ -401,7 +401,6 @@ static void _dpu_crtc_blend_setup_pipe(struct drm_crtc *crtc, > struct dpu_hw_stage_cfg *stage_cfg > ) > { > - uint32_t lm_idx; > enum dpu_sspp sspp_idx; > struct drm_plane_state *state; > > @@ -426,8 +425,7 @@ static void _dpu_crtc_blend_setup_pipe(struct drm_crtc *crtc, > stage_cfg->multirect_index[stage][stage_idx] = pipe->multirect_index; > > /* blend config update */ > - for (lm_idx = 0; lm_idx < num_mixers; lm_idx++) > - mixer[lm_idx].lm_ctl->ops.update_pending_flush_sspp(mixer[lm_idx].lm_ctl, sspp_idx); > + mixer->lm_ctl->ops.update_pending_flush_sspp(mixer->lm_ctl, sspp_idx); No. This is required if two LMs use different CTLs. > } > > static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc, > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h > index 5f010d36672cc..64e220987be56 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h > @@ -34,6 +34,7 @@ > #define DPU_MAX_PLANES 4 > #endif > > +#define STAGES_PER_PLANE 2 it's 1, not 2. > #define PIPES_PER_PLANE 2 #define PIPES_PER_PLANE (PIPES_PER_STAGE * STAGES_PER_PLANE) > #define PIPES_PER_STAGE 2 > #ifndef DPU_MAX_DE_CURVES > > -- > 2.34.1 > -- With best wishes Dmitry