Loading drivers/media/platform/msm/camera/cam_isp/cam_isp_context.c +24 −0 Original line number Diff line number Diff line Loading @@ -1025,6 +1025,7 @@ static int __cam_isp_ctx_handle_error(struct cam_isp_context *ctx_isp, struct cam_req_mgr_error_notify notify; uint64_t error_request_id; struct cam_hw_fence_map_entry *fence_map_out = NULL; struct cam_req_mgr_message req_msg; struct cam_context *ctx = ctx_isp->base; struct cam_isp_hw_error_event_data *error_event_data = Loading Loading @@ -1193,6 +1194,29 @@ static int __cam_isp_ctx_handle_error(struct cam_isp_context *ctx_isp, error_request_id, ctx_isp->frame_id); ctx->ctx_crm_intf->notify_err(¬ify); /* * Need to send error occurred in KMD * This will help UMD to take necessary action * and to dump relevant info */ if (notify.error == CRM_KMD_ERR_OVERFLOW) { req_msg.session_hdl = ctx_isp->base->session_hdl; req_msg.u.err_msg.device_hdl = ctx_isp->base->dev_hdl; 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; if (cam_req_mgr_notify_message(&req_msg, V4L_EVENT_CAM_REQ_MGR_ERROR, V4L_EVENT_CAM_REQ_MGR_EVENT)) CAM_ERR(CAM_ISP, "Error in notifying the error time for req id:%lld", ctx_isp->last_applied_req_id); } ctx_isp->substate_activated = CAM_ISP_CTX_ACTIVATED_HW_ERROR; } else { CAM_ERR_RATE_LIMIT(CAM_ISP, "Can not notify ERRROR to CRM"); Loading drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c +6 −5 Original line number Diff line number Diff line Loading @@ -4323,17 +4323,17 @@ static int cam_ife_hw_mgr_handle_camif_error( error_status = cam_ife_hw_mgr_get_err_type(ife_hwr_mgr_ctx, evt_payload); if (atomic_read(&ife_hwr_mgr_ctx->overflow_pending)) return error_status; if (atomic_read(&ife_hwr_mgr_ctx->overflow_pending)) { rc = error_status; goto end; } switch (error_status) { case CAM_ISP_HW_ERROR_OVERFLOW: case CAM_ISP_HW_ERROR_P2I_ERROR: case CAM_ISP_HW_ERROR_VIOLATION: CAM_ERR(CAM_ISP, "Enter: error_type (%d)", error_status); rc = -EFAULT; rc = error_status; if (g_ife_hw_mgr.debug_cfg.enable_recovery) error_event_data.recovery_enabled = true; Loading @@ -4360,6 +4360,7 @@ static int cam_ife_hw_mgr_handle_camif_error( break; } end: return rc; } Loading include/uapi/media/cam_req_mgr.h +2 −0 Original line number Diff line number Diff line Loading @@ -383,10 +383,12 @@ struct cam_mem_cache_ops_cmd { * @CAM_REQ_MGR_ERROR_TYPE_DEVICE: Device error message, fatal to session * @CAM_REQ_MGR_ERROR_TYPE_REQUEST: Error on a single request, not fatal * @CAM_REQ_MGR_ERROR_TYPE_BUFFER: Buffer was not filled, not fatal * @CAM_REQ_MGR_ERROR_TYPE_RECOVERY: Fatal error, can be recovered */ #define CAM_REQ_MGR_ERROR_TYPE_DEVICE 0 #define CAM_REQ_MGR_ERROR_TYPE_REQUEST 1 #define CAM_REQ_MGR_ERROR_TYPE_BUFFER 2 #define CAM_REQ_MGR_ERROR_TYPE_RECOVERY 3 /** * struct cam_req_mgr_error_msg Loading Loading
drivers/media/platform/msm/camera/cam_isp/cam_isp_context.c +24 −0 Original line number Diff line number Diff line Loading @@ -1025,6 +1025,7 @@ static int __cam_isp_ctx_handle_error(struct cam_isp_context *ctx_isp, struct cam_req_mgr_error_notify notify; uint64_t error_request_id; struct cam_hw_fence_map_entry *fence_map_out = NULL; struct cam_req_mgr_message req_msg; struct cam_context *ctx = ctx_isp->base; struct cam_isp_hw_error_event_data *error_event_data = Loading Loading @@ -1193,6 +1194,29 @@ static int __cam_isp_ctx_handle_error(struct cam_isp_context *ctx_isp, error_request_id, ctx_isp->frame_id); ctx->ctx_crm_intf->notify_err(¬ify); /* * Need to send error occurred in KMD * This will help UMD to take necessary action * and to dump relevant info */ if (notify.error == CRM_KMD_ERR_OVERFLOW) { req_msg.session_hdl = ctx_isp->base->session_hdl; req_msg.u.err_msg.device_hdl = ctx_isp->base->dev_hdl; 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; if (cam_req_mgr_notify_message(&req_msg, V4L_EVENT_CAM_REQ_MGR_ERROR, V4L_EVENT_CAM_REQ_MGR_EVENT)) CAM_ERR(CAM_ISP, "Error in notifying the error time for req id:%lld", ctx_isp->last_applied_req_id); } ctx_isp->substate_activated = CAM_ISP_CTX_ACTIVATED_HW_ERROR; } else { CAM_ERR_RATE_LIMIT(CAM_ISP, "Can not notify ERRROR to CRM"); Loading
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c +6 −5 Original line number Diff line number Diff line Loading @@ -4323,17 +4323,17 @@ static int cam_ife_hw_mgr_handle_camif_error( error_status = cam_ife_hw_mgr_get_err_type(ife_hwr_mgr_ctx, evt_payload); if (atomic_read(&ife_hwr_mgr_ctx->overflow_pending)) return error_status; if (atomic_read(&ife_hwr_mgr_ctx->overflow_pending)) { rc = error_status; goto end; } switch (error_status) { case CAM_ISP_HW_ERROR_OVERFLOW: case CAM_ISP_HW_ERROR_P2I_ERROR: case CAM_ISP_HW_ERROR_VIOLATION: CAM_ERR(CAM_ISP, "Enter: error_type (%d)", error_status); rc = -EFAULT; rc = error_status; if (g_ife_hw_mgr.debug_cfg.enable_recovery) error_event_data.recovery_enabled = true; Loading @@ -4360,6 +4360,7 @@ static int cam_ife_hw_mgr_handle_camif_error( break; } end: return rc; } Loading
include/uapi/media/cam_req_mgr.h +2 −0 Original line number Diff line number Diff line Loading @@ -383,10 +383,12 @@ struct cam_mem_cache_ops_cmd { * @CAM_REQ_MGR_ERROR_TYPE_DEVICE: Device error message, fatal to session * @CAM_REQ_MGR_ERROR_TYPE_REQUEST: Error on a single request, not fatal * @CAM_REQ_MGR_ERROR_TYPE_BUFFER: Buffer was not filled, not fatal * @CAM_REQ_MGR_ERROR_TYPE_RECOVERY: Fatal error, can be recovered */ #define CAM_REQ_MGR_ERROR_TYPE_DEVICE 0 #define CAM_REQ_MGR_ERROR_TYPE_REQUEST 1 #define CAM_REQ_MGR_ERROR_TYPE_BUFFER 2 #define CAM_REQ_MGR_ERROR_TYPE_RECOVERY 3 /** * struct cam_req_mgr_error_msg Loading