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

Commit ebb8fec9 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 CTS issue for RDI stream"

parents 8383131b dc110f44
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@
#define MAX_NUM_COMPOSITE_MASK 4
#define MAX_NUM_STATS_COMP_MASK 2
#define MAX_INIT_FRAME_DROP 31
#define MAX_REG_UPDATE_THRESHOLD 10
#define ISP_Q2 (1 << 2)

#define VFE_PING_FLAG 0xFFFFFFFF
@@ -55,6 +56,7 @@

#define MSM_ISP_MIN_AB 100000000
#define MSM_ISP_MIN_IB 100000000
#define MAX_BUFFERS_IN_HW 2

struct vfe_device;
struct msm_vfe_axi_stream;
@@ -337,6 +339,8 @@ struct msm_vfe_axi_stream {
	enum msm_vfe_frame_skip_pattern frame_skip_pattern;
	uint32_t framedrop_period;
	uint32_t framedrop_pattern;
	uint32_t prev_framedrop_period;
	uint32_t prev_framedrop_pattern;
	uint32_t framedrop_altern_cnt;
	uint32_t num_burst_capture;/*number of frame to capture*/
	uint32_t init_frame_drop;
@@ -359,6 +363,7 @@ struct msm_vfe_axi_stream {
	uint32_t runtime_output_format;
	enum msm_stream_memory_input_t  memory_input;
	struct msm_isp_sw_framskip sw_skip;
	uint8_t sw_ping_pong_bit;
};

struct msm_vfe_axi_composite_info {
@@ -368,6 +373,8 @@ struct msm_vfe_axi_composite_info {

struct msm_vfe_src_info {
	uint32_t frame_id;
	uint32_t camif_sof_frame_id;
	uint32_t reg_update_frame_id;
	uint8_t active;
	uint8_t pix_stream_count;
	uint8_t raw_stream_count;
+6 −0
Original line number Diff line number Diff line
@@ -399,6 +399,12 @@ static void msm_vfe32_process_camif_irq(struct vfe_device *vfe_dev,
	if (!(irq_status0 & 0x1F))
		return;

	if (irq_status0 & 0x1)
		vfe_dev->axi_data.src_info[VFE_PIX_0].camif_sof_frame_id++;

	if (vfe_dev->axi_data.src_info[VFE_PIX_0].camif_sof_frame_id == 0)
		vfe_dev->axi_data.src_info[VFE_PIX_0].camif_sof_frame_id = 1;

	if (irq_status0 & BIT(0)) {
		ISP_DBG("%s: SOF IRQ\n", __func__);
		if (vfe_dev->axi_data.src_info[VFE_PIX_0].raw_stream_count > 0
+10 −1
Original line number Diff line number Diff line
@@ -443,6 +443,12 @@ static void msm_vfe40_process_input_irq(struct vfe_device *vfe_dev,
	if (!(irq_status0 & 0x1000003))
		return;

	if (irq_status0 & 0x1)
		vfe_dev->axi_data.src_info[VFE_PIX_0].camif_sof_frame_id++;

	if (vfe_dev->axi_data.src_info[VFE_PIX_0].camif_sof_frame_id == 0)
		vfe_dev->axi_data.src_info[VFE_PIX_0].camif_sof_frame_id = 1;

	if (irq_status0 & (1 << 24)) {
		ISP_DBG("%s: Fetch Engine Read IRQ\n", __func__);
		msm_isp_fetch_engine_done_notify(vfe_dev,
@@ -663,6 +669,7 @@ static void msm_vfe40_process_reg_update(struct vfe_device *vfe_dev,
				(uint32_t)BIT(i));
			switch (i) {
			case VFE_PIX_0:
				msm_isp_save_framedrop_values(vfe_dev);
				msm_isp_notify(vfe_dev, ISP_EVENT_REG_UPDATE,
					VFE_PIX_0, ts);
				if (atomic_read(
@@ -700,7 +707,7 @@ static void msm_vfe40_process_reg_update(struct vfe_device *vfe_dev,
	}

	spin_lock_irqsave(&vfe_dev->reg_update_lock, flags);
	if (vfe_dev->reg_update_requested == reg_updated)
	if (reg_updated & BIT(VFE_PIX_0))
		vfe_dev->reg_updated = 1;

	vfe_dev->reg_update_requested &= ~reg_updated;
@@ -730,6 +737,8 @@ static void msm_vfe40_reg_update(struct vfe_device *vfe_dev,
	ISP_DBG("%s update_mask %x\n", __func__, update_mask);

	spin_lock_irqsave(&vfe_dev->reg_update_lock, flags);
	vfe_dev->axi_data.src_info[VFE_PIX_0].reg_update_frame_id =
		vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id;
	vfe_dev->reg_update_requested |= update_mask;
	msm_camera_io_w_mb(vfe_dev->reg_update_requested,
		vfe_dev->vfe_base + 0x378);
+10 −1
Original line number Diff line number Diff line
@@ -291,6 +291,12 @@ static void msm_vfe44_process_input_irq(struct vfe_device *vfe_dev,
	if (!(irq_status0 & 0x1000003))
		return;

	if (irq_status0 & 0x1)
		vfe_dev->axi_data.src_info[VFE_PIX_0].camif_sof_frame_id++;

	if (vfe_dev->axi_data.src_info[VFE_PIX_0].camif_sof_frame_id == 0)
		vfe_dev->axi_data.src_info[VFE_PIX_0].camif_sof_frame_id = 1;

	if (irq_status0 & (1 << 24)) {
		ISP_DBG("%s: Fetch Engine Read IRQ\n", __func__);
		msm_isp_fetch_engine_done_notify(vfe_dev,
@@ -511,6 +517,7 @@ static void msm_vfe44_process_reg_update(struct vfe_device *vfe_dev,
				(uint32_t)BIT(i));
			switch (i) {
			case VFE_PIX_0:
				msm_isp_save_framedrop_values(vfe_dev);
				msm_isp_notify(vfe_dev, ISP_EVENT_REG_UPDATE,
					VFE_PIX_0, ts);
				if (atomic_read(
@@ -548,7 +555,7 @@ static void msm_vfe44_process_reg_update(struct vfe_device *vfe_dev,
	}

	spin_lock_irqsave(&vfe_dev->reg_update_lock, flags);
	if (vfe_dev->reg_update_requested == reg_updated)
	if (reg_updated & BIT(VFE_PIX_0))
		vfe_dev->reg_updated = 1;

	vfe_dev->reg_update_requested &= ~reg_updated;
@@ -604,6 +611,8 @@ static void msm_vfe44_reg_update(struct vfe_device *vfe_dev,

	spin_lock_irqsave(&vfe_dev->reg_update_lock, flags);
	vfe_dev->reg_update_requested |= update_mask;
	vfe_dev->axi_data.src_info[VFE_PIX_0].reg_update_frame_id =
		vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id;
	msm_camera_io_w_mb(vfe_dev->reg_update_requested,
		vfe_dev->vfe_base + 0x378);
	spin_unlock_irqrestore(&vfe_dev->reg_update_lock, flags);
+10 −1
Original line number Diff line number Diff line
@@ -316,6 +316,12 @@ static void msm_vfe46_process_input_irq(struct vfe_device *vfe_dev,
	if (!(irq_status0 & 0x1000003))
		return;

	if (irq_status0 & 0x1)
		vfe_dev->axi_data.src_info[VFE_PIX_0].camif_sof_frame_id++;

	if (vfe_dev->axi_data.src_info[VFE_PIX_0].camif_sof_frame_id == 0)
		vfe_dev->axi_data.src_info[VFE_PIX_0].camif_sof_frame_id = 1;

	if (irq_status0 & (1 << 24)) {
		ISP_DBG("%s: Fetch Engine Read IRQ\n", __func__);
		msm_isp_fetch_engine_done_notify(vfe_dev,
@@ -439,6 +445,7 @@ static void msm_vfe46_process_reg_update(struct vfe_device *vfe_dev,
				(uint32_t)BIT(i));
			switch (i) {
			case VFE_PIX_0:
				msm_isp_save_framedrop_values(vfe_dev);
				msm_isp_notify(vfe_dev, ISP_EVENT_REG_UPDATE,
					VFE_PIX_0, ts);
				if (atomic_read(
@@ -476,7 +483,7 @@ static void msm_vfe46_process_reg_update(struct vfe_device *vfe_dev,
	}

	spin_lock_irqsave(&vfe_dev->reg_update_lock, flags);
	if (vfe_dev->reg_update_requested == reg_updated)
	if (reg_updated & BIT(VFE_PIX_0))
		vfe_dev->reg_updated = 1;

	vfe_dev->reg_update_requested &= ~reg_updated;
@@ -530,6 +537,8 @@ static void msm_vfe46_reg_update(struct vfe_device *vfe_dev,
	ISP_DBG("%s update_mask %x\n", __func__, update_mask);

	spin_lock_irqsave(&vfe_dev->reg_update_lock, flags);
	vfe_dev->axi_data.src_info[VFE_PIX_0].reg_update_frame_id =
		vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id;
	vfe_dev->reg_update_requested |= update_mask;
	msm_camera_io_w_mb(vfe_dev->reg_update_requested,
		vfe_dev->vfe_base + 0x3D8);
Loading