Loading drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c +51 −26 Original line number Diff line number Diff line Loading @@ -42,6 +42,9 @@ #define CAM_IFE_CSID_QTIMER_MUL_FACTOR 10000 #define CAM_IFE_CSID_QTIMER_DIV_FACTOR 192 /* Max number of sof irq's triggered in case of SOF freeze */ #define CAM_CSID_IRQ_SOF_DEBUG_CNT_MAX 6 static int cam_ife_csid_is_ipp_format_supported( uint32_t in_format) { Loading Loading @@ -2370,6 +2373,10 @@ static int cam_ife_csid_start(void *hw_priv, void *start_args, goto end; } /* Reset sof irq debug fields */ csid_hw->sof_irq_triggered = false; csid_hw->irq_debug_cnt = 0; CAM_DBG(CAM_ISP, "CSID:%d res_type :%d res_id:%d", csid_hw->hw_intf->hw_idx, res->res_type, res->res_id); Loading Loading @@ -2520,10 +2527,13 @@ static int cam_ife_csid_sof_irq_debug( } } if (sof_irq_enable) if (sof_irq_enable) { csid_hw->csid_debug |= CSID_DEBUG_ENABLE_SOF_IRQ; else csid_hw->sof_irq_triggered = true; } else { csid_hw->csid_debug &= ~CSID_DEBUG_ENABLE_SOF_IRQ; csid_hw->sof_irq_triggered = false; } CAM_INFO(CAM_ISP, "SOF freeze: CSID SOF irq %s", (sof_irq_enable == true) ? "enabled" : "disabled"); Loading Loading @@ -2575,7 +2585,7 @@ irqreturn_t cam_ife_csid_irq(int irq_num, void *data) struct cam_ife_csid_csi2_rx_reg_offset *csi2_reg; uint32_t i, irq_status_top, irq_status_rx, irq_status_ipp = 0; uint32_t irq_status_rdi[4] = {0, 0, 0, 0}; uint32_t val; uint32_t val, sof_irq_disable = 0; csid_hw = (struct cam_ife_csid_hw *)data; Loading Loading @@ -2687,22 +2697,22 @@ irqreturn_t cam_ife_csid_irq(int irq_num, void *data) if (csid_hw->csid_debug & CSID_DEBUG_ENABLE_EOT_IRQ) { if (irq_status_rx & CSID_CSI2_RX_INFO_PHY_DL0_EOT_CAPTURED) { CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d PHY_DL0_EOT_CAPTURED", csid_hw->hw_intf->hw_idx); } if (irq_status_rx & CSID_CSI2_RX_INFO_PHY_DL1_EOT_CAPTURED) { CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d PHY_DL1_EOT_CAPTURED", csid_hw->hw_intf->hw_idx); } if (irq_status_rx & CSID_CSI2_RX_INFO_PHY_DL2_EOT_CAPTURED) { CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d PHY_DL2_EOT_CAPTURED", csid_hw->hw_intf->hw_idx); } if (irq_status_rx & CSID_CSI2_RX_INFO_PHY_DL3_EOT_CAPTURED) { CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d PHY_DL3_EOT_CAPTURED", csid_hw->hw_intf->hw_idx); } Loading @@ -2710,22 +2720,22 @@ irqreturn_t cam_ife_csid_irq(int irq_num, void *data) if (csid_hw->csid_debug & CSID_DEBUG_ENABLE_SOT_IRQ) { if (irq_status_rx & CSID_CSI2_RX_INFO_PHY_DL0_SOT_CAPTURED) { CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d PHY_DL0_SOT_CAPTURED", csid_hw->hw_intf->hw_idx); } if (irq_status_rx & CSID_CSI2_RX_INFO_PHY_DL1_SOT_CAPTURED) { CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d PHY_DL1_SOT_CAPTURED", csid_hw->hw_intf->hw_idx); } if (irq_status_rx & CSID_CSI2_RX_INFO_PHY_DL2_SOT_CAPTURED) { CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d PHY_DL2_SOT_CAPTURED", csid_hw->hw_intf->hw_idx); } if (irq_status_rx & CSID_CSI2_RX_INFO_PHY_DL3_SOT_CAPTURED) { CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d PHY_DL3_SOT_CAPTURED", csid_hw->hw_intf->hw_idx); } Loading @@ -2733,44 +2743,48 @@ irqreturn_t cam_ife_csid_irq(int irq_num, void *data) if ((csid_hw->csid_debug & CSID_DEBUG_ENABLE_LONG_PKT_CAPTURE) && (irq_status_rx & CSID_CSI2_RX_INFO_LONG_PKT_CAPTURED)) { CAM_ERR(CAM_ISP, "CSID:%d LONG_PKT_CAPTURED", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d LONG_PKT_CAPTURED", csid_hw->hw_intf->hw_idx); val = cam_io_r_mb(soc_info->reg_map[0].mem_base + csi2_reg->csid_csi2_rx_captured_long_pkt_0_addr); CAM_ERR(CAM_ISP, "CSID:%d long packet VC :%d DT:%d WC:%d", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d long packet VC :%d DT:%d WC:%d", csid_hw->hw_intf->hw_idx, (val >> 22), ((val >> 16) & 0x3F), (val & 0xFFFF)); val = cam_io_r_mb(soc_info->reg_map[0].mem_base + csi2_reg->csid_csi2_rx_captured_long_pkt_1_addr); CAM_ERR(CAM_ISP, "CSID:%d long packet ECC :%d", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d long packet ECC :%d", csid_hw->hw_intf->hw_idx, val); val = cam_io_r_mb(soc_info->reg_map[0].mem_base + csi2_reg->csid_csi2_rx_captured_long_pkt_ftr_addr); CAM_ERR(CAM_ISP, "CSID:%d long pkt cal CRC:%d expected CRC:%d", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d long pkt cal CRC:%d expected CRC:%d", csid_hw->hw_intf->hw_idx, (val >> 16), (val & 0xFFFF)); } if ((csid_hw->csid_debug & CSID_DEBUG_ENABLE_SHORT_PKT_CAPTURE) && (irq_status_rx & CSID_CSI2_RX_INFO_SHORT_PKT_CAPTURED)) { CAM_ERR(CAM_ISP, "CSID:%d SHORT_PKT_CAPTURED", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d SHORT_PKT_CAPTURED", csid_hw->hw_intf->hw_idx); val = cam_io_r_mb(soc_info->reg_map[0].mem_base + csi2_reg->csid_csi2_rx_captured_short_pkt_0_addr); CAM_ERR(CAM_ISP, "CSID:%d short pkt VC :%d DT:%d LC:%d", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d short pkt VC :%d DT:%d LC:%d", csid_hw->hw_intf->hw_idx, (val >> 22), ((val >> 16) & 0x1F), (val & 0xFFFF)); val = cam_io_r_mb(soc_info->reg_map[0].mem_base + csi2_reg->csid_csi2_rx_captured_short_pkt_1_addr); CAM_ERR(CAM_ISP, "CSID:%d short packet ECC :%d", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d short packet ECC :%d", csid_hw->hw_intf->hw_idx, val); } if ((csid_hw->csid_debug & CSID_DEBUG_ENABLE_CPHY_PKT_CAPTURE) && (irq_status_rx & CSID_CSI2_RX_INFO_CPHY_PKT_HDR_CAPTURED)) { CAM_ERR(CAM_ISP, "CSID:%d CPHY_PKT_HDR_CAPTURED", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d CPHY_PKT_HDR_CAPTURED", csid_hw->hw_intf->hw_idx); val = cam_io_r_mb(soc_info->reg_map[0].mem_base + csi2_reg->csid_csi2_rx_captured_cphy_pkt_hdr_addr); CAM_ERR(CAM_ISP, "CSID:%d cphy packet VC :%d DT:%d WC:%d", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d cphy packet VC :%d DT:%d WC:%d", csid_hw->hw_intf->hw_idx, (val >> 22), ((val >> 16) & 0x1F), (val & 0xFFFF)); } Loading @@ -2785,13 +2799,16 @@ irqreturn_t cam_ife_csid_irq(int irq_num, void *data) } if ((irq_status_ipp & CSID_PATH_INFO_INPUT_SOF) && (csid_hw->csid_debug & CSID_DEBUG_ENABLE_SOF_IRQ)) CAM_ERR_RATE_LIMIT(CAM_ISP, "CSID:%d IPP SOF received", (csid_hw->csid_debug & CSID_DEBUG_ENABLE_SOF_IRQ)) { CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d IPP SOF received", csid_hw->hw_intf->hw_idx); if (csid_hw->sof_irq_triggered) csid_hw->irq_debug_cnt++; } if ((irq_status_ipp & CSID_PATH_INFO_INPUT_EOF) && (csid_hw->csid_debug & CSID_DEBUG_ENABLE_EOF_IRQ)) CAM_ERR_RATE_LIMIT(CAM_ISP, "CSID:%d IPP EOF received", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d IPP EOF received", csid_hw->hw_intf->hw_idx); if (irq_status_ipp & CSID_PATH_ERROR_FIFO_OVERFLOW) { Loading @@ -2813,13 +2830,16 @@ irqreturn_t cam_ife_csid_irq(int irq_num, void *data) } if ((irq_status_rdi[i] & CSID_PATH_INFO_INPUT_SOF) && (csid_hw->csid_debug & CSID_DEBUG_ENABLE_SOF_IRQ)) CAM_ERR_RATE_LIMIT(CAM_ISP, (csid_hw->csid_debug & CSID_DEBUG_ENABLE_SOF_IRQ)) { CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID RDI:%d SOF received", i); if (csid_hw->sof_irq_triggered) csid_hw->irq_debug_cnt++; } if ((irq_status_rdi[i] & CSID_PATH_INFO_INPUT_EOF) && (csid_hw->csid_debug & CSID_DEBUG_ENABLE_EOF_IRQ)) CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID RDI:%d EOF received", i); if (irq_status_rdi[i] & CSID_PATH_ERROR_FIFO_OVERFLOW) { Loading @@ -2833,6 +2853,11 @@ irqreturn_t cam_ife_csid_irq(int irq_num, void *data) } } if (csid_hw->irq_debug_cnt >= CAM_CSID_IRQ_SOF_DEBUG_CNT_MAX) { cam_ife_csid_sof_irq_debug(csid_hw, &sof_irq_disable); csid_hw->irq_debug_cnt = 0; } CAM_DBG(CAM_ISP, "IRQ Handling exit"); return IRQ_HANDLED; } Loading drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.h +5 −0 Original line number Diff line number Diff line Loading @@ -435,6 +435,9 @@ struct cam_ife_csid_path_cfg { * @csid_debug: csid debug information to enable the SOT, EOT, * SOF, EOF, measure etc in the csid hw * @clk_rate Clock rate * @sof_irq_triggered: Flag is set on receiving event to enable sof irq * incase of SOF freeze. * @irq_debug_cnt: Counter to track sof irq's when above flag is set. * */ struct cam_ife_csid_hw { Loading @@ -456,6 +459,8 @@ struct cam_ife_csid_hw { struct completion csid_rdin_complete[CAM_IFE_CSID_RDI_MAX]; uint64_t csid_debug; uint64_t clk_rate; bool sof_irq_triggered; uint32_t irq_debug_cnt; }; int cam_ife_csid_hw_probe_init(struct cam_hw_intf *csid_hw_intf, Loading drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_camif_ver2.c +21 −4 Original line number Diff line number Diff line Loading @@ -24,6 +24,8 @@ #include "cam_cdm_util.h" #include "cam_cpas_api.h" #define CAM_VFE_CAMIF_IRQ_SOF_DEBUG_CNT_MAX 2 struct cam_vfe_mux_camif_data { void __iomem *mem_base; struct cam_hw_intf *hw_intf; Loading @@ -40,6 +42,7 @@ struct cam_vfe_mux_camif_data { uint32_t last_pixel; uint32_t last_line; bool enable_sof_irq_debug; uint32_t irq_debug_cnt; }; static int cam_vfe_camif_validate_pix_pattern(uint32_t pattern) Loading Loading @@ -266,6 +269,10 @@ static int cam_vfe_camif_resource_start( CAM_DBG(CAM_ISP, "hw id:%d RUP val:%d", camif_res->hw_intf->hw_idx, rsrc_data->reg_data->reg_update_cmd_data); /* disable sof irq debug flag */ rsrc_data->enable_sof_irq_debug = false; rsrc_data->irq_debug_cnt = 0; CAM_DBG(CAM_ISP, "Start Camif IFE %d Done", camif_res->hw_intf->hw_idx); return 0; } Loading Loading @@ -440,11 +447,21 @@ static int cam_vfe_camif_handle_irq_bottom_half(void *handler_priv, switch (payload->evt_id) { case CAM_ISP_HW_EVENT_SOF: if (irq_status0 & camif_priv->reg_data->sof_irq_mask) { if (camif_priv->enable_sof_irq_debug) CAM_ERR_RATE_LIMIT(CAM_ISP, "Received SOF"); else if ((camif_priv->enable_sof_irq_debug) && (camif_priv->irq_debug_cnt <= CAM_VFE_CAMIF_IRQ_SOF_DEBUG_CNT_MAX)) { CAM_INFO_RATE_LIMIT(CAM_ISP, "Received SOF"); camif_priv->irq_debug_cnt++; if (camif_priv->irq_debug_cnt == CAM_VFE_CAMIF_IRQ_SOF_DEBUG_CNT_MAX) { camif_priv->enable_sof_irq_debug = false; camif_priv->irq_debug_cnt = 0; } } else { CAM_DBG(CAM_ISP, "Received SOF"); } ret = CAM_VFE_IRQ_STATUS_SUCCESS; } break; Loading drivers/media/platform/msm/camera/cam_utils/cam_debug_util.h +15 −2 Original line number Diff line number Diff line Loading @@ -106,6 +106,19 @@ const char *cam_get_module_name(unsigned int module_id); #define CAM_INFO(__module, fmt, args...) \ pr_info("CAM_INFO: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__, __LINE__, ##args) /* * CAM_INFO_RATE_LIMIT * @brief : This Macro will print info logs with ratelimit * * @__module : Respective module id which is been calling this Macro * @fmt : Formatted string which needs to be print in log * @args : Arguments which needs to be print in log */ #define CAM_INFO_RATE_LIMIT(__module, fmt, args...) \ pr_err_ratelimited("CAM_INFO: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__, __LINE__, ##args) /* * CAM_DBG * @brief : This Macro will print debug logs when enabled using GROUP Loading @@ -119,7 +132,7 @@ const char *cam_get_module_name(unsigned int module_id); /* * CAM_ERR_RATE_LIMIT * @brief : This Macro will prevent error print logs with ratelimit * @brief : This Macro will print error print logs with ratelimit */ #define CAM_ERR_RATE_LIMIT(__module, fmt, args...) \ pr_err_ratelimited("CAM_ERR: %s: %s: %d " fmt "\n", \ Loading Loading
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c +51 −26 Original line number Diff line number Diff line Loading @@ -42,6 +42,9 @@ #define CAM_IFE_CSID_QTIMER_MUL_FACTOR 10000 #define CAM_IFE_CSID_QTIMER_DIV_FACTOR 192 /* Max number of sof irq's triggered in case of SOF freeze */ #define CAM_CSID_IRQ_SOF_DEBUG_CNT_MAX 6 static int cam_ife_csid_is_ipp_format_supported( uint32_t in_format) { Loading Loading @@ -2370,6 +2373,10 @@ static int cam_ife_csid_start(void *hw_priv, void *start_args, goto end; } /* Reset sof irq debug fields */ csid_hw->sof_irq_triggered = false; csid_hw->irq_debug_cnt = 0; CAM_DBG(CAM_ISP, "CSID:%d res_type :%d res_id:%d", csid_hw->hw_intf->hw_idx, res->res_type, res->res_id); Loading Loading @@ -2520,10 +2527,13 @@ static int cam_ife_csid_sof_irq_debug( } } if (sof_irq_enable) if (sof_irq_enable) { csid_hw->csid_debug |= CSID_DEBUG_ENABLE_SOF_IRQ; else csid_hw->sof_irq_triggered = true; } else { csid_hw->csid_debug &= ~CSID_DEBUG_ENABLE_SOF_IRQ; csid_hw->sof_irq_triggered = false; } CAM_INFO(CAM_ISP, "SOF freeze: CSID SOF irq %s", (sof_irq_enable == true) ? "enabled" : "disabled"); Loading Loading @@ -2575,7 +2585,7 @@ irqreturn_t cam_ife_csid_irq(int irq_num, void *data) struct cam_ife_csid_csi2_rx_reg_offset *csi2_reg; uint32_t i, irq_status_top, irq_status_rx, irq_status_ipp = 0; uint32_t irq_status_rdi[4] = {0, 0, 0, 0}; uint32_t val; uint32_t val, sof_irq_disable = 0; csid_hw = (struct cam_ife_csid_hw *)data; Loading Loading @@ -2687,22 +2697,22 @@ irqreturn_t cam_ife_csid_irq(int irq_num, void *data) if (csid_hw->csid_debug & CSID_DEBUG_ENABLE_EOT_IRQ) { if (irq_status_rx & CSID_CSI2_RX_INFO_PHY_DL0_EOT_CAPTURED) { CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d PHY_DL0_EOT_CAPTURED", csid_hw->hw_intf->hw_idx); } if (irq_status_rx & CSID_CSI2_RX_INFO_PHY_DL1_EOT_CAPTURED) { CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d PHY_DL1_EOT_CAPTURED", csid_hw->hw_intf->hw_idx); } if (irq_status_rx & CSID_CSI2_RX_INFO_PHY_DL2_EOT_CAPTURED) { CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d PHY_DL2_EOT_CAPTURED", csid_hw->hw_intf->hw_idx); } if (irq_status_rx & CSID_CSI2_RX_INFO_PHY_DL3_EOT_CAPTURED) { CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d PHY_DL3_EOT_CAPTURED", csid_hw->hw_intf->hw_idx); } Loading @@ -2710,22 +2720,22 @@ irqreturn_t cam_ife_csid_irq(int irq_num, void *data) if (csid_hw->csid_debug & CSID_DEBUG_ENABLE_SOT_IRQ) { if (irq_status_rx & CSID_CSI2_RX_INFO_PHY_DL0_SOT_CAPTURED) { CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d PHY_DL0_SOT_CAPTURED", csid_hw->hw_intf->hw_idx); } if (irq_status_rx & CSID_CSI2_RX_INFO_PHY_DL1_SOT_CAPTURED) { CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d PHY_DL1_SOT_CAPTURED", csid_hw->hw_intf->hw_idx); } if (irq_status_rx & CSID_CSI2_RX_INFO_PHY_DL2_SOT_CAPTURED) { CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d PHY_DL2_SOT_CAPTURED", csid_hw->hw_intf->hw_idx); } if (irq_status_rx & CSID_CSI2_RX_INFO_PHY_DL3_SOT_CAPTURED) { CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d PHY_DL3_SOT_CAPTURED", csid_hw->hw_intf->hw_idx); } Loading @@ -2733,44 +2743,48 @@ irqreturn_t cam_ife_csid_irq(int irq_num, void *data) if ((csid_hw->csid_debug & CSID_DEBUG_ENABLE_LONG_PKT_CAPTURE) && (irq_status_rx & CSID_CSI2_RX_INFO_LONG_PKT_CAPTURED)) { CAM_ERR(CAM_ISP, "CSID:%d LONG_PKT_CAPTURED", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d LONG_PKT_CAPTURED", csid_hw->hw_intf->hw_idx); val = cam_io_r_mb(soc_info->reg_map[0].mem_base + csi2_reg->csid_csi2_rx_captured_long_pkt_0_addr); CAM_ERR(CAM_ISP, "CSID:%d long packet VC :%d DT:%d WC:%d", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d long packet VC :%d DT:%d WC:%d", csid_hw->hw_intf->hw_idx, (val >> 22), ((val >> 16) & 0x3F), (val & 0xFFFF)); val = cam_io_r_mb(soc_info->reg_map[0].mem_base + csi2_reg->csid_csi2_rx_captured_long_pkt_1_addr); CAM_ERR(CAM_ISP, "CSID:%d long packet ECC :%d", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d long packet ECC :%d", csid_hw->hw_intf->hw_idx, val); val = cam_io_r_mb(soc_info->reg_map[0].mem_base + csi2_reg->csid_csi2_rx_captured_long_pkt_ftr_addr); CAM_ERR(CAM_ISP, "CSID:%d long pkt cal CRC:%d expected CRC:%d", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d long pkt cal CRC:%d expected CRC:%d", csid_hw->hw_intf->hw_idx, (val >> 16), (val & 0xFFFF)); } if ((csid_hw->csid_debug & CSID_DEBUG_ENABLE_SHORT_PKT_CAPTURE) && (irq_status_rx & CSID_CSI2_RX_INFO_SHORT_PKT_CAPTURED)) { CAM_ERR(CAM_ISP, "CSID:%d SHORT_PKT_CAPTURED", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d SHORT_PKT_CAPTURED", csid_hw->hw_intf->hw_idx); val = cam_io_r_mb(soc_info->reg_map[0].mem_base + csi2_reg->csid_csi2_rx_captured_short_pkt_0_addr); CAM_ERR(CAM_ISP, "CSID:%d short pkt VC :%d DT:%d LC:%d", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d short pkt VC :%d DT:%d LC:%d", csid_hw->hw_intf->hw_idx, (val >> 22), ((val >> 16) & 0x1F), (val & 0xFFFF)); val = cam_io_r_mb(soc_info->reg_map[0].mem_base + csi2_reg->csid_csi2_rx_captured_short_pkt_1_addr); CAM_ERR(CAM_ISP, "CSID:%d short packet ECC :%d", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d short packet ECC :%d", csid_hw->hw_intf->hw_idx, val); } if ((csid_hw->csid_debug & CSID_DEBUG_ENABLE_CPHY_PKT_CAPTURE) && (irq_status_rx & CSID_CSI2_RX_INFO_CPHY_PKT_HDR_CAPTURED)) { CAM_ERR(CAM_ISP, "CSID:%d CPHY_PKT_HDR_CAPTURED", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d CPHY_PKT_HDR_CAPTURED", csid_hw->hw_intf->hw_idx); val = cam_io_r_mb(soc_info->reg_map[0].mem_base + csi2_reg->csid_csi2_rx_captured_cphy_pkt_hdr_addr); CAM_ERR(CAM_ISP, "CSID:%d cphy packet VC :%d DT:%d WC:%d", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d cphy packet VC :%d DT:%d WC:%d", csid_hw->hw_intf->hw_idx, (val >> 22), ((val >> 16) & 0x1F), (val & 0xFFFF)); } Loading @@ -2785,13 +2799,16 @@ irqreturn_t cam_ife_csid_irq(int irq_num, void *data) } if ((irq_status_ipp & CSID_PATH_INFO_INPUT_SOF) && (csid_hw->csid_debug & CSID_DEBUG_ENABLE_SOF_IRQ)) CAM_ERR_RATE_LIMIT(CAM_ISP, "CSID:%d IPP SOF received", (csid_hw->csid_debug & CSID_DEBUG_ENABLE_SOF_IRQ)) { CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d IPP SOF received", csid_hw->hw_intf->hw_idx); if (csid_hw->sof_irq_triggered) csid_hw->irq_debug_cnt++; } if ((irq_status_ipp & CSID_PATH_INFO_INPUT_EOF) && (csid_hw->csid_debug & CSID_DEBUG_ENABLE_EOF_IRQ)) CAM_ERR_RATE_LIMIT(CAM_ISP, "CSID:%d IPP EOF received", CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID:%d IPP EOF received", csid_hw->hw_intf->hw_idx); if (irq_status_ipp & CSID_PATH_ERROR_FIFO_OVERFLOW) { Loading @@ -2813,13 +2830,16 @@ irqreturn_t cam_ife_csid_irq(int irq_num, void *data) } if ((irq_status_rdi[i] & CSID_PATH_INFO_INPUT_SOF) && (csid_hw->csid_debug & CSID_DEBUG_ENABLE_SOF_IRQ)) CAM_ERR_RATE_LIMIT(CAM_ISP, (csid_hw->csid_debug & CSID_DEBUG_ENABLE_SOF_IRQ)) { CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID RDI:%d SOF received", i); if (csid_hw->sof_irq_triggered) csid_hw->irq_debug_cnt++; } if ((irq_status_rdi[i] & CSID_PATH_INFO_INPUT_EOF) && (csid_hw->csid_debug & CSID_DEBUG_ENABLE_EOF_IRQ)) CAM_ERR_RATE_LIMIT(CAM_ISP, CAM_INFO_RATE_LIMIT(CAM_ISP, "CSID RDI:%d EOF received", i); if (irq_status_rdi[i] & CSID_PATH_ERROR_FIFO_OVERFLOW) { Loading @@ -2833,6 +2853,11 @@ irqreturn_t cam_ife_csid_irq(int irq_num, void *data) } } if (csid_hw->irq_debug_cnt >= CAM_CSID_IRQ_SOF_DEBUG_CNT_MAX) { cam_ife_csid_sof_irq_debug(csid_hw, &sof_irq_disable); csid_hw->irq_debug_cnt = 0; } CAM_DBG(CAM_ISP, "IRQ Handling exit"); return IRQ_HANDLED; } Loading
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.h +5 −0 Original line number Diff line number Diff line Loading @@ -435,6 +435,9 @@ struct cam_ife_csid_path_cfg { * @csid_debug: csid debug information to enable the SOT, EOT, * SOF, EOF, measure etc in the csid hw * @clk_rate Clock rate * @sof_irq_triggered: Flag is set on receiving event to enable sof irq * incase of SOF freeze. * @irq_debug_cnt: Counter to track sof irq's when above flag is set. * */ struct cam_ife_csid_hw { Loading @@ -456,6 +459,8 @@ struct cam_ife_csid_hw { struct completion csid_rdin_complete[CAM_IFE_CSID_RDI_MAX]; uint64_t csid_debug; uint64_t clk_rate; bool sof_irq_triggered; uint32_t irq_debug_cnt; }; int cam_ife_csid_hw_probe_init(struct cam_hw_intf *csid_hw_intf, Loading
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_camif_ver2.c +21 −4 Original line number Diff line number Diff line Loading @@ -24,6 +24,8 @@ #include "cam_cdm_util.h" #include "cam_cpas_api.h" #define CAM_VFE_CAMIF_IRQ_SOF_DEBUG_CNT_MAX 2 struct cam_vfe_mux_camif_data { void __iomem *mem_base; struct cam_hw_intf *hw_intf; Loading @@ -40,6 +42,7 @@ struct cam_vfe_mux_camif_data { uint32_t last_pixel; uint32_t last_line; bool enable_sof_irq_debug; uint32_t irq_debug_cnt; }; static int cam_vfe_camif_validate_pix_pattern(uint32_t pattern) Loading Loading @@ -266,6 +269,10 @@ static int cam_vfe_camif_resource_start( CAM_DBG(CAM_ISP, "hw id:%d RUP val:%d", camif_res->hw_intf->hw_idx, rsrc_data->reg_data->reg_update_cmd_data); /* disable sof irq debug flag */ rsrc_data->enable_sof_irq_debug = false; rsrc_data->irq_debug_cnt = 0; CAM_DBG(CAM_ISP, "Start Camif IFE %d Done", camif_res->hw_intf->hw_idx); return 0; } Loading Loading @@ -440,11 +447,21 @@ static int cam_vfe_camif_handle_irq_bottom_half(void *handler_priv, switch (payload->evt_id) { case CAM_ISP_HW_EVENT_SOF: if (irq_status0 & camif_priv->reg_data->sof_irq_mask) { if (camif_priv->enable_sof_irq_debug) CAM_ERR_RATE_LIMIT(CAM_ISP, "Received SOF"); else if ((camif_priv->enable_sof_irq_debug) && (camif_priv->irq_debug_cnt <= CAM_VFE_CAMIF_IRQ_SOF_DEBUG_CNT_MAX)) { CAM_INFO_RATE_LIMIT(CAM_ISP, "Received SOF"); camif_priv->irq_debug_cnt++; if (camif_priv->irq_debug_cnt == CAM_VFE_CAMIF_IRQ_SOF_DEBUG_CNT_MAX) { camif_priv->enable_sof_irq_debug = false; camif_priv->irq_debug_cnt = 0; } } else { CAM_DBG(CAM_ISP, "Received SOF"); } ret = CAM_VFE_IRQ_STATUS_SUCCESS; } break; Loading
drivers/media/platform/msm/camera/cam_utils/cam_debug_util.h +15 −2 Original line number Diff line number Diff line Loading @@ -106,6 +106,19 @@ const char *cam_get_module_name(unsigned int module_id); #define CAM_INFO(__module, fmt, args...) \ pr_info("CAM_INFO: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__, __LINE__, ##args) /* * CAM_INFO_RATE_LIMIT * @brief : This Macro will print info logs with ratelimit * * @__module : Respective module id which is been calling this Macro * @fmt : Formatted string which needs to be print in log * @args : Arguments which needs to be print in log */ #define CAM_INFO_RATE_LIMIT(__module, fmt, args...) \ pr_err_ratelimited("CAM_INFO: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__, __LINE__, ##args) /* * CAM_DBG * @brief : This Macro will print debug logs when enabled using GROUP Loading @@ -119,7 +132,7 @@ const char *cam_get_module_name(unsigned int module_id); /* * CAM_ERR_RATE_LIMIT * @brief : This Macro will prevent error print logs with ratelimit * @brief : This Macro will print error print logs with ratelimit */ #define CAM_ERR_RATE_LIMIT(__module, fmt, args...) \ pr_err_ratelimited("CAM_ERR: %s: %s: %d " fmt "\n", \ Loading