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

Commit b70977a6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents b0f900ce a1619a47
Loading
Loading
Loading
Loading
+15 −10
Original line number Diff line number Diff line
@@ -427,7 +427,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
@@ -497,23 +498,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__,