From c667c77f1f80b9a401174011459a255a7a3dfb52 Mon Sep 17 00:00:00 2001 From: Krishna Manikandan Date: Mon, 18 Oct 2021 16:40:40 +0530 Subject: [PATCH] disp: msm: sde: disable CWB crop after cwb session is ended Add changes to disable CWB crop params as part of writeback disable. Change-Id: I18582ceb502e759ec4b67568562ac95ff3f0d359 Signed-off-by: Krishna Manikandan --- msm/sde/sde_encoder_phys_wb.c | 3 +++ msm/sde/sde_hw_wb.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/msm/sde/sde_encoder_phys_wb.c b/msm/sde/sde_encoder_phys_wb.c index 58ba064f73ec..43c03e87fb0e 100644 --- a/msm/sde/sde_encoder_phys_wb.c +++ b/msm/sde/sde_encoder_phys_wb.c @@ -1727,6 +1727,9 @@ static void sde_encoder_phys_wb_disable(struct sde_encoder_phys *phys_enc) } if (phys_enc->in_clone_mode) { + if (hw_wb->ops.setup_crop) + hw_wb->ops.setup_crop(hw_wb, NULL, false); + _sde_encoder_phys_wb_setup_cwb(phys_enc, false); _sde_encoder_phys_wb_update_cwb_flush(phys_enc, false); phys_enc->enable_state = SDE_ENC_DISABLING; diff --git a/msm/sde/sde_hw_wb.c b/msm/sde/sde_hw_wb.c index e6c61e68dd27..608d0ea492d7 100644 --- a/msm/sde/sde_hw_wb.c +++ b/msm/sde/sde_hw_wb.c @@ -215,9 +215,8 @@ static void sde_hw_wb_crop(struct sde_hw_wb *ctx, struct sde_hw_wb_cfg *wb, bool struct sde_hw_blk_reg_map *c = &ctx->hw; u32 crop_xy; - crop_xy = (wb->crop.y << 16) | wb->crop.x; - if (crop) { + crop_xy = (wb->crop.y << 16) | wb->crop.x; SDE_REG_WRITE(c, WB_CROP_CTRL, 0x1); SDE_REG_WRITE(c, WB_CROP_OFFSET, crop_xy); } else {