|
@@ -13904,26 +13904,46 @@ static int cam_ife_hw_mgr_handle_sfe_hw_dump_info(
|
|
struct cam_isp_hw_event_info *event_info =
|
|
struct cam_isp_hw_event_info *event_info =
|
|
(struct cam_isp_hw_event_info *)evt_info;
|
|
(struct cam_isp_hw_event_info *)evt_info;
|
|
struct cam_isp_hw_mgr_res *hw_mgr_res = NULL;
|
|
struct cam_isp_hw_mgr_res *hw_mgr_res = NULL;
|
|
|
|
+ struct cam_isp_resource_node *rsrc_node = NULL;
|
|
struct cam_hw_intf *hw_intf;
|
|
struct cam_hw_intf *hw_intf;
|
|
uint32_t i, out_port_id;
|
|
uint32_t i, out_port_id;
|
|
int rc = 0;
|
|
int rc = 0;
|
|
|
|
|
|
- out_port_id = event_info->res_id & 0xFF;
|
|
|
|
- hw_mgr_res =
|
|
|
|
- &ife_hw_mgr_ctx->res_list_sfe_out[out_port_id];
|
|
|
|
- for (i = 0; i < CAM_ISP_HW_SPLIT_MAX; i++) {
|
|
|
|
- if (!hw_mgr_res->hw_res[i])
|
|
|
|
- continue;
|
|
|
|
- hw_intf = hw_mgr_res->hw_res[i]->hw_intf;
|
|
|
|
- if (hw_intf->hw_ops.process_cmd) {
|
|
|
|
- rc = hw_intf->hw_ops.process_cmd(
|
|
|
|
- hw_intf->hw_priv,
|
|
|
|
- CAM_ISP_HW_CMD_DUMP_BUS_INFO,
|
|
|
|
- (void *)event_info,
|
|
|
|
- sizeof(struct cam_isp_hw_event_info));
|
|
|
|
|
|
+ /* SFE in rd resources */
|
|
|
|
+ list_for_each_entry(hw_mgr_res,
|
|
|
|
+ &ife_hw_mgr_ctx->res_list_ife_in_rd, list) {
|
|
|
|
+ for (i = 0; i < CAM_ISP_HW_SPLIT_MAX; i++) {
|
|
|
|
+ if (!hw_mgr_res->hw_res[i])
|
|
|
|
+ continue;
|
|
|
|
+ rsrc_node = hw_mgr_res->hw_res[i];
|
|
|
|
+ if ((event_info->res_type == CAM_ISP_RESOURCE_SFE_RD) &&
|
|
|
|
+ (rsrc_node->res_type == CAM_ISP_RESOURCE_SFE_RD) &&
|
|
|
|
+ (event_info->res_id == rsrc_node->res_id)) {
|
|
|
|
+ hw_intf = rsrc_node->hw_intf;
|
|
|
|
+ if (hw_intf && hw_intf->hw_ops.process_cmd)
|
|
|
|
+ rc = hw_intf->hw_ops.process_cmd(hw_intf->hw_priv,
|
|
|
|
+ CAM_ISP_HW_CMD_DUMP_BUS_INFO, (void *)event_info,
|
|
|
|
+ sizeof(struct cam_isp_hw_event_info));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* SFE out resources */
|
|
|
|
+ if (event_info->res_type == CAM_ISP_RESOURCE_SFE_OUT) {
|
|
|
|
+ out_port_id = event_info->res_id & 0xFF;
|
|
|
|
+ hw_mgr_res =
|
|
|
|
+ &ife_hw_mgr_ctx->res_list_sfe_out[out_port_id];
|
|
|
|
+ for (i = 0; i < CAM_ISP_HW_SPLIT_MAX; i++) {
|
|
|
|
+ if (!hw_mgr_res->hw_res[i])
|
|
|
|
+ continue;
|
|
|
|
+ hw_intf = hw_mgr_res->hw_res[i]->hw_intf;
|
|
|
|
+ if (hw_intf->hw_ops.process_cmd) {
|
|
|
|
+ rc = hw_intf->hw_ops.process_cmd(hw_intf->hw_priv,
|
|
|
|
+ CAM_ISP_HW_CMD_DUMP_BUS_INFO, (void *)event_info,
|
|
|
|
+ sizeof(struct cam_isp_hw_event_info));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return rc;
|
|
return rc;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -14014,7 +14034,6 @@ static int cam_ife_hw_mgr_handle_sfe_hw_err(
|
|
struct cam_isp_hw_error_event_info *err_evt_info;
|
|
struct cam_isp_hw_error_event_info *err_evt_info;
|
|
struct cam_isp_hw_error_event_data error_event_data = {0};
|
|
struct cam_isp_hw_error_event_data error_event_data = {0};
|
|
struct cam_ife_hw_event_recovery_data recovery_data = {0};
|
|
struct cam_ife_hw_event_recovery_data recovery_data = {0};
|
|
- uint32_t i;
|
|
|
|
|
|
|
|
if (!event_info->event_data) {
|
|
if (!event_info->event_data) {
|
|
CAM_ERR(CAM_ISP,
|
|
CAM_ERR(CAM_ISP,
|
|
@@ -14030,19 +14049,8 @@ static int cam_ife_hw_mgr_handle_sfe_hw_err(
|
|
event_info->res_type, ctx->ctx_index);
|
|
event_info->res_type, ctx->ctx_index);
|
|
|
|
|
|
spin_lock(&g_ife_hw_mgr.ctx_lock);
|
|
spin_lock(&g_ife_hw_mgr.ctx_lock);
|
|
- /* Dump SFE BUS info */
|
|
|
|
- if (event_info->res_type == CAM_ISP_RESOURCE_SFE_RD) {
|
|
|
|
- for (i = CAM_ISP_SFE_IN_RD_0; i < CAM_ISP_SFE_IN_RES_MAX; i++) {
|
|
|
|
- event_info->res_id = i;
|
|
|
|
- cam_ife_hw_mgr_handle_sfe_hw_dump_info(ctx, event_info);
|
|
|
|
- }
|
|
|
|
- } else if (event_info->res_type == CAM_ISP_RESOURCE_SFE_OUT) {
|
|
|
|
- for (i = CAM_ISP_SFE_OUT_RES_RDI_0;
|
|
|
|
- i <= CAM_ISP_SFE_OUT_HDR_STATS; i++) {
|
|
|
|
- event_info->res_id = i;
|
|
|
|
- cam_ife_hw_mgr_handle_sfe_hw_dump_info(ctx, event_info);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ cam_ife_hw_mgr_handle_sfe_hw_dump_info(ctx, event_info);
|
|
|
|
|
|
/* Only report error to userspace */
|
|
/* Only report error to userspace */
|
|
if (err_evt_info->err_type & CAM_SFE_IRQ_STATUS_VIOLATION) {
|
|
if (err_evt_info->err_type & CAM_SFE_IRQ_STATUS_VIOLATION) {
|