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

Commit 141f2f81 authored by Peter Liu's avatar Peter Liu
Browse files

msm: camera: isp: halt bus symetrically



When HW is not in fatal state, the recovery should try
as much as symtric to avoid async between two VFEs.

Only bus overflow we need to halt the bus immediately due to
the fatal behavior.

Change-Id: I31af22b3d77fb0abbe7f651a60fc5a177d65eba9
Signed-off-by: default avatarPeter Liu <pingchie@codeaurora.org>
parent 455c5e88
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -1327,13 +1327,7 @@ static void msm_isp_process_done_buf(struct vfe_device *vfe_dev,
	} else if (rc == 0) {
		if (buf->frame_id != frame_id) {
			struct msm_isp_event_data error_event;
			struct msm_vfe_axi_halt_cmd halt_cmd;

			halt_cmd.overflow_detected = 1;
			halt_cmd.stop_camif = 1;
			halt_cmd.blocking_halt = 0;

			msm_isp_axi_halt(vfe_dev, &halt_cmd);
			error_event.frame_id =
				vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id;
			error_event.u.error_info.err_type =
@@ -1655,6 +1649,13 @@ int msm_isp_axi_halt(struct vfe_device *vfe_dev,
{
	int rc = 0;

	if (atomic_read(&vfe_dev->error_info.overflow_state) ==
		OVERFLOW_DETECTED) {
		ISP_DBG("%s: VFE%d already halted, direct return\n",
			__func__, vfe_dev->pdev->id);
		return rc;
	}

	if (halt_cmd->overflow_detected) {
		/*Store current IRQ mask*/
		if (vfe_dev->error_info.overflow_recover_irq_mask0 == 0) {