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

Commit a1619a47 authored by Harsh Shah's avatar Harsh Shah Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: isp: Fix the framedrop pattern for burst streams



Framedrop pattern has 1 for num_burst_capture followed by 0 for
init_frame_drop. Previously we were using wrong variable
num_frame_count which had value 2 instead of 1 which caused
IOMMU faults.

Change-Id: I347df840253fca64db715dfbc90ce1065fe87a5b
Signed-off-by: default avatarHarsh Shah <harshs@codeaurora.org>
parent ce778ff3
Loading
Loading
Loading
Loading
+15 −10
Original line number Diff line number Diff line
@@ -417,7 +417,8 @@ void msm_isp_cfg_framedrop_reg(struct vfe_device *vfe_dev,
			 * ensure that no frame will came after last, even if
			 * userspace reg update is delayed */
			framedrop_pattern =
			      (1 << stream_info->runtime_burst_frame_count) - 1;
				(1 << stream_info->runtime_num_burst_capture)
				- 1;
			framedrop_pattern <<=
				stream_info->runtime_init_frame_drop;
			/* Alternate maximum two values for period to ensure
@@ -487,23 +488,27 @@ void msm_isp_update_framedrop_reg(struct vfe_device *vfe_dev,
void msm_isp_reset_framedrop(struct vfe_device *vfe_dev,
	struct msm_vfe_axi_stream *stream_info)
{
	stream_info->runtime_init_frame_drop = stream_info->init_frame_drop;
	/*
	 * While deriving burst_frame_count, Initial frame skip
	 * is taken into consideration But if skip frame has already
	 * passed, burst count has to be updated accordingly
	 */
	if (vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id == 0) {
		stream_info->runtime_burst_frame_count =
			stream_info->burst_frame_count;
	} else {
		stream_info->runtime_burst_frame_count =
			stream_info->burst_frame_count -
			stream_info->runtime_init_frame_drop;
	if (vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id >
		stream_info->init_frame_drop)
		stream_info->runtime_init_frame_drop = 0;
	}
	else
		stream_info->runtime_init_frame_drop =
			stream_info->init_frame_drop -
			vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id;

	stream_info->runtime_num_burst_capture =
		stream_info->num_burst_capture;

	stream_info->runtime_burst_frame_count =
		stream_info->runtime_init_frame_drop +
			(stream_info->runtime_num_burst_capture - 1) *
			(stream_info->framedrop_period + 1) + 1;

	stream_info->runtime_framedrop_update = stream_info->framedrop_update;
	msm_isp_cfg_framedrop_reg(vfe_dev, stream_info);
	ISP_DBG("%s: init frame drop: %d\n", __func__,