From a3f8e9ab8f4822af6ad2dd09e91eb57fe15a80fc Mon Sep 17 00:00:00 2001 From: Anjaneya Prasad Musunuri Date: Wed, 4 Aug 2021 20:13:32 +0530 Subject: [PATCH] disp: msm: sde: correct rounded corner bottom start check Bottom start must be lesser than display height by at least one line. Change-Id: I36fbf68ee6733c020f235dca04c4b00c1e5a2312 Signed-off-by: Anjaneya Prasad Musunuri --- msm/sde/sde_color_processing.c | 2 ++ msm/sde/sde_hw_rc.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/msm/sde/sde_color_processing.c b/msm/sde/sde_color_processing.c index 2338557785..9c282acfdd 100644 --- a/msm/sde/sde_color_processing.c +++ b/msm/sde/sde_color_processing.c @@ -2028,6 +2028,8 @@ static int _sde_cp_crtc_update_pu_features(struct drm_crtc *crtc, bool *need_flu hw_cfg.displayh = hw_cfg.num_of_mixers * hw_lm->cfg.out_width; hw_cfg.displayv = hw_lm->cfg.out_height; + hw_cfg.panel_width = sde_crtc->base.state->adjusted_mode.hdisplay; + hw_cfg.panel_height = sde_crtc->base.state->adjusted_mode.vdisplay; ret = set_pu_feature(hw_dspp, &hw_cfg, sde_crtc); /* feature does not need flush when ret > 0 */ diff --git a/msm/sde/sde_hw_rc.c b/msm/sde/sde_hw_rc.c index 386f5d14dd..4fa75372ce 100644 --- a/msm/sde/sde_hw_rc.c +++ b/msm/sde/sde_hw_rc.c @@ -680,9 +680,9 @@ static int sde_hw_rc_check_mask_cfg( } if (r2_enable) { - if ((hw_cfg->displayv - cfg_param_02) < 1) { - SDE_ERROR("invalid max cfg_param_02:%d\n", - cfg_param_02); + if ((hw_cfg->panel_height - cfg_param_02) < 1) { + SDE_ERROR("invalid max cfg_param_02:%d, panel_height:%d\n", + cfg_param_02, hw_cfg->panel_height); return -EINVAL; }