Răsfoiți Sursa

msm: camera: isp: Enable PIX & LINE count irqs by default

Enable these format measure error IRQs by default in CSID.

CRs-Fixed: 2830502
Change-Id: Ic9703be3fb2672487ee6f135a41ee6454a393203
Signed-off-by: Chandan Kumar Jha <[email protected]>
Chandan Kumar Jha 4 ani în urmă
părinte
comite
1576679508

+ 2 - 2
drivers/cam_cust/cam_custom_hw_mgr/cam_custom_csid/cam_custom_csid480.h

@@ -119,8 +119,8 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.ccif_violation_en               = 1,
 	.format_measure_en_shift_val     = 1,
 	.overflow_ctrl_en                = 0,
-	.non_fatal_err_mask              = 0x28000,
-	.non_fatal_err_mask              = 0x4,
+	.non_fatal_err_mask              = 0x2e000,
+	.fatal_err_mask                  = 0x4,
 	.overflow_ctrl_mode_val          = 0x8,
 };
 

+ 0 - 84
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

@@ -7326,69 +7326,6 @@ end:
 	return rc;
 }
 
-static int cam_isp_blob_sensor_config(
-	uint32_t                               blob_type,
-	struct cam_isp_generic_blob_info      *blob_info,
-	struct cam_isp_sensor_config          *dim_config,
-	struct cam_hw_prepare_update_args     *prepare)
-{
-	struct cam_ife_hw_mgr_ctx                   *ctx = NULL;
-	struct cam_isp_hw_mgr_res                   *hw_mgr_res;
-	struct cam_hw_intf                          *hw_intf;
-	struct cam_ife_sensor_dimension_update_args  update_args;
-	int                                          rc = -EINVAL;
-	uint32_t                                     i;
-	uint32_t                                     res_id;
-	struct cam_isp_sensor_dimension             *path_config;
-
-	ctx = prepare->ctxt_to_hw_map;
-
-	list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_csid, list) {
-		for (i = 0; i < CAM_ISP_HW_SPLIT_MAX; i++) {
-			if (!hw_mgr_res->hw_res[i])
-				continue;
-
-			res_id = hw_mgr_res->hw_res[i]->res_id;
-
-			if (res_id == CAM_IFE_PIX_PATH_RES_IPP) {
-				path_config = &dim_config->ipp_path;
-			} else if (res_id == CAM_IFE_PIX_PATH_RES_PPP) {
-				path_config = &dim_config->ppp_path;
-			} else if (res_id <= CAM_IFE_PIX_PATH_RES_RDI_4) {
-				path_config = &dim_config->rdi_path[res_id];
-			} else {
-				CAM_DBG(CAM_ISP, "Invalid res id %u", res_id);
-				continue;
-			}
-
-			if (!path_config->measure_enabled)
-				continue;
-
-			hw_intf = hw_mgr_res->hw_res[i]->hw_intf;
-
-			update_args.sensor_data.width = path_config->width;
-			update_args.sensor_data.height = path_config->width;
-			update_args.sensor_data.measure_enabled =
-			    path_config->measure_enabled;
-			update_args.res = hw_mgr_res->hw_res[i];
-
-			rc = hw_intf->hw_ops.process_cmd(
-				hw_intf->hw_priv,
-				CAM_IFE_CSID_SET_SENSOR_DIMENSION_CFG,
-				&update_args,
-				sizeof(update_args));
-
-			if (rc) {
-				CAM_ERR(CAM_ISP, "Dimension Update failed %u",
-					res_id);
-				break;
-			}
-		}
-	}
-
-	return rc;
-}
-
 static int cam_isp_blob_vfe_out_update(
 	uint32_t                               blob_type,
 	struct cam_isp_generic_blob_info      *blob_info,
@@ -8023,26 +7960,6 @@ static int cam_isp_packet_generic_blob_handler(void *user_data,
 				"Epoch Configuration Update Failed rc:%d", rc);
 	}
 		break;
-	case CAM_ISP_GENERIC_BLOB_TYPE_SENSOR_DIMENSION_CONFIG: {
-		struct cam_isp_sensor_config *csid_dim_config;
-
-		if (blob_size < sizeof(struct cam_isp_sensor_config)) {
-			CAM_ERR(CAM_ISP, "Invalid blob size %zu expected %zu",
-				blob_size,
-				sizeof(struct cam_isp_sensor_config));
-			return -EINVAL;
-		}
-
-		csid_dim_config =
-			(struct cam_isp_sensor_config *)blob_data;
-
-		rc = cam_isp_blob_sensor_config(blob_type, blob_info,
-			csid_dim_config, prepare);
-		if (rc)
-			CAM_ERR(CAM_ISP,
-				"Sensor Dimension Update Failed rc: %d", rc);
-	}
-		break;
 	case CAM_ISP_GENERIC_BLOB_TYPE_TPG_CORE_CONFIG: {
 		struct cam_isp_tpg_core_config *tpg_config;
 
@@ -8417,7 +8334,6 @@ static int cam_sfe_packet_generic_blob_handler(void *user_data,
 	case CAM_ISP_GENERIC_BLOB_TYPE_IFE_CORE_CONFIG:
 	case CAM_ISP_GENERIC_BLOB_TYPE_VFE_OUT_CONFIG:
 	case CAM_ISP_GENERIC_BLOB_TYPE_BW_CONFIG_V2:
-	case CAM_ISP_GENERIC_BLOB_TYPE_SENSOR_DIMENSION_CONFIG:
 	case CAM_ISP_GENERIC_BLOB_TYPE_CSID_QCFA_CONFIG:
 	case CAM_ISP_GENERIC_BLOB_TYPE_SENSOR_BLANKING_CONFIG:
 	case CAM_ISP_GENERIC_BLOB_TYPE_TPG_CORE_CONFIG:

+ 8 - 4
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid170.h

@@ -67,7 +67,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val         = 2,
 	.format_measure_en_shift_val    = 0,
 	.fatal_err_mask                 = 0x4,
-	.non_fatal_err_mask             = 0x8000,
+	.non_fatal_err_mask             = 0xe000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -123,7 +123,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val          = 1,
 	.format_measure_en_shift_val     = 1,
 	.fatal_err_mask                  = 0x4,
-	.non_fatal_err_mask              = 0x8000,
+	.non_fatal_err_mask              = 0xe000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -179,7 +179,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val          = 1,
 	.format_measure_en_shift_val     = 1,
 	.fatal_err_mask                  = 0x4,
-	.non_fatal_err_mask              = 0x8000,
+	.non_fatal_err_mask              = 0xe000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -236,7 +236,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val          = 1,
 	.format_measure_en_shift_val     = 1,
 	.fatal_err_mask                  = 0x4,
-	.non_fatal_err_mask              = 0x8000,
+	.non_fatal_err_mask              = 0xe000,
 };
 
 static struct cam_ife_csid_csi2_rx_reg_info
@@ -387,6 +387,10 @@ static struct cam_ife_csid_ver1_common_reg_info
 	.measure_en_hbi_vbi_cnt_mask     = 0xC,
 	.timestamp_strobe_val            = 0x2,
 	.timestamp_stb_sel_shift_val     = 0,
+	.format_measure_height_mask_val  = 0xFFFF,
+	.format_measure_height_shift_val = 0x10,
+	.format_measure_width_mask_val   = 0xFFFF,
+	.format_measure_width_shift_val  = 0x0,
 };
 
 static struct cam_ife_csid_ver1_reg_info cam_ife_csid_170_reg_info = {

+ 9 - 5
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid170_200.h

@@ -74,7 +74,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val        = 2,
 	.format_measure_en_shift_val   = 0,
 	.fatal_err_mask                = 0x4,
-	.non_fatal_err_mask            = 0x8000,
+	.non_fatal_err_mask            = 0xe000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -133,7 +133,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val         = 2,
 	.format_measure_en_shift_val    = 0,
 	.fatal_err_mask                 = 0x4,
-	.non_fatal_err_mask             = 0x8000,
+	.non_fatal_err_mask             = 0xe000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -192,7 +192,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val          = 1,
 	.format_measure_en_shift_val     = 1,
 	.fatal_err_mask                  = 0x4,
-	.non_fatal_err_mask              = 0x8000,
+	.non_fatal_err_mask              = 0xe000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -251,7 +251,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val          = 1,
 	.format_measure_en_shift_val     = 1,
 	.fatal_err_mask                  = 0x4,
-	.non_fatal_err_mask              = 0x8000,
+	.non_fatal_err_mask              = 0xe000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -311,7 +311,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val          = 1,
 	.format_measure_en_shift_val     = 1,
 	.fatal_err_mask                  = 0x4,
-	.non_fatal_err_mask              = 0x8000,
+	.non_fatal_err_mask              = 0xe000,
 };
 
 static struct cam_ife_csid_csi2_rx_reg_info
@@ -467,6 +467,10 @@ static struct cam_ife_csid_ver1_common_reg_info
 	.measure_en_hbi_vbi_cnt_mask     = 0xC,
 	.timestamp_strobe_val            = 0x2,
 	.timestamp_stb_sel_shift_val     = 0,
+	.format_measure_height_mask_val  = 0xFFFF,
+	.format_measure_height_shift_val = 0x10,
+	.format_measure_width_mask_val   = 0xFFFF,
+	.format_measure_width_shift_val  = 0x0,
 };
 
 static struct cam_ife_csid_ver1_reg_info cam_ife_csid_170_200_reg_info = {

+ 9 - 5
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid175.h

@@ -69,7 +69,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val           = 1,
 	.format_measure_en_shift_val      = 0,
 	.fatal_err_mask                   = 0x4,
-	.non_fatal_err_mask               = 0x8000,
+	.non_fatal_err_mask               = 0xe000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -128,7 +128,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val           = 1,
 	.format_measure_en_shift_val      = 0,
 	.fatal_err_mask                   = 0x4,
-	.non_fatal_err_mask               = 0x8000,
+	.non_fatal_err_mask               = 0xe000,
 };
 
 
@@ -187,7 +187,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val          = 2,
 	.format_measure_en_shift_val     = 1,
 	.fatal_err_mask                  = 0x4,
-	.non_fatal_err_mask              = 0x8000,
+	.non_fatal_err_mask              = 0xe000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -243,7 +243,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val          = 2,
 	.format_measure_en_shift_val     = 1,
 	.fatal_err_mask                  = 0x4,
-	.non_fatal_err_mask              = 0x8000,
+	.non_fatal_err_mask              = 0xe000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -300,7 +300,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val          = 2,
 	.format_measure_en_shift_val     = 1,
 	.fatal_err_mask                  = 0x4,
-	.non_fatal_err_mask              = 0x8000,
+	.non_fatal_err_mask              = 0xe000,
 };
 
 static struct cam_ife_csid_csi2_rx_reg_info
@@ -450,6 +450,10 @@ static struct cam_ife_csid_ver1_common_reg_info
 	.measure_en_hbi_vbi_cnt_mask     = 0xC,
 	.timestamp_stb_sel_shift_val     = 0,
 	.timestamp_strobe_val            = 0x2,
+	.format_measure_height_mask_val  = 0xFFFF,
+	.format_measure_height_shift_val = 0x10,
+	.format_measure_width_mask_val   = 0xFFFF,
+	.format_measure_width_shift_val  = 0x0,
 };
 
 static struct cam_ife_csid_ver1_reg_info cam_ife_csid_175_reg_info = {

+ 9 - 5
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid175_200.h

@@ -75,7 +75,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val           = 1,
 	.format_measure_en_shift_val      = 0,
 	.fatal_err_mask                   = 0x4,
-	.non_fatal_err_mask               = 0x8000,
+	.non_fatal_err_mask               = 0xe000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -134,7 +134,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val           = 1,
 	.format_measure_en_shift_val      = 0,
 	.fatal_err_mask                   = 0x4,
-	.non_fatal_err_mask               = 0x8000,
+	.non_fatal_err_mask               = 0xe000,
 };
 
 
@@ -194,7 +194,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val           = 2,
 	.format_measure_en_shift_val      = 1,
 	.fatal_err_mask                   = 0x4,
-	.non_fatal_err_mask               = 0x8000,
+	.non_fatal_err_mask               = 0xe000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -253,7 +253,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val           = 2,
 	.format_measure_en_shift_val      = 1,
 	.fatal_err_mask                   = 0x4,
-	.non_fatal_err_mask               = 0x8000,
+	.non_fatal_err_mask               = 0xe000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -313,7 +313,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val           = 2,
 	.format_measure_en_shift_val      = 1,
 	.fatal_err_mask                   = 0x4,
-	.non_fatal_err_mask               = 0x8000,
+	.non_fatal_err_mask               = 0xe000,
 };
 
 static struct cam_ife_csid_csi2_rx_reg_info
@@ -468,6 +468,10 @@ static struct cam_ife_csid_ver1_common_reg_info
 	.measure_en_hbi_vbi_cnt_mask     = 0xC,
 	.timestamp_strobe_val            = 0x2,
 	.timestamp_stb_sel_shift_val     = 0,
+	.format_measure_height_mask_val  = 0xFFFF,
+	.format_measure_height_shift_val = 0x10,
+	.format_measure_width_mask_val   = 0xFFFF,
+	.format_measure_width_shift_val  = 0x0,
 };
 
 static struct cam_ife_csid_ver1_reg_info cam_ife_csid_175_200_reg_info = {

+ 9 - 5
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid480.h

@@ -83,7 +83,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val           = 1,
 	.format_measure_en_shift_val      = 0,
 	.fatal_err_mask                   = 0x4,
-	.non_fatal_err_mask               = 0x28000,
+	.non_fatal_err_mask               = 0x2e000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -150,7 +150,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val           = 1,
 	.format_measure_en_shift_val      = 0,
 	.fatal_err_mask                   = 0x4,
-	.non_fatal_err_mask               = 0x28000,
+	.non_fatal_err_mask               = 0x2e000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -218,7 +218,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val           = 2,
 	.format_measure_en_shift_val      = 1,
 	.fatal_err_mask                   = 0x4,
-	.non_fatal_err_mask               = 0x28000,
+	.non_fatal_err_mask               = 0x2e000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -286,7 +286,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val          = 2,
 	.format_measure_en_shift_val     = 1,
 	.fatal_err_mask                  = 0x4,
-	.non_fatal_err_mask              = 0x28000,
+	.non_fatal_err_mask              = 0x2e000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -355,7 +355,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val          = 2,
 	.format_measure_en_shift_val     = 1,
 	.fatal_err_mask                  = 0x4,
-	.non_fatal_err_mask              = 0x28000,
+	.non_fatal_err_mask              = 0x2e000,
 };
 
 static struct cam_ife_csid_csi2_rx_reg_info
@@ -511,6 +511,10 @@ static struct cam_ife_csid_ver1_common_reg_info
 	.rdi_irq_mask_all                = 0x7FFF,
 	.ppp_irq_mask_all                = 0xFFFF,
 	.measure_en_hbi_vbi_cnt_mask     = 0xC,
+	.format_measure_height_mask_val  = 0xFFFF,
+	.format_measure_height_shift_val = 0x10,
+	.format_measure_width_mask_val   = 0xFFFF,
+	.format_measure_width_shift_val  = 0x0,
 };
 
 static struct cam_ife_csid_ver1_reg_info cam_ife_csid_480_reg_info = {

+ 22 - 81
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver1.c

@@ -2270,26 +2270,6 @@ static int cam_ife_csid_ver1_init_config_rdi_path(
 		cam_io_w_mb(val, mem_base + path_reg->err_recovery_cfg0_addr);
 	}
 
-	if (path_cfg->fmt_measure_enable) {
-		val = (path_cfg->sensor_height &
-			cmn_reg->fmt_measure_num_line_mask) <<
-			cmn_reg->fmt_measure_num_lines_shift_val;
-		if (path_format.decode_fmt == 0xf)
-			val |= (__KERNEL_DIV_ROUND_UP(
-				(path_cfg->sensor_width *
-				path_format.bits_per_pxl), 8) &
-				cmn_reg->fmt_measure_num_pxl_mask);
-
-		else
-			val |= (path_cfg->sensor_width &
-				cmn_reg->fmt_measure_num_pxl_mask);
-
-		cam_io_w_mb(val, mem_base +
-			path_reg->format_measure_cfg1_addr);
-		cam_io_w_mb(cmn_reg->measure_pixel_line_en_mask,
-			mem_base + path_reg->format_measure_cfg0_addr);
-	}
-
 	if (csid_hw->debug_info.debug_val &
 		CAM_IFE_CSID_DEBUG_ENABLE_HBI_VBI_INFO) {
 		val = cam_io_r_mb(mem_base +
@@ -2606,18 +2586,6 @@ static int cam_ife_csid_ver1_init_config_pxl_path(
 		cam_io_w_mb(val, mem_base + path_reg->err_recovery_cfg0_addr);
 	}
 
-	if (path_cfg->fmt_measure_enable) {
-		val = (path_cfg->sensor_height &
-			cmn_reg->fmt_measure_num_line_mask) <<
-			cmn_reg->fmt_measure_num_lines_shift_val;
-		val |= path_cfg->sensor_width &
-			csid_reg->cmn_reg->fmt_measure_num_pxl_mask;
-		cam_io_w_mb(val, mem_base +
-			path_reg->format_measure_cfg1_addr);
-		cam_io_w_mb(cmn_reg->measure_pixel_line_en_mask, mem_base +
-			path_reg->format_measure_cfg0_addr);
-	}
-
 	if (csid_hw->debug_info.debug_val &
 		CAM_IFE_CSID_DEBUG_ENABLE_HBI_VBI_INFO) {
 		val = cam_io_r_mb(mem_base +
@@ -3561,51 +3529,6 @@ static int cam_ife_csid_ver1_dump_hw(
 	return 0;
 }
 
-static int cam_ife_csid_ver1_set_sensor_dimension(
-	struct cam_ife_csid_ver1_hw *csid_hw, void *cmd_args)
-{
-	struct cam_ife_sensor_dimension_update_args *update_args = NULL;
-	struct cam_isp_resource_node *res = NULL;
-	struct  cam_ife_csid_ver1_path_cfg *path_cfg = NULL;
-
-	if (!csid_hw || !cmd_args) {
-		CAM_ERR(CAM_ISP, "Invalid param %pK %pK",
-			csid_hw, cmd_args);
-		return -EINVAL;
-	}
-
-	update_args =
-		(struct cam_ife_sensor_dimension_update_args *)cmd_args;
-
-	res = update_args->res;
-
-	if (!res) {
-		CAM_ERR(CAM_ISP, "CSID[%d] NULL res",
-			csid_hw->hw_intf->hw_idx);
-		return -EINVAL;
-	}
-
-	path_cfg = (struct  cam_ife_csid_ver1_path_cfg *)res->res_priv;
-
-	if (!path_cfg) {
-		CAM_ERR(CAM_ISP, "CSID[%d] Invalid res_id %u",
-			csid_hw->hw_intf->hw_idx, res->res_id);
-		return -EINVAL;
-	}
-
-	path_cfg->fmt_measure_enable = update_args->sensor_data.measure_enabled;
-	path_cfg->sensor_width = update_args->sensor_data.width;
-	path_cfg->sensor_height = update_args->sensor_data.height;
-
-	CAM_DBG(CAM_ISP,
-		"CSID[%d] path[%d] width %u height %u",
-		csid_hw->hw_intf->hw_idx, res->res_id,
-		path_cfg->sensor_width,
-		path_cfg->sensor_height);
-
-	return 0;
-}
-
 static int cam_ife_csid_log_acquire_data(
 	struct cam_ife_csid_ver1_hw *csid_hw, void *cmd_args)
 {
@@ -3717,10 +3640,6 @@ static int cam_ife_csid_ver1_process_cmd(void *hw_priv,
 	case CAM_ISP_HW_CMD_CSID_CLOCK_DUMP:
 		rc = cam_ife_csid_ver1_dump_csid_clock(csid_hw, cmd_args);
 		break;
-	case CAM_IFE_CSID_SET_SENSOR_DIMENSION_CFG:
-		rc = cam_ife_csid_ver1_set_sensor_dimension(csid_hw,
-			cmd_args);
-		break;
 	case CAM_IFE_CSID_TOP_CONFIG:
 		break;
 	case CAM_IFE_CSID_SET_DUAL_SYNC_CONFIG:
@@ -4201,6 +4120,7 @@ static int cam_ife_csid_ver1_path_top_half(
 	uint32_t                                bit_pos = 0;
 	int                                     id = 0;
 	uint32_t                                sof_irq_debug_en = 0;
+	uint32_t                                val , val1;
 
 	csid_reg = (struct cam_ife_csid_ver1_reg_info *)
 			csid_hw->core_info->csid_reg;
@@ -4256,6 +4176,27 @@ static int cam_ife_csid_ver1_path_top_half(
 		csid_hw->counters.irq_debug_cnt++;
 	}
 
+	if ((status & IFE_CSID_VER1_PATH_ERROR_PIX_COUNT ) ||
+		(status & IFE_CSID_VER1_PATH_ERROR_LINE_COUNT)) {
+		val = cam_io_r_mb(soc_info->reg_map[0].mem_base +
+				path_reg->format_measure0_addr);
+		val1 = cam_io_r_mb(soc_info->reg_map[0].mem_base +
+				path_reg->format_measure_cfg1_addr);
+		CAM_ERR(CAM_ISP,
+			"Expected:: h:  0x%x w: 0x%x actual:: h: 0x%x w: 0x%x [format_measure0: 0x%x]",
+			((val1 >>
+			csid_reg->cmn_reg->format_measure_height_shift_val) &
+			csid_reg->cmn_reg->format_measure_height_mask_val),
+			val1 &
+			csid_reg->cmn_reg->format_measure_width_mask_val,
+			((val >>
+			csid_reg->cmn_reg->format_measure_height_shift_val) &
+			csid_reg->cmn_reg->format_measure_height_mask_val),
+			val &
+			csid_reg->cmn_reg->format_measure_width_mask_val,
+			val);
+	}
+
 	if (status & path_reg->fatal_err_mask)
 		cam_io_w_mb(CAM_CSID_HALT_IMMEDIATELY,
 			soc_info->reg_map[0].mem_base +

+ 4 - 4
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver1.h

@@ -134,6 +134,10 @@ struct cam_ife_csid_ver1_common_reg_info {
 	uint32_t crop_pix_end_mask;
 	uint32_t crop_line_start_mask;
 	uint32_t crop_line_end_mask;
+	uint32_t format_measure_height_mask_val;
+	uint32_t format_measure_height_shift_val;
+	uint32_t format_measure_width_mask_val;
+	uint32_t format_measure_width_shift_val;
 };
 
 /*
@@ -331,7 +335,6 @@ struct cam_ife_csid_ver1_reg_info {
  * @sync_mode   :        Sync mode--> master/slave/none
  * @crop_enable:         flag to indicate crop enable
  * @drop_enable:         flag to indicate drop enable
- * @fmt_measure_enable:  flag to indicate format measure enabled
  *
  */
 struct cam_ife_csid_ver1_path_cfg {
@@ -350,12 +353,9 @@ struct cam_ife_csid_ver1_path_cfg {
 	uint32_t                        qcfa_bin;
 	uint32_t                        hor_ver_bin;
 	uint32_t                        num_bytes_out;
-	uint32_t                        sensor_width;
-	uint32_t                        sensor_height;
 	enum cam_isp_hw_sync_mode       sync_mode;
 	bool                            crop_enable;
 	bool                            drop_enable;
-	bool                            fmt_measure_enable;
 };
 
 /**

+ 5 - 1
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_lite17x.h

@@ -67,7 +67,7 @@ static  struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val                = 2,
 	.format_measure_en_shift_val           = 1,
 	.fatal_err_mask                        = 0x4,
-	.non_fatal_err_mask                    = 0x8000,
+	.non_fatal_err_mask                    = 0xe000,
 };
 
 static  struct cam_ife_csid_ver1_path_reg_info
@@ -381,6 +381,10 @@ static  struct cam_ife_csid_ver1_common_reg_info
 	.ipp_irq_mask_all                      = 0x7FFF,
 	.rdi_irq_mask_all                      = 0x7FFF,
 	.ppp_irq_mask_all                      = 0xFFFF,
+	.format_measure_height_mask_val        = 0xFFFF,
+	.format_measure_height_shift_val       = 0x10,
+	.format_measure_width_mask_val         = 0xFFFF,
+	.format_measure_width_shift_val        = 0x0,
 };
 
 static  struct cam_ife_csid_ver1_reg_info cam_ife_csid_lite_17x_reg_info = {

+ 8 - 4
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_lite480.h

@@ -75,7 +75,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.format_measure_en_shift_val          = 1,
 	.overflow_ctrl_mode_val               = 0x8,
 	.fatal_err_mask                       = 0x4,
-	.non_fatal_err_mask                   = 0x28000,
+	.non_fatal_err_mask                   = 0x2e000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -142,7 +142,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.format_measure_en_shift_val          = 1,
 	.overflow_ctrl_mode_val               = 0x8,
 	.fatal_err_mask                       = 0x4,
-	.non_fatal_err_mask                   = 0x28000,
+	.non_fatal_err_mask                   = 0x2e000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -209,7 +209,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.timestamp_en_shift_val               = 2,
 	.format_measure_en_shift_val          = 1,
 	.fatal_err_mask                       = 0x4,
-	.non_fatal_err_mask                   = 0x28000,
+	.non_fatal_err_mask                   = 0x2e000,
 };
 
 static struct cam_ife_csid_ver1_path_reg_info
@@ -276,7 +276,7 @@ static struct cam_ife_csid_ver1_path_reg_info
 	.format_measure_en_shift_val          = 1,
 	.overflow_ctrl_mode_val               = 0x8,
 	.fatal_err_mask                       = 0x4,
-	.non_fatal_err_mask                   = 0x28000,
+	.non_fatal_err_mask                   = 0x2e000,
 };
 
 static struct cam_ife_csid_csi2_rx_reg_info
@@ -420,6 +420,10 @@ static struct cam_ife_csid_ver1_common_reg_info
 	.measure_en_hbi_vbi_cnt_mask          = 0xC,
 	.timestamp_strobe_val                 = 0x2,
 	.timestamp_stb_sel_shift_val          = 0,
+	.format_measure_height_mask_val       = 0xFFFF,
+	.format_measure_height_shift_val      = 0x10,
+	.format_measure_width_mask_val        = 0xFFFF,
+	.format_measure_width_shift_val       = 0x0,
 };
 
 static struct cam_ife_csid_ver1_reg_info cam_ife_csid_lite_480_reg_info = {

+ 0 - 1
drivers/cam_isp/isp_hw_mgr/isp_hw/include/cam_isp_hw.h

@@ -140,7 +140,6 @@ enum cam_isp_hw_cmd_type {
 	CAM_IFE_CSID_CMD_GET_TIME_STAMP,
 	CAM_IFE_CSID_SET_CSID_DEBUG,
 	CAM_IFE_CSID_SOF_IRQ_DEBUG,
-	CAM_IFE_CSID_SET_SENSOR_DIMENSION_CFG,
 	CAM_IFE_CSID_LOG_ACQUIRE_DATA,
 	CAM_IFE_CSID_TOP_CONFIG,
 	CAM_IFE_CSID_PROGRAM_OFFLINE_CMD,