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

Commit 91c045c8 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: isp: Fix recovery in dual vfe mode"

parents a11fab4f 54530390
Loading
Loading
Loading
Loading
+71 −60
Original line number Diff line number Diff line
@@ -1861,6 +1861,8 @@ void msm_isp_process_overflow_irq(
	uint32_t force_overflow)
{
	uint32_t overflow_mask;
	unsigned long flags;
	struct msm_isp_event_data error_event;

	/* if there are no active streams - do not start recovery */
	if (!vfe_dev->axi_data.num_active_stream)
@@ -1884,25 +1886,33 @@ void msm_isp_process_overflow_irq(
	if (!force_overflow)
		overflow_mask &= *irq_status1;

	if (overflow_mask) {
		struct msm_isp_event_data error_event;
	if (!overflow_mask)
		return;

	spin_lock_irqsave(&vfe_dev->common_data->common_dev_data_lock,
		flags);
	if (atomic_cmpxchg(&vfe_dev->error_info.overflow_state,
		NO_OVERFLOW, OVERFLOW_DETECTED)) {
		spin_unlock_irqrestore(
			&vfe_dev->common_data->common_dev_data_lock,
			flags);
		return;
	}
	if (vfe_dev->reset_pending == 1) {
		pr_err("%s:%d failed: overflow %x during reset\n",
			__func__, __LINE__, overflow_mask);
		/* Clear overflow bits since reset is pending */
		*irq_status1 &= ~overflow_mask;
		spin_unlock_irqrestore(&vfe_dev->common_data->
			common_dev_data_lock, flags);
		return;
	}

	ISP_DBG("%s: VFE%d Bus overflow detected: start recovery!\n",
		__func__, vfe_dev->pdev->id);

	trace_msm_cam_isp_overflow(vfe_dev, *irq_status0, *irq_status1);

	/* maks off irq for current vfe */
		atomic_cmpxchg(&vfe_dev->error_info.overflow_state,
			NO_OVERFLOW, OVERFLOW_DETECTED);
	vfe_dev->recovery_irq0_mask = vfe_dev->irq0_mask;
	vfe_dev->recovery_irq1_mask = vfe_dev->irq1_mask;

@@ -1954,7 +1964,8 @@ void msm_isp_process_overflow_irq(
		msm_isp_send_event(vfe_dev,
			ISP_EVENT_ERROR, &error_event);
	}
	}
	spin_unlock_irqrestore(&vfe_dev->common_data->
		common_dev_data_lock, flags);
}

void msm_isp_reset_burst_count_and_frame_drop(