Browse Source

disp: msm: sde: use panel width for rounded corner region size checks

Use panel width variable to compare against RC region size instead
of the ROI size which can change based on the LM configuration.

Change-Id: Ia1d5f88893a55778172e6da10bb235e9c483cd38
Signed-off-by: Amine Najahi <[email protected]>
Amine Najahi 4 years ago
parent
commit
31086e9dab
2 changed files with 5 additions and 3 deletions
  1. 4 2
      msm/sde/sde_color_processing.c
  2. 1 1
      msm/sde/sde_hw_rc.c

+ 4 - 2
msm/sde/sde_color_processing.c

@@ -1603,7 +1603,8 @@ static int _sde_cp_crtc_checkfeature(u32 feature,
 		hw_cfg.displayh = num_mixers *
 				sde_crtc_state->lm_roi[i].w;
 		hw_cfg.displayv = sde_crtc_state->lm_roi[i].h;
-
+		hw_cfg.panel_width = sde_crtc->base.state->adjusted_mode.hdisplay;
+		hw_cfg.panel_height = sde_crtc->base.state->adjusted_mode.vdisplay;
 		DRM_DEBUG_DRIVER("check cp feature %d on mixer %d\n",
 				feature, hw_lm->idx - LM_0);
 		ret = check_feature(hw_dspp, &hw_cfg, sde_crtc);
@@ -1862,7 +1863,8 @@ static int _sde_cp_crtc_check_pu_features(struct drm_crtc *crtc)
 			hw_cfg.displayh = hw_cfg.num_of_mixers *
 					sde_crtc_state->lm_roi[j].w;
 			hw_cfg.displayv = sde_crtc_state->lm_roi[j].h;
-
+			hw_cfg.panel_height = sde_crtc->base.state->adjusted_mode.vdisplay;
+			hw_cfg.panel_width = sde_crtc->base.state->adjusted_mode.hdisplay;
 			ret = check_pu_feature(hw_dspp, &hw_cfg, sde_crtc);
 			if (ret) {
 				DRM_ERROR("failed pu feature %d in mixer %d\n",

+ 1 - 1
msm/sde/sde_hw_rc.c

@@ -631,7 +631,7 @@ static int sde_hw_rc_check_mask_cfg(
 		}
 	}
 
-	half_panel_width = hw_cfg->displayh / cfg_param_03 * 2;
+	half_panel_width = hw_cfg->panel_width / cfg_param_03 * 2;
 	for (i = 0; i < cfg_param_03; i += 2) {
 		if (cfg_param_04[i] + cfg_param_04[i+1] != half_panel_width) {
 			SDE_ERROR("invalid ratio [%d]:%d, [%d]:%d, %d\n",