|
@@ -5535,6 +5535,60 @@ end:
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static int cam_tfe_hw_mgr_handle_hw_dump_info(
|
|
|
+ void *ctx,
|
|
|
+ void *evt_info)
|
|
|
+{
|
|
|
+ struct cam_tfe_hw_mgr_ctx *tfe_hw_mgr_ctx =
|
|
|
+ (struct cam_tfe_hw_mgr_ctx *)ctx;
|
|
|
+ struct cam_isp_hw_event_info *event_info =
|
|
|
+ (struct cam_isp_hw_event_info *)evt_info;
|
|
|
+ struct cam_isp_hw_mgr_res *hw_mgr_res = NULL;
|
|
|
+ struct cam_hw_intf *hw_intf;
|
|
|
+ uint32_t i = 0, out_port_id = 0;
|
|
|
+ uint64_t dummy_args = 0;
|
|
|
+ int rc = 0;
|
|
|
+
|
|
|
+ for (i = 0; i < tfe_hw_mgr_ctx->num_base; i++) {
|
|
|
+ hw_intf = g_tfe_hw_mgr.csid_devices[tfe_hw_mgr_ctx->base[i].idx];
|
|
|
+ if (hw_intf->hw_ops.process_cmd) {
|
|
|
+ rc = hw_intf->hw_ops.process_cmd(
|
|
|
+ hw_intf->hw_priv,
|
|
|
+ CAM_ISP_HW_CMD_CSID_CLOCK_DUMP,
|
|
|
+ &dummy_args,
|
|
|
+ sizeof(uint64_t));
|
|
|
+ if (rc)
|
|
|
+ CAM_ERR(CAM_ISP,
|
|
|
+ "CSID Clock Dump failed");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (event_info->res_type == CAM_ISP_RESOURCE_VFE_OUT) {
|
|
|
+ out_port_id = event_info->res_id & 0xFF;
|
|
|
+ if (out_port_id >= CAM_TFE_HW_OUT_RES_MAX) {
|
|
|
+ CAM_ERR(CAM_ISP,
|
|
|
+ "Resource out of range");
|
|
|
+ goto end;
|
|
|
+ }
|
|
|
+ hw_mgr_res =
|
|
|
+ &tfe_hw_mgr_ctx->res_list_tfe_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));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+end:
|
|
|
+ return rc;
|
|
|
+}
|
|
|
+
|
|
|
static int cam_tfe_hw_mgr_handle_csid_event(
|
|
|
uint32_t err_type,
|
|
|
struct cam_isp_hw_event_info *event_info)
|
|
@@ -5564,9 +5618,11 @@ static int cam_tfe_hw_mgr_handle_csid_event(
|
|
|
}
|
|
|
|
|
|
static int cam_tfe_hw_mgr_handle_hw_err(
|
|
|
+ void *ctx,
|
|
|
void *evt_info)
|
|
|
{
|
|
|
struct cam_isp_hw_error_event_info *err_evt_info;
|
|
|
+ struct cam_tfe_hw_mgr_ctx *tfe_hw_mgr_ctx;
|
|
|
struct cam_isp_hw_event_info *event_info = evt_info;
|
|
|
struct cam_isp_hw_error_event_data error_event_data = {0};
|
|
|
struct cam_tfe_hw_event_recovery_data recovery_data = {0};
|
|
@@ -5594,6 +5650,15 @@ static int cam_tfe_hw_mgr_handle_hw_err(
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
+ if (ctx) {
|
|
|
+ tfe_hw_mgr_ctx =
|
|
|
+ (struct cam_tfe_hw_mgr_ctx *)ctx;
|
|
|
+ if ((event_info->res_type == CAM_ISP_RESOURCE_TFE_IN)
|
|
|
+ && (!tfe_hw_mgr_ctx->is_rdi_only_context)
|
|
|
+ && (event_info->res_id != CAM_ISP_HW_TFE_IN_CAMIF))
|
|
|
+ cam_tfe_hw_mgr_handle_hw_dump_info(tfe_hw_mgr_ctx, event_info);
|
|
|
+ }
|
|
|
+
|
|
|
core_idx = event_info->hw_idx;
|
|
|
|
|
|
if (g_tfe_hw_mgr.debug_cfg.enable_recovery)
|
|
@@ -5889,7 +5954,7 @@ static int cam_tfe_hw_mgr_event_handler(
|
|
|
break;
|
|
|
|
|
|
case CAM_ISP_HW_EVENT_ERROR:
|
|
|
- rc = cam_tfe_hw_mgr_handle_hw_err(evt_info);
|
|
|
+ rc = cam_tfe_hw_mgr_handle_hw_err(priv, evt_info);
|
|
|
break;
|
|
|
|
|
|
default:
|