Преглед изворни кода

disp: msm: sde: avoid incorrect register writes in blend stage clear

While clearing all blend stages, avoid writing blend config
registers for invalid dummy layer mixers introduced for dcwb.
These dummy mixers are SW only representation, these mixers
do not have respective blend config register space defined in HW.
Currently blend stage clear logic clears other undefined and
some valid registers like CTL_x_SW_RESET_OVERRIDE which is not
intended. This change limits accessing blend config registers
based on actual HW layer mixer count by ignoring dummy mixers.

Change-Id: I3a61fb6d5522b041fd6f10305b84dae449b4f2c7
Signed-off-by: Prabhanjan Kandula <[email protected]>
Prabhanjan Kandula пре 2 година
родитељ
комит
200f6c09dd
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      msm/sde/sde_hw_ctl.c

+ 3 - 0
msm/sde/sde_hw_ctl.c

@@ -987,6 +987,9 @@ static void sde_hw_ctl_clear_all_blendstages(struct sde_hw_ctl *ctx)
 	for (i = 0; i < ctx->mixer_count; i++) {
 		int mixer_id = ctx->mixer_hw_caps[i].id;
 
+		if (mixer_id >= LM_DCWB_DUMMY_0)
+			return;
+
 		SDE_REG_WRITE(c, CTL_LAYER(mixer_id), 0);
 		SDE_REG_WRITE(c, CTL_LAYER_EXT(mixer_id), 0);
 		SDE_REG_WRITE(c, CTL_LAYER_EXT2(mixer_id), 0);