From 78560ee888e7a611b105c5327fa222d43c818b76 Mon Sep 17 00:00:00 2001 From: Lakshmi Narayana Kalavala Date: Tue, 23 Apr 2019 14:54:09 -0700 Subject: [PATCH] disp: msm: sde: update ds atomic check for pu and cwb This change fixes the destination scaler atomic check to support PU with CWB disable without an additional frame in between. It also fixes the destination height calculation. Change-Id: I93ae8471d2db0b4e2574d18a873d4d4e180cbcbb Signed-off-by: Lakshmi Narayana Kalavala --- msm/sde/sde_encoder.c | 2 +- msm/sde/sde_encoder_phys_wb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/msm/sde/sde_encoder.c b/msm/sde/sde_encoder.c index 41557a5fe433..bcaa35edfddf 100644 --- a/msm/sde/sde_encoder.c +++ b/msm/sde/sde_encoder.c @@ -923,7 +923,7 @@ static int _sde_encoder_atomic_check_pu_roi(struct sde_encoder_virt *sde_enc, { int ret = 0; - if (drm_atomic_crtc_needs_modeset(crtc_state)) { + if (crtc_state->mode_changed || crtc_state->active_changed) { struct sde_rect mode_roi, roi; mode_roi.x = 0; diff --git a/msm/sde/sde_encoder_phys_wb.c b/msm/sde/sde_encoder_phys_wb.c index 675497760db7..7688879ac317 100644 --- a/msm/sde/sde_encoder_phys_wb.c +++ b/msm/sde/sde_encoder_phys_wb.c @@ -670,7 +670,7 @@ static int _sde_enc_phys_wb_validate_cwb(struct sde_encoder_phys *phys_enc, if (cstate->ds_cfg[i].scl3_cfg.enable) { ds_in_use = true; ds_outw += cstate->ds_cfg[i].scl3_cfg.dst_width; - ds_outh += cstate->ds_cfg[i].scl3_cfg.dst_height; + ds_outh = cstate->ds_cfg[i].scl3_cfg.dst_height; } /* if ds in use check wb roi against ds output dimensions */