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

Commit f007bbf9 authored by Lynus Vaz's avatar Lynus Vaz
Browse files

msm: camera: isp: Put the VFE irq payload at a single point



Put the VFE irq event payload back on the free list at the end of the
tasklet, when we are sure we are done with it. This makes sure that
we do not read a payload that is already put back on the free list.

Change-Id: I531bd778ee9d04d3d4f79ee991c470601989cc57
Signed-off-by: default avatarLynus Vaz <lvaz@codeaurora.org>
parent 6479e0e4
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -3733,10 +3733,13 @@ int cam_ife_mgr_do_tasklet(void *handler_priv, void *evt_payload_priv)
	struct cam_vfe_top_irq_evt_payload   *evt_payload;
	int rc = -EINVAL;

	if (!handler_priv)
	if (!evt_payload_priv)
		return rc;

	evt_payload = evt_payload_priv;
	if (!handler_priv)
		goto put_payload;

	ife_hwr_mgr_ctx = (struct cam_ife_hw_mgr_ctx *)handler_priv;

	CAM_DBG(CAM_ISP, "addr of evt_payload = %pK core_index:%d",
@@ -3764,7 +3767,7 @@ int cam_ife_mgr_do_tasklet(void *handler_priv, void *evt_payload_priv)
	if (rc) {
		CAM_ERR(CAM_ISP, "Encountered Error (%d), ignoring other irqs",
			 rc);
		return IRQ_HANDLED;
		goto put_payload;
	}

	CAM_DBG(CAM_ISP, "Calling EOF");
@@ -3786,6 +3789,8 @@ int cam_ife_mgr_do_tasklet(void *handler_priv, void *evt_payload_priv)
	cam_ife_hw_mgr_handle_epoch_for_camif_hw_res(ife_hwr_mgr_ctx,
		evt_payload_priv);

put_payload:
	cam_vfe_put_evt_payload(evt_payload->core_info, &evt_payload);
	return IRQ_HANDLED;
}

+0 −2
Original line number Diff line number Diff line
@@ -355,7 +355,6 @@ static int cam_vfe_camif_handle_irq_bottom_half(void *handler_priv,
			CAM_DBG(CAM_ISP, "Received EPOCH");
			ret = CAM_VFE_IRQ_STATUS_SUCCESS;
		}
		cam_vfe_put_evt_payload(payload->core_info, &payload);
		break;
	case CAM_ISP_HW_EVENT_REG_UPDATE:
		if (irq_status0 & camif_priv->reg_data->reg_update_irq_mask) {
@@ -373,7 +372,6 @@ static int cam_vfe_camif_handle_irq_bottom_half(void *handler_priv,
		if (irq_status1 & camif_priv->reg_data->error_irq_mask1) {
			CAM_DBG(CAM_ISP, "Received ERROR\n");
			ret = CAM_ISP_HW_ERROR_OVERFLOW;
			cam_vfe_put_evt_payload(payload->core_info, &payload);
		} else {
			ret = CAM_ISP_HW_ERROR_NONE;
		}
+0 −1
Original line number Diff line number Diff line
@@ -209,7 +209,6 @@ static int cam_vfe_rdi_handle_irq_bottom_half(void *handler_priv,
			CAM_DBG(CAM_ISP, "Received REG UPDATE");
			ret = CAM_VFE_IRQ_STATUS_SUCCESS;
		}
		cam_vfe_put_evt_payload(payload->core_info, &payload);
		break;
	default:
		break;