浏览代码

msm: camera: isp: Enable crop and drop on PPP path

LCR PD Violation is due to different clock domain crossing
architecture for PPP & RDI Paths. This issue observes when the
crop/drop Settings don't match for PPP & RDI paths.

The recommendation from Hw Team is to enable crop/drop on
both RDI & PPP paths to keep the delay same.

Enable crop and drop on RDI & PPP paths for v880.

CRs-Fixed: 3387109
Change-Id: I32bc5e6f4665f56d2b8c7ca8bf77cee5d7c24238
Signed-off-by: Chandan Kumar Jha <[email protected]>
Chandan Kumar Jha 2 年之前
父节点
当前提交
99f13e5156

+ 1 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid680.h

@@ -590,6 +590,7 @@ static struct cam_ife_csid_ver2_path_reg_info
 		.top_irq_mask                     = 0x40,
 		.epoch0_shift_val                 = 16,
 		.epoch1_shift_val                 = 0,
+		.crop_drop_enable                 = false,
 };
 
 static struct cam_ife_csid_ver2_path_reg_info

+ 1 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid780.h

@@ -625,6 +625,7 @@ static struct cam_ife_csid_ver2_path_reg_info
 		.epoch0_shift_val                 = 16,
 		.epoch1_shift_val                 = 0,
 		.sof_retiming_dis_shift           = 5,
+		.crop_drop_enable                 = false,
 };
 
 static struct cam_ife_csid_ver2_path_reg_info

+ 1 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid880.h

@@ -641,6 +641,7 @@ static struct cam_ife_csid_ver2_path_reg_info
 		.epoch0_shift_val                 = 16,
 		.epoch1_shift_val                 = 0,
 		.sof_retiming_dis_shift           = 5,
+		.crop_drop_enable                 = true,
 };
 
 static struct cam_ife_csid_ver2_path_reg_info

+ 18 - 13
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.c

@@ -3639,8 +3639,8 @@ static int cam_ife_csid_ver2_init_config_pxl_path(
 	/*enable early eof based on crop enable */
 	if (!(csid_hw->debug_info.debug_val &
 		    CAM_IFE_CSID_DEBUG_DISABLE_EARLY_EOF) &&
-		cmn_reg->early_eof_supported &&
-		path_cfg->crop_enable)
+		cmn_reg->early_eof_supported && path_cfg->crop_enable &&
+		!(csid_hw->flags.rdi_lcr_en && res->res_id == CAM_IFE_PIX_PATH_RES_PPP))
 		cfg1 |= (1 << path_reg->early_eof_en_shift_val);
 
 	if (csid_hw->debug_info.debug_val &
@@ -4118,17 +4118,6 @@ static int cam_ife_csid_ver2_program_ppp_path(
 	uint32_t irq_mask = 0;
 	void __iomem *mem_base;
 
-	rc = cam_ife_csid_ver2_init_config_pxl_path(
-		csid_hw, res);
-
-	if (rc) {
-		CAM_ERR(CAM_ISP,
-			"CSID:%u %s path res type:%d res_id:%d %d",
-			csid_hw->hw_intf->hw_idx,
-			res->res_type, res->res_id, res->res_state);
-		return rc;
-	}
-
 	soc_info = &csid_hw->hw_info->soc_info;
 	csid_reg = (struct cam_ife_csid_ver2_reg_info *)
 			csid_hw->core_info->csid_reg;
@@ -4144,6 +4133,22 @@ static int cam_ife_csid_ver2_program_ppp_path(
 
 	path_cfg = (struct cam_ife_csid_ver2_path_cfg *)res->res_priv;
 
+	if (csid_hw->flags.rdi_lcr_en && path_reg->crop_drop_enable) {
+		path_cfg->drop_enable = true;
+		path_cfg->crop_enable = true;
+	}
+
+	rc = cam_ife_csid_ver2_init_config_pxl_path(
+		csid_hw, res);
+
+	if (rc) {
+		CAM_ERR(CAM_ISP,
+			"CSID:%u %s path res type:%d res_id:%d %d",
+			csid_hw->hw_intf->hw_idx,
+			res->res_type, res->res_id, res->res_state);
+		return rc;
+	}
+
 	path_cfg->irq_reg_idx = cam_ife_csid_get_rt_irq_idx(
 				CAM_IFE_CSID_IRQ_REG_PPP,
 				csid_reg->cmn_reg->num_pix,

+ 1 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.h

@@ -401,6 +401,7 @@ struct cam_ife_csid_ver2_path_reg_info {
 	uint32_t sof_retiming_dis_shift;
 	uint32_t capabilities;
 	uint32_t default_out_format;
+	bool     crop_drop_enable;
 };
 
 struct cam_ife_csid_ver2_common_reg_info {