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

Commit f3b4e10c authored by c_psiven's avatar c_psiven Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: isp: fix for burst frame drop



This change fixes issue in which ISP driver fails to send all
requested frames in burst mode when frame skip is updated runtime. The
root cause is that only frame skip value was modified, but not the
total number of frames driver is waiting for. Now when frame skip
request is received, ISP driver recalculates the total number of
frames to wait and updates frame skip on next reg update.

Change-Id: I7722f5d828e20fcccb0b3b2b8db0276fd28a5bc8
Signed-off-by: default avatarc_psiven <psiven@codeaurora.org>
parent 957c188a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -326,6 +326,7 @@ struct msm_vfe_axi_stream {
	uint32_t runtime_burst_frame_count;/*number of sof before burst stop*/
	uint32_t runtime_num_burst_capture;
	uint8_t  runtime_framedrop_update;
	uint8_t  runtime_framedrop_update_burst;
	uint32_t runtime_output_format;
	enum msm_stream_memory_input_t  memory_input;
};
+25 −7
Original line number Diff line number Diff line
@@ -433,8 +433,21 @@ void msm_isp_update_framedrop_reg(struct vfe_device *vfe_dev)
			}
		}
		if (stream_info->stream_type == BURST_STREAM) {
			if (stream_info->runtime_framedrop_update_burst) {
				stream_info->runtime_framedrop_update_burst = 0;
				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;
				vfe_dev->hw_info->vfe_ops.axi_ops.
					cfg_framedrop(vfe_dev, stream_info);
				vfe_dev->hw_info->vfe_ops.core_ops.
					reg_update(vfe_dev);
			} else {
				stream_info->runtime_burst_frame_count--;
			if (stream_info->runtime_burst_frame_count == 0) {
				if (stream_info->
				    runtime_burst_frame_count == 0) {
					vfe_dev->hw_info->vfe_ops.axi_ops.
					cfg_framedrop(vfe_dev, stream_info);
					vfe_dev->hw_info->vfe_ops.core_ops.
@@ -443,6 +456,7 @@ 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)
@@ -1699,14 +1713,18 @@ int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg)
			uint32_t framedrop_period =
				msm_isp_get_framedrop_period(
				   update_info->skip_pattern);
			stream_info->runtime_init_frame_drop = 0;
			if (update_info->skip_pattern == SKIP_ALL)
				stream_info->framedrop_pattern = 0x0;
			else
				stream_info->framedrop_pattern = 0x1;
			stream_info->framedrop_period = framedrop_period - 1;
			if (stream_info->stream_type == BURST_STREAM) {
				stream_info->runtime_framedrop_update_burst = 1;
			} else {
				stream_info->runtime_init_frame_drop = 0;
				vfe_dev->hw_info->vfe_ops.axi_ops.
					cfg_framedrop(vfe_dev, stream_info);
			}
			break;
		}
		case UPDATE_STREAM_AXI_CONFIG: {