Loading drivers/cam_core/cam_context_utils.c +3 −0 Original line number Diff line number Diff line Loading @@ -462,6 +462,9 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, rc = cam_sync_check_valid( req->in_map_entries[j].sync_id); if (rc) { spin_lock(&ctx->lock); list_del_init(&req->list); spin_unlock(&ctx->lock); CAM_ERR(CAM_CTXT, "invalid in map sync object %d", req->in_map_entries[j].sync_id); Loading drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c +2 −0 Original line number Diff line number Diff line Loading @@ -1741,6 +1741,7 @@ static int cam_icp_mgr_ipe_bps_power_collapse(struct cam_icp_hw_mgr *hw_mgr, bps_dev_intf->hw_ops.deinit (bps_dev_intf->hw_priv, NULL, 0); hw_mgr->bps_clk_state = false; hw_mgr->clk_info[ICP_CLK_HW_BPS].curr_clk = 0; } } else { CAM_DBG(CAM_PERF, "ipe ctx cnt %d", hw_mgr->ipe_ctxt_cnt); Loading Loading @@ -1776,6 +1777,7 @@ static int cam_icp_mgr_ipe_bps_power_collapse(struct cam_icp_hw_mgr *hw_mgr, } hw_mgr->ipe_clk_state = false; hw_mgr->clk_info[ICP_CLK_HW_IPE].curr_clk = 0; } end: Loading drivers/cam_isp/cam_isp_context.c +9 −3 Original line number Diff line number Diff line Loading @@ -1947,8 +1947,14 @@ static int __cam_isp_ctx_handle_error(struct cam_isp_context *ctx_isp, if (notify.error == CRM_KMD_ERR_FATAL) { req_msg.session_hdl = ctx_isp->base->session_hdl; req_msg.u.err_msg.device_hdl = ctx_isp->base->dev_hdl; if (error_type == CAM_ISP_HW_ERROR_CSID_FATAL) req_msg.u.err_msg.error_type = CAM_REQ_MGR_ERROR_TYPE_FULL_RECOVERY; else req_msg.u.err_msg.error_type = CAM_REQ_MGR_ERROR_TYPE_RECOVERY; req_msg.u.err_msg.link_hdl = ctx_isp->base->link_hdl; req_msg.u.err_msg.request_id = error_request_id; req_msg.u.err_msg.resource_size = 0x0; Loading Loading @@ -3369,7 +3375,7 @@ static int __cam_isp_ctx_rdi_only_sof_in_bubble_state( static int __cam_isp_ctx_rdi_only_reg_upd_in_bubble_applied_state( struct cam_isp_context *ctx_isp, void *evt_data) { struct cam_ctx_request *req; struct cam_ctx_request *req = NULL; struct cam_context *ctx = ctx_isp->base; struct cam_isp_ctx_req *req_isp; struct cam_req_mgr_trigger_notify notify; Loading drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c +55 −1 Original line number Diff line number Diff line Loading @@ -1787,6 +1787,8 @@ static int cam_ife_hw_mgr_acquire_res_ife_csid_pxl( csid_acquire.in_port = in_port; csid_acquire.out_port = in_port->data; csid_acquire.node_res = NULL; csid_acquire.event_cb = cam_ife_hw_mgr_event_handler; csid_acquire.priv = ife_ctx; csid_acquire.crop_enable = crop_enable; csid_acquire.drop_enable = false; Loading Loading @@ -1916,6 +1918,8 @@ static int cam_ife_hw_mgr_acquire_res_ife_csid_rdi( csid_acquire.in_port = in_port; csid_acquire.out_port = out_port; csid_acquire.node_res = NULL; csid_acquire.event_cb = cam_ife_hw_mgr_event_handler; csid_acquire.priv = ife_ctx; /* * Enable RDI pixel drop by default. CSID will enable only for Loading Loading @@ -5518,7 +5522,8 @@ static int cam_isp_packet_generic_blob_handler(void *user_data, bw_config = (struct cam_isp_bw_config_v2 *)blob_data; if (bw_config->num_paths > CAM_ISP_MAX_PER_PATH_VOTES) { if ((bw_config->num_paths > CAM_ISP_MAX_PER_PATH_VOTES) || !bw_config->num_paths) { CAM_ERR(CAM_ISP, "Invalid num paths %d", bw_config->num_paths); return -EINVAL; Loading Loading @@ -6793,6 +6798,12 @@ static int cam_ife_hw_mgr_find_affected_ctx( affected_core, CAM_IFE_HW_NUM_MAX)) continue; if (atomic_read(&ife_hwr_mgr_ctx->overflow_pending)) { CAM_INFO(CAM_ISP, "CTX:%d already error reported", ife_hwr_mgr_ctx->ctx_index); continue; } atomic_set(&ife_hwr_mgr_ctx->overflow_pending, 1); notify_err_cb = ife_hwr_mgr_ctx->common.event_cb[event_type]; Loading Loading @@ -6822,6 +6833,33 @@ static int cam_ife_hw_mgr_find_affected_ctx( return 0; } static int cam_ife_hw_mgr_handle_csid_event( struct cam_isp_hw_event_info *event_info) { struct cam_isp_hw_error_event_data error_event_data = {0}; struct cam_hw_event_recovery_data recovery_data = {0}; /* this can be extended based on the types of error * received from CSID */ switch (event_info->err_type) { case CAM_ISP_HW_ERROR_CSID_FATAL: { if (!g_ife_hw_mgr.debug_cfg.enable_csid_recovery) break; error_event_data.error_type = event_info->err_type; cam_ife_hw_mgr_find_affected_ctx(&error_event_data, event_info->hw_idx, &recovery_data); break; } default: break; } return 0; } static int cam_ife_hw_mgr_handle_hw_err( void *evt_info) { Loading @@ -6838,6 +6876,13 @@ static int cam_ife_hw_mgr_handle_hw_err( else if (event_info->res_type == CAM_ISP_RESOURCE_VFE_OUT) error_event_data.error_type = CAM_ISP_HW_ERROR_BUSIF_OVERFLOW; spin_lock(&g_ife_hw_mgr.ctx_lock); if (event_info->err_type == CAM_ISP_HW_ERROR_CSID_FATAL) { rc = cam_ife_hw_mgr_handle_csid_event(event_info); spin_unlock(&g_ife_hw_mgr.ctx_lock); return rc; } core_idx = event_info->hw_idx; if (g_ife_hw_mgr.debug_cfg.enable_recovery) Loading @@ -6855,6 +6900,7 @@ static int cam_ife_hw_mgr_handle_hw_err( recovery_data.error_type = CAM_ISP_HW_ERROR_OVERFLOW; cam_ife_hw_mgr_do_error_recovery(&recovery_data); spin_unlock(&g_ife_hw_mgr.ctx_lock); return rc; } Loading Loading @@ -7318,6 +7364,14 @@ static int cam_ife_hw_mgr_debug_register(void) goto err; } if (!debugfs_create_u32("enable_csid_recovery", 0644, g_ife_hw_mgr.debug_cfg.dentry, &g_ife_hw_mgr.debug_cfg.enable_csid_recovery)) { CAM_ERR(CAM_ISP, "failed to create enable_csid_recovery"); goto err; } if (!debugfs_create_bool("enable_req_dump", 0644, g_ife_hw_mgr.debug_cfg.dentry, Loading drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.h +3 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ struct ctx_base_info { * @dentry: Debugfs entry * @csid_debug: csid debug information * @enable_recovery: enable recovery * @enable_csid_recovery: enable csid recovery * @enable_diag_sensor_status: enable sensor diagnosis status * @enable_req_dump: Enable request dump on HW errors * @per_req_reg_dump: Enable per request reg dump Loading @@ -90,6 +91,7 @@ struct cam_ife_hw_mgr_debug { struct dentry *dentry; uint64_t csid_debug; uint32_t enable_recovery; uint32_t enable_csid_recovery; uint32_t camif_debug; bool enable_req_dump; bool per_req_reg_dump; Loading Loading @@ -231,6 +233,7 @@ struct cam_ife_hw_mgr { struct cam_vfe_hw_get_hw_cap ife_dev_caps[CAM_IFE_HW_NUM_MAX]; struct cam_req_mgr_core_workq *workq; struct cam_ife_hw_mgr_debug debug_cfg; spinlock_t ctx_lock; }; /** Loading Loading
drivers/cam_core/cam_context_utils.c +3 −0 Original line number Diff line number Diff line Loading @@ -462,6 +462,9 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, rc = cam_sync_check_valid( req->in_map_entries[j].sync_id); if (rc) { spin_lock(&ctx->lock); list_del_init(&req->list); spin_unlock(&ctx->lock); CAM_ERR(CAM_CTXT, "invalid in map sync object %d", req->in_map_entries[j].sync_id); Loading
drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c +2 −0 Original line number Diff line number Diff line Loading @@ -1741,6 +1741,7 @@ static int cam_icp_mgr_ipe_bps_power_collapse(struct cam_icp_hw_mgr *hw_mgr, bps_dev_intf->hw_ops.deinit (bps_dev_intf->hw_priv, NULL, 0); hw_mgr->bps_clk_state = false; hw_mgr->clk_info[ICP_CLK_HW_BPS].curr_clk = 0; } } else { CAM_DBG(CAM_PERF, "ipe ctx cnt %d", hw_mgr->ipe_ctxt_cnt); Loading Loading @@ -1776,6 +1777,7 @@ static int cam_icp_mgr_ipe_bps_power_collapse(struct cam_icp_hw_mgr *hw_mgr, } hw_mgr->ipe_clk_state = false; hw_mgr->clk_info[ICP_CLK_HW_IPE].curr_clk = 0; } end: Loading
drivers/cam_isp/cam_isp_context.c +9 −3 Original line number Diff line number Diff line Loading @@ -1947,8 +1947,14 @@ static int __cam_isp_ctx_handle_error(struct cam_isp_context *ctx_isp, if (notify.error == CRM_KMD_ERR_FATAL) { req_msg.session_hdl = ctx_isp->base->session_hdl; req_msg.u.err_msg.device_hdl = ctx_isp->base->dev_hdl; if (error_type == CAM_ISP_HW_ERROR_CSID_FATAL) req_msg.u.err_msg.error_type = CAM_REQ_MGR_ERROR_TYPE_FULL_RECOVERY; else req_msg.u.err_msg.error_type = CAM_REQ_MGR_ERROR_TYPE_RECOVERY; req_msg.u.err_msg.link_hdl = ctx_isp->base->link_hdl; req_msg.u.err_msg.request_id = error_request_id; req_msg.u.err_msg.resource_size = 0x0; Loading Loading @@ -3369,7 +3375,7 @@ static int __cam_isp_ctx_rdi_only_sof_in_bubble_state( static int __cam_isp_ctx_rdi_only_reg_upd_in_bubble_applied_state( struct cam_isp_context *ctx_isp, void *evt_data) { struct cam_ctx_request *req; struct cam_ctx_request *req = NULL; struct cam_context *ctx = ctx_isp->base; struct cam_isp_ctx_req *req_isp; struct cam_req_mgr_trigger_notify notify; Loading
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c +55 −1 Original line number Diff line number Diff line Loading @@ -1787,6 +1787,8 @@ static int cam_ife_hw_mgr_acquire_res_ife_csid_pxl( csid_acquire.in_port = in_port; csid_acquire.out_port = in_port->data; csid_acquire.node_res = NULL; csid_acquire.event_cb = cam_ife_hw_mgr_event_handler; csid_acquire.priv = ife_ctx; csid_acquire.crop_enable = crop_enable; csid_acquire.drop_enable = false; Loading Loading @@ -1916,6 +1918,8 @@ static int cam_ife_hw_mgr_acquire_res_ife_csid_rdi( csid_acquire.in_port = in_port; csid_acquire.out_port = out_port; csid_acquire.node_res = NULL; csid_acquire.event_cb = cam_ife_hw_mgr_event_handler; csid_acquire.priv = ife_ctx; /* * Enable RDI pixel drop by default. CSID will enable only for Loading Loading @@ -5518,7 +5522,8 @@ static int cam_isp_packet_generic_blob_handler(void *user_data, bw_config = (struct cam_isp_bw_config_v2 *)blob_data; if (bw_config->num_paths > CAM_ISP_MAX_PER_PATH_VOTES) { if ((bw_config->num_paths > CAM_ISP_MAX_PER_PATH_VOTES) || !bw_config->num_paths) { CAM_ERR(CAM_ISP, "Invalid num paths %d", bw_config->num_paths); return -EINVAL; Loading Loading @@ -6793,6 +6798,12 @@ static int cam_ife_hw_mgr_find_affected_ctx( affected_core, CAM_IFE_HW_NUM_MAX)) continue; if (atomic_read(&ife_hwr_mgr_ctx->overflow_pending)) { CAM_INFO(CAM_ISP, "CTX:%d already error reported", ife_hwr_mgr_ctx->ctx_index); continue; } atomic_set(&ife_hwr_mgr_ctx->overflow_pending, 1); notify_err_cb = ife_hwr_mgr_ctx->common.event_cb[event_type]; Loading Loading @@ -6822,6 +6833,33 @@ static int cam_ife_hw_mgr_find_affected_ctx( return 0; } static int cam_ife_hw_mgr_handle_csid_event( struct cam_isp_hw_event_info *event_info) { struct cam_isp_hw_error_event_data error_event_data = {0}; struct cam_hw_event_recovery_data recovery_data = {0}; /* this can be extended based on the types of error * received from CSID */ switch (event_info->err_type) { case CAM_ISP_HW_ERROR_CSID_FATAL: { if (!g_ife_hw_mgr.debug_cfg.enable_csid_recovery) break; error_event_data.error_type = event_info->err_type; cam_ife_hw_mgr_find_affected_ctx(&error_event_data, event_info->hw_idx, &recovery_data); break; } default: break; } return 0; } static int cam_ife_hw_mgr_handle_hw_err( void *evt_info) { Loading @@ -6838,6 +6876,13 @@ static int cam_ife_hw_mgr_handle_hw_err( else if (event_info->res_type == CAM_ISP_RESOURCE_VFE_OUT) error_event_data.error_type = CAM_ISP_HW_ERROR_BUSIF_OVERFLOW; spin_lock(&g_ife_hw_mgr.ctx_lock); if (event_info->err_type == CAM_ISP_HW_ERROR_CSID_FATAL) { rc = cam_ife_hw_mgr_handle_csid_event(event_info); spin_unlock(&g_ife_hw_mgr.ctx_lock); return rc; } core_idx = event_info->hw_idx; if (g_ife_hw_mgr.debug_cfg.enable_recovery) Loading @@ -6855,6 +6900,7 @@ static int cam_ife_hw_mgr_handle_hw_err( recovery_data.error_type = CAM_ISP_HW_ERROR_OVERFLOW; cam_ife_hw_mgr_do_error_recovery(&recovery_data); spin_unlock(&g_ife_hw_mgr.ctx_lock); return rc; } Loading Loading @@ -7318,6 +7364,14 @@ static int cam_ife_hw_mgr_debug_register(void) goto err; } if (!debugfs_create_u32("enable_csid_recovery", 0644, g_ife_hw_mgr.debug_cfg.dentry, &g_ife_hw_mgr.debug_cfg.enable_csid_recovery)) { CAM_ERR(CAM_ISP, "failed to create enable_csid_recovery"); goto err; } if (!debugfs_create_bool("enable_req_dump", 0644, g_ife_hw_mgr.debug_cfg.dentry, Loading
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.h +3 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ struct ctx_base_info { * @dentry: Debugfs entry * @csid_debug: csid debug information * @enable_recovery: enable recovery * @enable_csid_recovery: enable csid recovery * @enable_diag_sensor_status: enable sensor diagnosis status * @enable_req_dump: Enable request dump on HW errors * @per_req_reg_dump: Enable per request reg dump Loading @@ -90,6 +91,7 @@ struct cam_ife_hw_mgr_debug { struct dentry *dentry; uint64_t csid_debug; uint32_t enable_recovery; uint32_t enable_csid_recovery; uint32_t camif_debug; bool enable_req_dump; bool per_req_reg_dump; Loading Loading @@ -231,6 +233,7 @@ struct cam_ife_hw_mgr { struct cam_vfe_hw_get_hw_cap ife_dev_caps[CAM_IFE_HW_NUM_MAX]; struct cam_req_mgr_core_workq *workq; struct cam_ife_hw_mgr_debug debug_cfg; spinlock_t ctx_lock; }; /** Loading