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

Commit 76211fd0 authored by Srikanth Uyyala's avatar Srikanth Uyyala
Browse files

msm: camera: skip recovery during stream off in dual vfe



in dual vfe usecase, skip pingpong mismatch recovery
if one of the vfe's active stream count is zero.

Change-Id: I1b4dce66ad6665e41c4185d3ac510204d40131da
Signed-off-by: default avatarSrikanth Uyyala <suyyala@codeaurora.org>
parent be516625
Loading
Loading
Loading
Loading
+25 −1
Original line number Diff line number Diff line
@@ -1642,13 +1642,37 @@ void msm_isp_halt_send_error(struct vfe_device *vfe_dev, uint32_t event)
	struct msm_isp_event_data error_event;
	struct msm_vfe_axi_halt_cmd halt_cmd;
	uint32_t irq_status0, irq_status1;
	struct vfe_device *vfe_dev_other = NULL;
	uint32_t vfe_id_other = 0;
	unsigned long flags;

	if (atomic_read(&vfe_dev->error_info.overflow_state) !=
		NO_OVERFLOW)
		/* Recovery is already in Progress */
		return;
	/* if there are no active streams - do not start recovery */
	if (!vfe_dev->axi_data.num_active_stream)
	if (vfe_dev->is_split) {
		if (vfe_dev->pdev->id == ISP_VFE0)
			vfe_id_other = ISP_VFE1;
		else
			vfe_id_other = ISP_VFE0;

		spin_lock_irqsave(
			&vfe_dev->common_data->common_dev_data_lock, flags);
		vfe_dev_other = vfe_dev->common_data->dual_vfe_res->
			vfe_dev[vfe_id_other];
		if (!vfe_dev->axi_data.num_active_stream ||
			!vfe_dev_other->axi_data.num_active_stream) {
			spin_unlock_irqrestore(
				&vfe_dev->common_data->common_dev_data_lock,
				flags);
			pr_err("%s:skip the recovery as no active streams\n",
				 __func__);
			return;
		}
		spin_unlock_irqrestore(
			&vfe_dev->common_data->common_dev_data_lock, flags);
	} else if (!vfe_dev->axi_data.num_active_stream)
		return;
	if (ISP_EVENT_PING_PONG_MISMATCH == event &&
		vfe_dev->axi_data.recovery_count < MAX_RECOVERY_THRESHOLD) {