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

Commit 0f9ba5f0 authored by Depeng Shao's avatar Depeng Shao Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: isp: Fix some stability issues



This change updates the order of error notification, in case
the UMD already receive the error notification and power down
the isp, then the following register dump may meet problem.
This change also add lock protection for csid cmd processing,
in case the csid has released before processing the cmd.

CRs-Fixed: 2783264
Change-Id: I7399d819d1cdadb96b6824cdb4b53aa0167e527b
Signed-off-by: default avatarDepeng Shao <depengs@codeaurora.org>
parent a2fdf71a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4208,6 +4208,8 @@ static int cam_ife_csid_process_cmd(void *hw_priv,
	csid_hw_info = (struct cam_hw_info  *)hw_priv;
	csid_hw = (struct cam_ife_csid_hw   *)csid_hw_info->core_info;

	mutex_lock(&csid_hw->hw_info->hw_mutex);

	switch (cmd_type) {
	case CAM_IFE_CSID_CMD_GET_TIME_STAMP:
		rc = cam_ife_csid_get_time_stamp(csid_hw, cmd_args);
@@ -4251,6 +4253,8 @@ static int cam_ife_csid_process_cmd(void *hw_priv,
		break;
	}

	mutex_unlock(&csid_hw->hw_info->hw_mutex);

	return rc;

}
+8 −8
Original line number Diff line number Diff line
@@ -1482,10 +1482,6 @@ static int cam_vfe_camif_ver3_handle_irq_bottom_half(void *handler_priv,
			"current monotonic time stamp seconds %lld:%lld",
			ts.tv_sec, ts.tv_nsec/1000);

		if (camif_priv->event_cb)
			camif_priv->event_cb(camif_priv->priv,
				CAM_ISP_HW_EVENT_ERROR, (void *)&evt_info);

		ret = CAM_VFE_IRQ_STATUS_OVERFLOW;

		CAM_INFO(CAM_ISP, "ife_clk_src:%lld",
@@ -1495,6 +1491,10 @@ static int cam_vfe_camif_ver3_handle_irq_bottom_half(void *handler_priv,

		if (camif_priv->camif_debug & CAMIF_DEBUG_ENABLE_REG_DUMP)
			cam_vfe_camif_ver3_reg_dump(camif_node);

		if (camif_priv->event_cb)
			camif_priv->event_cb(camif_priv->priv,
				CAM_ISP_HW_EVENT_ERROR, (void *)&evt_info);
	}

	if (irq_status[CAM_IFE_IRQ_CAMIF_REG_STATUS0]
@@ -1514,10 +1514,6 @@ static int cam_vfe_camif_ver3_handle_irq_bottom_half(void *handler_priv,
			"current monotonic time stamp seconds %lld:%lld",
			ts.tv_sec, ts.tv_nsec/1000);

		if (camif_priv->event_cb)
			camif_priv->event_cb(camif_priv->priv,
				CAM_ISP_HW_EVENT_ERROR, (void *)&evt_info);

		ret = CAM_VFE_IRQ_STATUS_VIOLATION;

		CAM_INFO(CAM_ISP, "ife_clk_src:%lld",
@@ -1527,6 +1523,10 @@ static int cam_vfe_camif_ver3_handle_irq_bottom_half(void *handler_priv,

		if (camif_priv->camif_debug & CAMIF_DEBUG_ENABLE_REG_DUMP)
			cam_vfe_camif_ver3_reg_dump(camif_node);

		if (camif_priv->event_cb)
			camif_priv->event_cb(camif_priv->priv,
				CAM_ISP_HW_EVENT_ERROR, (void *)&evt_info);
	}

	if (camif_priv->camif_debug & CAMIF_DEBUG_ENABLE_SENSOR_DIAG_STATUS) {