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

Commit b344eb5f authored by Harsh Shah's avatar Harsh Shah Committed by Matt Wagantall
Browse files

msm: camera: isp: Update the halt api to block selectively.



Update the msm_isp_axi_halt() api to take another control so that
halt can be blocked selectively.
We do not want to block when called from tasklet context.

Change-Id: I653775a1fcd7e3e655689d00bc4d306d6947f6cf
Signed-off-by: default avatarHarsh Shah <harshs@codeaurora.org>
parent 2cba61e6
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -1611,7 +1611,8 @@ int msm_isp_axi_halt(struct vfe_device *vfe_dev,
			OVERFLOW_DETECTED);
	}

	rc = vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 1);
	rc = vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev,
		halt_cmd->blocking_halt);

	if (halt_cmd->stop_camif) {
		vfe_dev->hw_info->vfe_ops.core_ops.
@@ -1842,7 +1843,7 @@ static int msm_isp_stop_axi_stream(struct vfe_device *vfe_dev,
	struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data;
	int ext_read =
		(axi_data->src_info[VFE_PIX_0].input_mux == EXTERNAL_READ);
	uint32_t src_mask = 0;
	uint32_t src_mask = 0, intf;

	if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM ||
		stream_cfg_cmd->num_streams == 0)
@@ -1885,13 +1886,17 @@ static int msm_isp_stop_axi_stream(struct vfe_device *vfe_dev,
				(!ext_read))
				wait_for_complete_for_this_stream = 1;
		}
		if (!wait_for_complete_for_this_stream) {

		intf = SRC_TO_INTF(stream_info->stream_src);
		if (!wait_for_complete_for_this_stream ||
			stream_info->state == INACTIVE ||
			!vfe_dev->axi_data.src_info[intf].active) {
			msm_isp_axi_stream_enable_cfg(vfe_dev, stream_info);
			stream_info->state = INACTIVE;
			vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev,
				SRC_TO_INTF(stream_info->stream_src));
		} else
			src_mask |= (1 << SRC_TO_INTF(stream_info->stream_src));
			src_mask |= (1 << intf);

	}

+9 −9
Original line number Diff line number Diff line
@@ -1582,28 +1582,28 @@ void ms_isp_process_iommu_page_fault(struct vfe_device *vfe_dev)
{
	struct msm_isp_event_data error_event;
	struct msm_vfe_axi_halt_cmd halt_cmd;
	uint32_t i;

	memset(&halt_cmd, 0, sizeof(struct msm_vfe_axi_halt_cmd));
	halt_cmd.stop_camif = 1;
	halt_cmd.overflow_detected = 0;
	halt_cmd.blocking_halt = 0;

	msm_isp_axi_halt(vfe_dev, &halt_cmd);

	for (i = 0; i < MAX_NUM_STREAM; i++)
		vfe_dev->axi_data.stream_info[i].state = INACTIVE;

	pr_err("%s:%d] vfe_dev %p id %d\n", __func__,
		__LINE__, vfe_dev, vfe_dev->pdev->id);
	msm_isp_axi_disable_all_wm(vfe_dev);
	msm_isp_stats_disable(vfe_dev);
	/* VFE_SRC_MAX will call reg update on all stream src */
	vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev,
		VFE_SRC_MAX);

	error_event.frame_id =
		vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id;
	vfe_dev->buf_mgr->ops->buf_mgr_debug(vfe_dev->buf_mgr);
	msm_isp_print_ping_pong_address(vfe_dev);
	vfe_dev->hw_info->vfe_ops.axi_ops.read_wm_ping_pong_addr(vfe_dev);

	msm_isp_axi_halt(vfe_dev, &halt_cmd);

	msm_isp_send_event(vfe_dev,
					ISP_EVENT_IOMMU_P_FAULT, &error_event);
	msm_isp_send_event(vfe_dev, ISP_EVENT_IOMMU_P_FAULT, &error_event);
}

void msm_isp_process_error_info(struct vfe_device *vfe_dev)
+1 −0
Original line number Diff line number Diff line
@@ -332,6 +332,7 @@ struct msm_vfe_axi_stream_cfg_update_info {
struct msm_vfe_axi_halt_cmd {
	uint32_t stop_camif;
	uint32_t overflow_detected;
	uint32_t blocking_halt;
};

struct msm_vfe_axi_reset_cmd {