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

Commit 1d6f00a7 authored by Sagar Gore's avatar Sagar Gore
Browse files

msm: camera: isp: Safeguard multiple RDI controllable requests



If there are multiple RDI controllable stream output requests
within same frame we should reject those. Current check
takes care of only PIX streams, added check to handle RDI
streams as well.

Change-Id: Ia768c7e01dc891b71512598fed03104815c24689
Signed-off-by: default avatarSagar Gore <sgore@codeaurora.org>
parent 0dab3364
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -1306,7 +1306,6 @@ static int msm_isp_get_done_buf(struct vfe_device *vfe_dev,
	return rc;
}


void msm_isp_halt_send_error(struct vfe_device *vfe_dev)
{
	uint32_t i = 0;
@@ -2654,14 +2653,21 @@ static int msm_isp_request_frame(struct vfe_device *vfe_dev,
	}

	frame_src = SRC_TO_INTF(stream_info->stream_src);

	if (((frame_src == VFE_PIX_0) && (frame_id <=
	/*
	 * If PIX stream is active then RDI path uses SOF frame ID of PIX
	 * In case of standalone RDI streaming, SOF are used from
	 * individual intf.
	 */
	if (((vfe_dev->axi_data.src_info[VFE_PIX_0].active) && (frame_id <=
		vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id)) ||
		((!vfe_dev->axi_data.src_info[VFE_PIX_0].active) && (frame_id <=
		vfe_dev->axi_data.src_info[frame_src].frame_id)) ||
		stream_info->undelivered_request_cnt >= MAX_BUFFERS_IN_HW) {
		pr_debug("%s:%d invalid request_frame %d cur frame id %d\n",
		pr_debug("%s:%d invalid request_frame %d cur frame id %d pix %d\n",
			__func__, __LINE__, frame_id,
			vfe_dev->axi_data.src_info[frame_src].
				frame_id);
			vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id,
			vfe_dev->axi_data.src_info[VFE_PIX_0].active);

		rc = msm_isp_return_empty_buffer(vfe_dev, stream_info,
			user_stream_id, frame_id, frame_src);
		if (rc < 0)