dpu_encoder_helper_get_3d_blend_mode() enables the 3D merge only for a solo physical encoder driven by two mixers. This covers all the current topologies, but not four mixers driving two interfaces without DSC: each interface is then fed by a pair of mixers, which has to be merged too, while the physical encoders have the master and slave roles. The 3D mux would stay disabled and each interface would output the data of a single mixer.
Enable the 3D merge whenever there are more mixers than interfaces, unless the DSC merge is used. Nothing changes for the existing topologies. Assisted-by: LLM Signed-off-by: Dmitry Baryshkov <[email protected]> --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h index 61b22d949454..d24e39597f2f 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h @@ -294,15 +294,16 @@ static inline enum dpu_3d_blend_mode dpu_encoder_helper_get_3d_blend_mode( struct dpu_encoder_phys *phys_enc) { struct dpu_crtc_state *dpu_cstate; + unsigned int num_intf; if (!phys_enc || phys_enc->enable_state == DPU_ENC_DISABLING) return BLEND_3D_NONE; dpu_cstate = to_dpu_crtc_state(phys_enc->parent->crtc->state); + num_intf = phys_enc->split_role == ENC_ROLE_SOLO ? 1 : 2; /* Use merge_3d unless DSC MERGE topology is used */ - if (phys_enc->split_role == ENC_ROLE_SOLO && - dpu_cstate->num_mixers == CRTC_DUAL_MIXERS && + if (dpu_cstate->num_mixers > num_intf && !dpu_encoder_use_dsc_merge(phys_enc->parent)) return BLEND_3D_H_ROW_INT; -- 2.47.3
