Browse Source

msm: camera: isp: Change condition to dump SFE/IFE overflow debug info

-Corrects the condition to dump the cpas log votes
in case of bus overflows.
-Corrects the condition to dump the SFE violation modules.
-Moves RATE_LIMIT to normal logs in case of erros to avoid missing
any debug information.

CRs-Fixed: 3089589
Change-Id: I1aae0ef3c3882868c1a1b8e00d9c0c45ded576fb
Signed-off-by: Gaurav Jindal <[email protected]>
Gaurav Jindal 3 years ago
parent
commit
bd160429ea

+ 3 - 3
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.c

@@ -980,13 +980,13 @@ static int cam_ife_csid_ver2_handle_event_err(
 			cam_ife_csid_ver2_print_debug_reg_status(csid_hw, res);
 			cam_ife_csid_ver2_print_debug_reg_status(csid_hw, res);
 			path_cfg = (struct cam_ife_csid_ver2_path_cfg *)res->res_priv;
 			path_cfg = (struct cam_ife_csid_ver2_path_cfg *)res->res_priv;
 			evt.res_id   = res->res_id;
 			evt.res_id   = res->res_id;
-			CAM_ERR_RATE_LIMIT(CAM_ISP,
+			CAM_ERR(CAM_ISP,
 				"csid[%u] Res:%s Err 0x%x status 0x%x time_stamp: %lld:%lld",
 				"csid[%u] Res:%s Err 0x%x status 0x%x time_stamp: %lld:%lld",
 				csid_hw->hw_intf->hw_idx, res->res_name, err_type,
 				csid_hw->hw_intf->hw_idx, res->res_name, err_type,
 				irq_status, path_cfg->error_ts.tv_sec,
 				irq_status, path_cfg->error_ts.tv_sec,
 				path_cfg->error_ts.tv_nsec);
 				path_cfg->error_ts.tv_nsec);
 		} else {
 		} else {
-			CAM_ERR_RATE_LIMIT(CAM_ISP,
+			CAM_ERR(CAM_ISP,
 				"csid[%u] Rx Err: 0x%x status 0x%x",
 				"csid[%u] Rx Err: 0x%x status 0x%x",
 				csid_hw->hw_intf->hw_idx, err_type, irq_status);
 				csid_hw->hw_intf->hw_idx, err_type, irq_status);
 		}
 		}
@@ -1520,7 +1520,7 @@ void cam_ife_csid_ver2_print_format_measure_info(
 	CAM_INFO(CAM_ISP, "CSID[%u] res [id :%d name : %s]",
 	CAM_INFO(CAM_ISP, "CSID[%u] res [id :%d name : %s]",
 		csid_hw->hw_intf->hw_idx,
 		csid_hw->hw_intf->hw_idx,
 		res->res_id, res->res_name);
 		res->res_id, res->res_name);
-	CAM_ERR_RATE_LIMIT(CAM_ISP, "Frame Size Error Expected[h: %u w: %u] Actual[h: %u w: %u]",
+	CAM_ERR(CAM_ISP, "Frame Size Error Expected[h: %u w: %u] Actual[h: %u w: %u]",
 		((expected_frame >>
 		((expected_frame >>
 		csid_reg->cmn_reg->format_measure_height_shift_val) &
 		csid_reg->cmn_reg->format_measure_height_shift_val) &
 		csid_reg->cmn_reg->format_measure_height_mask_val),
 		csid_reg->cmn_reg->format_measure_height_mask_val),

+ 11 - 6
drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_top/cam_sfe_top.c

@@ -763,7 +763,7 @@ static int cam_sfe_top_handle_overflow(
 {
 {
 	struct cam_sfe_top_common_data      *common_data;
 	struct cam_sfe_top_common_data      *common_data;
 	struct cam_hw_soc_info              *soc_info;
 	struct cam_hw_soc_info              *soc_info;
-	uint32_t                             overflow_status, violation_status;
+	uint32_t                             overflow_status, violation_status, tmp;
 	uint32_t                             i = 0;
 	uint32_t                             i = 0;
 
 
 	common_data = &top_priv->common_data;
 	common_data = &top_priv->common_data;
@@ -774,22 +774,27 @@ static int cam_sfe_top_handle_overflow(
 	violation_status = cam_io_r(soc_info->reg_map[SFE_CORE_BASE_IDX].mem_base +
 	violation_status = cam_io_r(soc_info->reg_map[SFE_CORE_BASE_IDX].mem_base +
 		top_priv->common_data.common_reg->ipp_violation_status);
 		top_priv->common_data.common_reg->ipp_violation_status);
 
 
-	CAM_ERR_RATE_LIMIT(CAM_ISP,
+	CAM_ERR(CAM_ISP,
 		"SFE%d src_clk_rate:%luHz overflow:%s violation: %s",
 		"SFE%d src_clk_rate:%luHz overflow:%s violation: %s",
 		soc_info->index, soc_info->applied_src_clk_rate,
 		soc_info->index, soc_info->applied_src_clk_rate,
 		CAM_BOOL_TO_YESNO(overflow_status), CAM_BOOL_TO_YESNO(violation_status));
 		CAM_BOOL_TO_YESNO(overflow_status), CAM_BOOL_TO_YESNO(violation_status));
 
 
-	while (overflow_status) {
-		if (overflow_status & 0x1)
+	tmp = overflow_status;
+	while (tmp) {
+		if (tmp & 0x1)
 			CAM_ERR(CAM_ISP, "SFE Overflow %s ",
 			CAM_ERR(CAM_ISP, "SFE Overflow %s ",
 				top_priv->wr_client_desc[i].desc);
 				top_priv->wr_client_desc[i].desc);
-		overflow_status = overflow_status >> 1;
+		tmp = tmp >> 1;
 		i++;
 		i++;
 	}
 	}
 
 
-	cam_sfe_top_print_ipp_violation_info(top_priv, violation_status);
+	if (violation_status)
+		cam_sfe_top_print_ipp_violation_info(top_priv, violation_status);
 	cam_sfe_top_print_debug_reg_info(top_priv);
 	cam_sfe_top_print_debug_reg_info(top_priv);
 
 
+	if (overflow_status)
+		cam_cpas_log_votes();
+
 	return 0;
 	return 0;
 }
 }
 
 

+ 3 - 3
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.c

@@ -672,7 +672,7 @@ static void cam_vfe_bus_ver3_print_constraint_errors(
 {
 {
 	uint32_t i;
 	uint32_t i;
 
 
-	CAM_INFO_RATE_LIMIT(CAM_ISP, "Constraint violation bitflags: 0x%X",
+	CAM_INFO(CAM_ISP, "Constraint violation bitflags: 0x%X",
 		constraint_errors);
 		constraint_errors);
 
 
 	for (i = 0; i < bus_priv->num_cons_err; i++) {
 	for (i = 0; i < bus_priv->num_cons_err; i++) {
@@ -2808,10 +2808,10 @@ static int cam_vfe_bus_ver3_err_irq_top_half(uint32_t evt_id,
 		th_payload->handler_priv;
 		th_payload->handler_priv;
 	struct cam_vfe_bus_irq_evt_payload *evt_payload;
 	struct cam_vfe_bus_irq_evt_payload *evt_payload;
 
 
-	CAM_ERR_RATE_LIMIT(CAM_ISP, "VFE:%d BUS Err IRQ",
+	CAM_ERR(CAM_ISP, "VFE:%d BUS Err IRQ",
 		bus_priv->common_data.core_index);
 		bus_priv->common_data.core_index);
 	for (i = 0; i < th_payload->num_registers; i++) {
 	for (i = 0; i < th_payload->num_registers; i++) {
-		CAM_ERR_RATE_LIMIT(CAM_ISP, "VFE:%d BUS IRQ status_%d: 0x%X",
+		CAM_ERR(CAM_ISP, "VFE:%d BUS IRQ status_%d: 0x%X",
 		bus_priv->common_data.core_index, i,
 		bus_priv->common_data.core_index, i,
 			th_payload->evt_status_arr[i]);
 			th_payload->evt_status_arr[i]);
 	}
 	}

+ 10 - 8
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_top_ver4.c

@@ -494,18 +494,20 @@ static int cam_vfe_top_ver4_print_overflow_debug_info(
 	violation_status = cam_io_r(soc_info->reg_map[VFE_CORE_BASE_IDX].mem_base +
 	violation_status = cam_io_r(soc_info->reg_map[VFE_CORE_BASE_IDX].mem_base +
 		    common_data->common_reg->bus_violation_status);
 		    common_data->common_reg->bus_violation_status);
 
 
-	CAM_ERR_RATE_LIMIT(CAM_ISP, "VFE[%d] sof_cnt:%d src_clk:%luMHz overflow:%s violation:%s",
+	CAM_ERR(CAM_ISP, "VFE[%d] sof_cnt:%d src_clk:%luMHz overflow:%s violation:%s",
 		top_priv->sof_cnt, soc_info->index, soc_info->applied_src_clk_rate / 1000000,
 		top_priv->sof_cnt, soc_info->index, soc_info->applied_src_clk_rate / 1000000,
 		CAM_BOOL_TO_YESNO(bus_overflow_status), CAM_BOOL_TO_YESNO(violation_status));
 		CAM_BOOL_TO_YESNO(bus_overflow_status), CAM_BOOL_TO_YESNO(violation_status));
 
 
 	if (bus_overflow_status)
 	if (bus_overflow_status)
-		CAM_INFO_RATE_LIMIT(CAM_ISP, "VFE[%d] Bus overflow status: 0x%x",
+		CAM_INFO(CAM_ISP, "VFE[%d] Bus overflow status: 0x%x",
 			soc_info->index, bus_overflow_status);
 			soc_info->index, bus_overflow_status);
-	while (bus_overflow_status) {
-		if (bus_overflow_status & 0x1)
-			CAM_ERR_RATE_LIMIT(CAM_ISP, "VFE[%d] Bus Overflow %s",
+
+	tmp = bus_overflow_status;
+	while (tmp) {
+		if (tmp & 0x1)
+			CAM_ERR(CAM_ISP, "VFE[%d] Bus Overflow %s",
 				soc_info->index, common_data->hw_info->wr_client_desc[i].desc);
 				soc_info->index, common_data->hw_info->wr_client_desc[i].desc);
-		bus_overflow_status = bus_overflow_status >> 1;
+		tmp = tmp >> 1;
 		i++;
 		i++;
 	}
 	}
 
 
@@ -515,14 +517,14 @@ static int cam_vfe_top_ver4_print_overflow_debug_info(
 		cam_cpas_log_votes();
 		cam_cpas_log_votes();
 
 
 	if (violation_status)
 	if (violation_status)
-		CAM_INFO_RATE_LIMIT(CAM_ISP, "VFE[%d] Bus violation status: 0x%x",
+		CAM_INFO(CAM_ISP, "VFE[%d] Bus violation status: 0x%x",
 			soc_info->index, violation_status);
 			soc_info->index, violation_status);
 
 
 	i = 0;
 	i = 0;
 	tmp = violation_status;
 	tmp = violation_status;
 	while (tmp) {
 	while (tmp) {
 		if (tmp & 0x1)
 		if (tmp & 0x1)
-			CAM_ERR_RATE_LIMIT(CAM_ISP, "VFE[%d] Bus Violation %s",
+			CAM_ERR(CAM_ISP, "VFE[%d] Bus Violation %s",
 				soc_info->index, common_data->hw_info->wr_client_desc[i].desc);
 				soc_info->index, common_data->hw_info->wr_client_desc[i].desc);
 		tmp = tmp >> 1;
 		tmp = tmp >> 1;
 		i++;
 		i++;