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

Commit 12509d89 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: Add drop reporting in RESUMING state"

parents 223ff05e 1639cb7a
Loading
Loading
Loading
Loading
+36 −10
Original line number Diff line number Diff line
@@ -723,6 +723,7 @@ void msm_isp_check_for_output_error(struct vfe_device *vfe_dev,
	struct msm_vfe_axi_stream *stream_info;
	struct msm_vfe_axi_shared_data *axi_data;
	int i;
	uint32_t stream_idx;

	if (!vfe_dev || !sof_info) {
		pr_err("%s %d failed: vfe_dev %pK sof_info %pK\n", __func__,
@@ -740,14 +741,28 @@ void msm_isp_check_for_output_error(struct vfe_device *vfe_dev,
	if (!vfe_dev->reg_updated) {
		sof_info->regs_not_updated =
			vfe_dev->reg_update_requested;
	}
	for (i = 0; i < VFE_AXI_SRC_MAX; i++) {
		struct msm_vfe_axi_stream *temp_stream_info;

		stream_info = &axi_data->stream_info[i];
			if (stream_info->state != ACTIVE ||
				!stream_info->controllable_output ||
				(SRC_TO_INTF(stream_info->stream_src) !=
				VFE_PIX_0))
		stream_idx = HANDLE_TO_IDX(stream_info->stream_handle);

		/*
		 * Process drop only if controllable ACTIVE PIX stream &&
		 * reg_not_updated
		 * OR stream is in RESUMING state.
		 * Other cases there is no drop to report, so continue.
		 */
		if (!((stream_info->state == ACTIVE  &&
			stream_info->controllable_output &&
			(SRC_TO_INTF(stream_info->stream_src) ==
			VFE_PIX_0)) ||
			stream_info->state == RESUMING))
				continue;

		if (stream_info->controllable_output &&
			!vfe_dev->reg_updated) {
			temp_stream_info =
				msm_isp_get_controllable_stream(vfe_dev,
				stream_info);
@@ -758,7 +773,18 @@ void msm_isp_check_for_output_error(struct vfe_device *vfe_dev,
				}
			}
		}

		if (stream_info->state == RESUMING &&
			!stream_info->controllable_output) {
			ISP_DBG("%s: axi_updating_mask stream_id %x frame_id %d\n",
				__func__, stream_idx, vfe_dev->axi_data.
				src_info[SRC_TO_INTF(stream_info->stream_src)]
				.frame_id);
			sof_info->axi_updating_mask |=
				1 << stream_idx;
		}
	}

	vfe_dev->reg_updated = 0;

	/* report frame drop per stream */
@@ -1956,8 +1982,8 @@ int msm_isp_drop_frame(struct vfe_device *vfe_dev,
				__func__, done_buf->bufq_handle);
			return -EINVAL;
		}
		sof_info->reg_update_fail_mask |=
			1 << (bufq->bufq_handle & 0xF);
		sof_info->reg_update_fail_mask_ext |=
			(bufq->bufq_handle & 0xFF);
	}
	spin_unlock_irqrestore(&stream_info->lock, flags);

+11 −1
Original line number Diff line number Diff line
@@ -719,7 +719,7 @@ struct msm_isp_output_info {
/* This structure is piggybacked with SOF event */
struct msm_isp_sof_info {
	uint8_t regs_not_updated;
	/* mask with AXI_SRC for regs not updated */
	/* mask with bufq_handle for regs not updated */
	uint16_t reg_update_fail_mask;
	/* mask with bufq_handle for get_buf failed */
	uint32_t stream_get_buf_fail_mask;
@@ -727,7 +727,17 @@ struct msm_isp_sof_info {
	uint16_t stats_get_buf_fail_mask;
	/* delta between master and slave */
	struct msm_isp_ms_delta_info ms_delta_info;
	/*
	 * mask with AXI_SRC in paused state. In PAUSED
	 * state there is no Buffer output. So this mask is used
	 * to report drop.
	 */
	uint16_t axi_updating_mask;
	/* extended mask with bufq_handle for regs not updated */
	uint32_t reg_update_fail_mask_ext;
};
#define AXI_UPDATING_MASK 1
#define REG_UPDATE_FAIL_MASK_EXT 1

struct msm_isp_event_data {
	/*Wall clock except for buffer divert events