Loading drivers/media/platform/msm/camera/cam_core/cam_hw_intf.h +5 −1 Original line number Diff line number Diff line /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -80,4 +80,8 @@ struct cam_hw_intf { void *hw_priv; }; /* hardware event callback function type */ typedef int (*cam_hw_mgr_event_cb_func)(void *priv, uint32_t evt_id, void *evt_data); #endif /* _CAM_HW_INTF_H_ */ drivers/media/platform/msm/camera/cam_isp/cam_isp_context.c +14 −4 Original line number Diff line number Diff line Loading @@ -1378,11 +1378,16 @@ static int __cam_isp_ctx_handle_error(struct cam_isp_context *ctx_isp, (struct cam_isp_hw_error_event_data *)evt_data; uint32_t error_type = error_event_data->error_type; bool is_csid_fatal = false; CAM_DBG(CAM_ISP, "Enter error_type = %d", error_type); if ((error_type == CAM_ISP_HW_ERROR_OVERFLOW) || (error_type == CAM_ISP_HW_ERROR_BUSIF_OVERFLOW)) (error_type == CAM_ISP_HW_ERROR_BUSIF_OVERFLOW)) { notify.error = CRM_KMD_ERR_OVERFLOW; } else if (error_type == CAM_ISP_HW_ERROR_CSID_FATAL) { notify.error = CRM_KMD_ERR_FATAL; is_csid_fatal = true; } /* * The error is likely caused by first request on the active list. Loading Loading @@ -1552,9 +1557,14 @@ static int __cam_isp_ctx_handle_error(struct cam_isp_context *ctx_isp, * and to dump relevant info */ if (notify.error == CRM_KMD_ERR_OVERFLOW) { if ((notify.error == CRM_KMD_ERR_OVERFLOW) || (is_csid_fatal == true)) { req_msg.session_hdl = ctx_isp->base->session_hdl; req_msg.u.err_msg.device_hdl = ctx_isp->base->dev_hdl; if (is_csid_fatal == true) 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; Loading drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c +50 −2 Original line number Diff line number Diff line Loading @@ -45,6 +45,11 @@ #define CAM_ISP_GENERIC_BLOB_TYPE_MAX \ (CAM_ISP_GENERIC_BLOB_TYPE_BW_CONFIG_V2 + 1) static int cam_ife_hw_mgr_handle_csid_event( void *priv, uint32_t evt_id, void *evt_data); static uint32_t blob_type_hw_cmd_map[CAM_ISP_GENERIC_BLOB_TYPE_MAX] = { CAM_ISP_HW_CMD_GET_HFR_UPDATE, CAM_ISP_HW_CMD_CLOCK_UPDATE, Loading Loading @@ -1608,7 +1613,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_handle_csid_event; csid_acquire.ctx = ife_ctx; hw_intf = cid_res->hw_res[i]->hw_intf; if (csid_res->is_dual_vfe) { Loading Loading @@ -1737,7 +1743,8 @@ static int cam_ife_hw_mgr_acquire_res_ife_csid_rdi( csid_acquire.out_port = out_port; csid_acquire.sync_mode = CAM_ISP_HW_SYNC_NONE; csid_acquire.node_res = NULL; csid_acquire.event_cb = cam_ife_hw_mgr_handle_csid_event; csid_acquire.ctx = ife_ctx; hw_intf = cid_res->hw_res[0]->hw_intf; rc = hw_intf->hw_ops.reserve(hw_intf->hw_priv, &csid_acquire, sizeof(csid_acquire)); Loading Loading @@ -6054,6 +6061,47 @@ static int cam_ife_hw_mgr_sort_dev_with_caps( return 0; } static int cam_ife_hw_mgr_handle_csid_event( void *priv, uint32_t evt_id, void *evt_data) { struct cam_csid_hw_evt_payload *payload; struct cam_ife_hw_mgr_ctx *ife_hwr_mgr_ctx = priv; struct cam_isp_hw_error_event_data error_event_data = {0}; struct cam_hw_event_recovery_data recovery_data = {0}; payload = (struct cam_csid_hw_evt_payload *)evt_data; CAM_DBG(CAM_ISP, "CSID[%d] type %d event %d", payload->hw_idx, payload->evt_type, evt_id); switch (evt_id) { case CAM_ISP_HW_EVENT_ERROR: goto handle_error; default: break; } return 0; handle_error: switch (payload->evt_type) { case CAM_ISP_HW_ERROR_CSID_FATAL: { error_event_data.error_type = payload->evt_type; cam_ife_hw_mgr_find_affected_ctx(ife_hwr_mgr_ctx, &error_event_data, payload->hw_idx, &recovery_data); break; } case CAM_ISP_HW_ERROR_CSID_NON_FATAL: break; default: break; } return 0; } static int cam_ife_set_csid_debug(void *data, u64 val) { g_ife_hw_mgr.debug_cfg.csid_debug = val; Loading drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/include/cam_isp_hw_mgr_intf.h +2 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,8 @@ enum cam_isp_hw_err_type { CAM_ISP_HW_ERROR_P2I_ERROR, CAM_ISP_HW_ERROR_VIOLATION, CAM_ISP_HW_ERROR_BUSIF_OVERFLOW, CAM_ISP_HW_ERROR_CSID_FATAL, CAM_ISP_HW_ERROR_CSID_NON_FATAL, CAM_ISP_HW_ERROR_MAX, }; Loading drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c +258 −76 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
drivers/media/platform/msm/camera/cam_core/cam_hw_intf.h +5 −1 Original line number Diff line number Diff line /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -80,4 +80,8 @@ struct cam_hw_intf { void *hw_priv; }; /* hardware event callback function type */ typedef int (*cam_hw_mgr_event_cb_func)(void *priv, uint32_t evt_id, void *evt_data); #endif /* _CAM_HW_INTF_H_ */
drivers/media/platform/msm/camera/cam_isp/cam_isp_context.c +14 −4 Original line number Diff line number Diff line Loading @@ -1378,11 +1378,16 @@ static int __cam_isp_ctx_handle_error(struct cam_isp_context *ctx_isp, (struct cam_isp_hw_error_event_data *)evt_data; uint32_t error_type = error_event_data->error_type; bool is_csid_fatal = false; CAM_DBG(CAM_ISP, "Enter error_type = %d", error_type); if ((error_type == CAM_ISP_HW_ERROR_OVERFLOW) || (error_type == CAM_ISP_HW_ERROR_BUSIF_OVERFLOW)) (error_type == CAM_ISP_HW_ERROR_BUSIF_OVERFLOW)) { notify.error = CRM_KMD_ERR_OVERFLOW; } else if (error_type == CAM_ISP_HW_ERROR_CSID_FATAL) { notify.error = CRM_KMD_ERR_FATAL; is_csid_fatal = true; } /* * The error is likely caused by first request on the active list. Loading Loading @@ -1552,9 +1557,14 @@ static int __cam_isp_ctx_handle_error(struct cam_isp_context *ctx_isp, * and to dump relevant info */ if (notify.error == CRM_KMD_ERR_OVERFLOW) { if ((notify.error == CRM_KMD_ERR_OVERFLOW) || (is_csid_fatal == true)) { req_msg.session_hdl = ctx_isp->base->session_hdl; req_msg.u.err_msg.device_hdl = ctx_isp->base->dev_hdl; if (is_csid_fatal == true) 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; Loading
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c +50 −2 Original line number Diff line number Diff line Loading @@ -45,6 +45,11 @@ #define CAM_ISP_GENERIC_BLOB_TYPE_MAX \ (CAM_ISP_GENERIC_BLOB_TYPE_BW_CONFIG_V2 + 1) static int cam_ife_hw_mgr_handle_csid_event( void *priv, uint32_t evt_id, void *evt_data); static uint32_t blob_type_hw_cmd_map[CAM_ISP_GENERIC_BLOB_TYPE_MAX] = { CAM_ISP_HW_CMD_GET_HFR_UPDATE, CAM_ISP_HW_CMD_CLOCK_UPDATE, Loading Loading @@ -1608,7 +1613,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_handle_csid_event; csid_acquire.ctx = ife_ctx; hw_intf = cid_res->hw_res[i]->hw_intf; if (csid_res->is_dual_vfe) { Loading Loading @@ -1737,7 +1743,8 @@ static int cam_ife_hw_mgr_acquire_res_ife_csid_rdi( csid_acquire.out_port = out_port; csid_acquire.sync_mode = CAM_ISP_HW_SYNC_NONE; csid_acquire.node_res = NULL; csid_acquire.event_cb = cam_ife_hw_mgr_handle_csid_event; csid_acquire.ctx = ife_ctx; hw_intf = cid_res->hw_res[0]->hw_intf; rc = hw_intf->hw_ops.reserve(hw_intf->hw_priv, &csid_acquire, sizeof(csid_acquire)); Loading Loading @@ -6054,6 +6061,47 @@ static int cam_ife_hw_mgr_sort_dev_with_caps( return 0; } static int cam_ife_hw_mgr_handle_csid_event( void *priv, uint32_t evt_id, void *evt_data) { struct cam_csid_hw_evt_payload *payload; struct cam_ife_hw_mgr_ctx *ife_hwr_mgr_ctx = priv; struct cam_isp_hw_error_event_data error_event_data = {0}; struct cam_hw_event_recovery_data recovery_data = {0}; payload = (struct cam_csid_hw_evt_payload *)evt_data; CAM_DBG(CAM_ISP, "CSID[%d] type %d event %d", payload->hw_idx, payload->evt_type, evt_id); switch (evt_id) { case CAM_ISP_HW_EVENT_ERROR: goto handle_error; default: break; } return 0; handle_error: switch (payload->evt_type) { case CAM_ISP_HW_ERROR_CSID_FATAL: { error_event_data.error_type = payload->evt_type; cam_ife_hw_mgr_find_affected_ctx(ife_hwr_mgr_ctx, &error_event_data, payload->hw_idx, &recovery_data); break; } case CAM_ISP_HW_ERROR_CSID_NON_FATAL: break; default: break; } return 0; } static int cam_ife_set_csid_debug(void *data, u64 val) { g_ife_hw_mgr.debug_cfg.csid_debug = val; Loading
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/include/cam_isp_hw_mgr_intf.h +2 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,8 @@ enum cam_isp_hw_err_type { CAM_ISP_HW_ERROR_P2I_ERROR, CAM_ISP_HW_ERROR_VIOLATION, CAM_ISP_HW_ERROR_BUSIF_OVERFLOW, CAM_ISP_HW_ERROR_CSID_FATAL, CAM_ISP_HW_ERROR_CSID_NON_FATAL, CAM_ISP_HW_ERROR_MAX, }; Loading
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c +258 −76 File changed.Preview size limit exceeded, changes collapsed. Show changes