Эх сурвалжийг харах

msm: sde: update dnsc mux programming for second dcwb

MDSS 10.0 supports additional dedicated cwb pingpong pair.
This change updates downscaler block mux programming to
support when second dcwb pinpong pair is in use.

Change-Id: I1d5bdb557132c56874b13d06b9fe1aafeaadb36a
Signed-off-by: Prabhanjan Kandula <[email protected]>
Prabhanjan Kandula 2 жил өмнө
parent
commit
f0b6f5d927

+ 10 - 2
msm/sde/sde_hw_dnsc_blur.c

@@ -213,13 +213,21 @@ static void _sde_hw_dnsc_blur_bind_pingpong_blk(struct sde_hw_dnsc_blur *hw_dnsc
 	struct sde_hw_blk_reg_map *hw = &hw_dnsc_blur->hw;
 	int mux_cfg;
 
-	if (enable && (pp < PINGPONG_0 || pp >= PINGPONG_MAX))
+	if (enable && (pp < PINGPONG_0 || pp >= PINGPONG_MAX)) {
+		SDE_ERROR("invalid args enable:%d pp:%d\n", enable, pp - PINGPONG_0);
 		return;
+	}
+
+	if (cwb && pp < PINGPONG_CWB_0) {
+		SDE_ERROR("invalid pp:%d for cwb\n", pp - PINGPONG_0);
+		return;
+	}
 
 	if (enable)
-		mux_cfg = cwb ? 0xD : (pp - PINGPONG_0) & 0x7;
+		mux_cfg = cwb ? (pp < PINGPONG_CWB_2 ? 0xd : 0xb) : (pp - PINGPONG_0) & 0x7;
 	else
 		mux_cfg = 0xF;
+
 	SDE_REG_WRITE(hw, DNSC_BLUR_MUX, mux_cfg);
 }