Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 205af5a1 authored by Venkat Chinta's avatar Venkat Chinta Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: ife: Stop hardware in error



This change adds logic to stop IFE hardware in case of
hardware errors.

CRs-Fixed: 2590331
Change-Id: I86773cc44ce890cea47f19f0482761e686b0cd00
Signed-off-by: default avatarVenkat Chinta <vchinta@codeaurora.org>
parent 593ff340
Loading
Loading
Loading
Loading
+8 −15
Original line number Diff line number Diff line
@@ -6467,6 +6467,9 @@ static int cam_ife_mgr_process_recovery_cb(void *priv, void *data)
			}
		}

		if (!g_ife_hw_mgr.debug_cfg.enable_recovery)
			break;

		CAM_DBG(CAM_ISP, "RESET: CSID PATH");
		for (i = 0; i < recovery_data->no_of_context; i++) {
			ctx = recovery_data->affected_ctx[i];
@@ -6695,22 +6698,12 @@ static int cam_ife_hw_mgr_handle_hw_err(
	rc = cam_ife_hw_mgr_find_affected_ctx(&error_event_data,
		core_idx, &recovery_data);

	if (event_info->res_type == CAM_ISP_RESOURCE_VFE_OUT)
		return rc;

	if (g_ife_hw_mgr.debug_cfg.enable_recovery) {
		CAM_DBG(CAM_ISP, "IFE Mgr recovery is enabled");

		/* Trigger for recovery */
	if (event_info->err_type == CAM_VFE_IRQ_STATUS_VIOLATION)
		recovery_data.error_type = CAM_ISP_HW_ERROR_VIOLATION;
	else
		recovery_data.error_type = CAM_ISP_HW_ERROR_OVERFLOW;

	cam_ife_hw_mgr_do_error_recovery(&recovery_data);
	} else {
		CAM_DBG(CAM_ISP, "recovery is not enabled");
		rc = 0;
	}

	return rc;
}