Skip to content

Commit a41cdb6

Browse files
lumagrobclark
authored andcommitted
drm/msm/dpu: make dpu_hw_ctl_clear_all_blendstages clear necessary LMs
dpu_hw_ctl_clear_all_blendstages() clears settings for the few first LMs instead of mixers actually used for the CTL. Change it to clear necessary data, using provided mixer ids. Fixes: 25fdd59 ("drm/msm: Add SDM845 DPU support") Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Rob Clark <[email protected]>
1 parent f964cfb commit a41cdb6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,12 @@ static void dpu_hw_ctl_clear_all_blendstages(struct dpu_hw_ctl *ctx)
345345
int i;
346346

347347
for (i = 0; i < ctx->mixer_count; i++) {
348-
DPU_REG_WRITE(c, CTL_LAYER(LM_0 + i), 0);
349-
DPU_REG_WRITE(c, CTL_LAYER_EXT(LM_0 + i), 0);
350-
DPU_REG_WRITE(c, CTL_LAYER_EXT2(LM_0 + i), 0);
351-
DPU_REG_WRITE(c, CTL_LAYER_EXT3(LM_0 + i), 0);
348+
enum dpu_lm mixer_id = ctx->mixer_hw_caps[i].id;
349+
350+
DPU_REG_WRITE(c, CTL_LAYER(mixer_id), 0);
351+
DPU_REG_WRITE(c, CTL_LAYER_EXT(mixer_id), 0);
352+
DPU_REG_WRITE(c, CTL_LAYER_EXT2(mixer_id), 0);
353+
DPU_REG_WRITE(c, CTL_LAYER_EXT3(mixer_id), 0);
352354
}
353355

354356
DPU_REG_WRITE(c, CTL_FETCH_PIPE_ACTIVE, 0);

0 commit comments

Comments
 (0)