From ab996a3ace390c47c85b393173f95707d3755099 Mon Sep 17 00:00:00 2001 From: Wyes Karny Date: Tue, 3 Nov 2020 15:34:57 +0530 Subject: [PATCH] msm: camera: isp: Handle QCFA bin eanbled case for MP limit fuse When QCFA binning is enabled adjust MP limit fuse checking to check actual proessing width for IFE. CRs-Fixed: 2808086 Change-Id: I22af38ba36ad84372699a177c203c1acbae76cb9 Signed-off-by: Wyes Karny --- .../isp_hw/ife_csid_hw/cam_ife_csid_core.c | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c index febc580540..6183e438ba 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c @@ -1143,6 +1143,7 @@ int cam_ife_csid_path_reserve(struct cam_ife_csid_hw *csid_hw, struct cam_ife_csid_path_cfg *path_data; struct cam_isp_resource_node *res; bool is_rdi = false; + uint32_t width = 0; /* CSID CSI2 v2.0 supports 31 vc */ if (reserve->sync_mode >= CAM_ISP_HW_SYNC_MAX) { @@ -1313,10 +1314,13 @@ int cam_ife_csid_path_reserve(struct cam_ife_csid_hw *csid_hw, } if (reserve->sync_mode == CAM_ISP_HW_SYNC_MASTER) { + width = reserve->in_port->left_stop - + reserve->in_port->left_start + 1; + if (path_data->horizontal_bin || path_data->qcfa_bin) + width /= 2; if ((reserve->res_id == CAM_IFE_PIX_PATH_RES_IPP) && !(cam_ife_csid_is_resolution_supported(csid_hw, - reserve->in_port->left_stop - - reserve->in_port->left_start + 1))) { + width))) { rc = -EINVAL; goto end; } @@ -1339,10 +1343,13 @@ int cam_ife_csid_path_reserve(struct cam_ife_csid_hw *csid_hw, csid_hw->hw_intf->hw_idx, reserve->res_id, path_data->start_line, path_data->end_line); } else if (reserve->sync_mode == CAM_ISP_HW_SYNC_SLAVE) { + width = reserve->in_port->right_stop - + reserve->in_port->right_start + 1; + if (path_data->horizontal_bin || path_data->qcfa_bin) + width /= 2; if ((reserve->res_id == CAM_IFE_PIX_PATH_RES_IPP) && !(cam_ife_csid_is_resolution_supported(csid_hw, - reserve->in_port->right_stop - - reserve->in_port->right_start + 1))) { + width))) { rc = -EINVAL; goto end; } @@ -1362,10 +1369,13 @@ int cam_ife_csid_path_reserve(struct cam_ife_csid_hw *csid_hw, csid_hw->hw_intf->hw_idx, reserve->res_id, path_data->start_line, path_data->end_line); } else { + width = reserve->in_port->left_stop - + reserve->in_port->left_start + 1; + if (path_data->horizontal_bin || path_data->qcfa_bin) + width /= 2; if ((reserve->res_id == CAM_IFE_PIX_PATH_RES_IPP) && !(cam_ife_csid_is_resolution_supported(csid_hw, - reserve->in_port->left_stop - - reserve->in_port->left_start + 1))) { + width))) { rc = -EINVAL; goto end; }