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

Commit 33300dce authored by Harsh Shah's avatar Harsh Shah
Browse files

msm: camera: isp: Stop IRQ if error IRQ is fired



Once error IRQ is fired, we will likely keep getting this
IRQ, causing IRQ storm. This will lead to CPU lockup and
watchdog bark. So in the error IRQ context, we need to
disable the IRQ mask for these error IRQs.

Change-Id: I5e54939884a12f0c5993573f6616251fa88526e8
Signed-off-by: default avatarHarsh Shah <harshs@codeaurora.org>
parent 2312efe8
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -373,12 +373,17 @@ int cam_vfe_irq_top_half(uint32_t evt_id,
	 *  need to handle overflow condition here, otherwise irq storm
	 *  will block everything.
	 */
	if (evt_payload->irq_reg_val[1]) {
	if ((evt_payload->irq_reg_val[0] & 0x3FC00) ||
		(evt_payload->irq_reg_val[1])) {
		CAM_ERR(CAM_ISP,
			"Encountered Error Irq_status1=0x%x. Stopping further IRQ processing from this HW",
			"Encountered Error Irq_status0=0x%x Status1=0x%x",
			evt_payload->irq_reg_val[0],
			evt_payload->irq_reg_val[1]);
		CAM_ERR(CAM_ISP, "Violation status = %x",
		CAM_ERR(CAM_ISP, "Violation status = 0x%x",
			evt_payload->irq_reg_val[2]);
		CAM_ERR(CAM_ISP,
			"Stopping further IRQ processing from this HW index=%d",
			handler_priv->core_index);
		cam_io_w(0, handler_priv->mem_base + 0x60);
		cam_io_w(0, handler_priv->mem_base + 0x5C);

+3 −0
Original line number Diff line number Diff line
@@ -2297,12 +2297,15 @@ static int cam_vfe_bus_error_irq_top_half(uint32_t evt_id,
	struct cam_irq_th_payload *th_payload)
{
	int i = 0;
	struct cam_vfe_bus_ver2_priv  *bus_priv = th_payload->handler_priv;

	CAM_ERR_RATE_LIMIT(CAM_ISP, "Bus Err IRQ");
	for (i = 0; i < th_payload->num_registers; i++) {
		CAM_ERR_RATE_LIMIT(CAM_ISP, "IRQ_Status%d: 0x%x", i,
			th_payload->evt_status_arr[i]);
	}
	cam_irq_controller_disable_irq(bus_priv->common_data.bus_irq_controller,
		bus_priv->error_irq_handle);

	/* Returning error stops from enqueuing bottom half */
	return -EFAULT;