Commit df99bdfc authored by Dmitry Baryshkov's avatar Dmitry Baryshkov Committed by Dmitry Baryshkov
Browse files

drm/msm/dpu: use single CTL if it is the only CTL returned by RM



On DPU >= 5.0 CTL blocks were reworked in order to support using a
single CTL for all outputs. In preparation of reworking the RM code to
return single CTL make sure that dpu_encoder can cope with that.

Reviewed-by: default avatarMarijn Suijten <marijn.suijten@somainline.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: default avatarJessica Zhang <quic_jesszhan@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/641582/
Link: https://lore.kernel.org/r/20250307-dpu-active-ctl-v3-4-5d20655f10ca@linaro.org


Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
parent 696707d3
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1246,6 +1246,10 @@ static void dpu_encoder_virt_atomic_mode_set(struct drm_encoder *drm_enc,
			return;
		}

		/* Use first (and only) CTL if active CTLs are supported */
		if (num_ctl == 1)
			phys->hw_ctl = to_dpu_hw_ctl(hw_ctl[0]);
		else
			phys->hw_ctl = i < num_ctl ? to_dpu_hw_ctl(hw_ctl[i]) : NULL;
		if (!phys->hw_ctl) {
			DPU_ERROR_ENC(dpu_enc,