diff mbox series

[07/21] drm/msm/dpu: Support dynamic DSC number

Message ID 20240829-sm8650-v6-11-hmd-pocf-mdss-quad-upstream-8-v1-7-bdb05b4b5a2e@linaro.org
State New
Headers show
Series [01/21] drm/msm/dsi: add support to DSI CTRL v2.8.0 | expand

Commit Message

Jun Nie Aug. 29, 2024, 10:17 a.m. UTC
Do not assume DSC number as 2. Because there are 4 DSC in
quad pipe case.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index 6bdd9c21ff3ed..05b203be2a9bc 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -553,9 +553,9 @@  bool dpu_encoder_use_dsc_merge(struct drm_encoder *drm_enc)
 		if (dpu_enc->phys_encs[i])
 			intf_count++;
 
-	/* See dpu_encoder_get_topology, we only support 2:2:1 topology */
+	/* DSC and mixer are mapped 1:1, so reuse the mixer number */
 	if (dpu_enc->dsc)
-		num_dsc = 2;
+		num_dsc = dpu_crtc_get_lm_num(drm_enc->crtc->state);
 
 	return (num_dsc > 0) && (num_dsc > intf_count);
 }