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

Commit 77029f97 authored by Shubhraprakash Das's avatar Shubhraprakash Das
Browse files

msm: camera: isp: Fix recovery in dual vfe mode



In case of dual vfe overflow recovery was failing because
the dual streams were not reset on both vfe. Fix the issue
with this change.

CRs-Fxied: 1076758
Change-Id: Iee81103263d95d93947a3967b1a3dbb568f76cf1
Signed-off-by: default avatarShubhraprakash Das <sadas@codeaurora.org>
parent b832093b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -245,7 +245,9 @@ struct msm_vfe_core_ops {
			struct msm_isp_ahb_clk_cfg *ahb_cfg);
	int (*start_fetch_eng_multi_pass)(struct vfe_device *vfe_dev,
		void *arg);
	void (*set_halt_restart_mask)(struct vfe_device *vfe_dev);
};

struct msm_vfe_stats_ops {
	int (*get_stats_idx)(enum msm_isp_stats_type stats_type);
	int (*check_streams)(struct msm_vfe_stats_stream *stream_info);
+9 −4
Original line number Diff line number Diff line
@@ -1808,6 +1808,11 @@ static void msm_vfe40_update_ping_pong_addr(
		VFE40_PING_PONG_BASE(wm_idx, pingpong_bit));
}

static void msm_vfe40_set_halt_restart_mask(struct vfe_device *vfe_dev)
{
	msm_vfe40_config_irq(vfe_dev, BIT(31), BIT(8), MSM_ISP_IRQ_SET);
}

static int msm_vfe40_axi_halt(struct vfe_device *vfe_dev,
	uint32_t blocking)
{
@@ -1859,12 +1864,10 @@ static void msm_vfe40_axi_restart(struct vfe_device *vfe_dev,
	vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, VFE_SRC_MAX);
	memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info));
	atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW);

	if (enable_camif) {
	if (enable_camif)
		vfe_dev->hw_info->vfe_ops.core_ops.
			update_camif_state(vfe_dev, ENABLE_CAMIF);
}
}

static uint32_t msm_vfe40_get_wm_mask(
	uint32_t irq_status0, uint32_t irq_status1)
@@ -2340,6 +2343,8 @@ struct msm_vfe_hardware_info vfe40_hw_info = {
			.ahb_clk_cfg = NULL,
			.start_fetch_eng_multi_pass =
				msm_vfe40_start_fetch_engine_multi_pass,
			.set_halt_restart_mask =
				msm_vfe40_set_halt_restart_mask,
		},
		.stats_ops = {
			.get_stats_idx = msm_vfe40_get_stats_idx,
+10 −4
Original line number Diff line number Diff line
@@ -1341,6 +1341,12 @@ static void msm_vfe44_update_ping_pong_addr(
		VFE44_PING_PONG_BASE(wm_idx, pingpong_bit));
}

static void msm_vfe44_set_halt_restart_mask(struct vfe_device *vfe_dev)
{
	msm_vfe44_config_irq(vfe_dev, BIT(31), BIT(8), MSM_ISP_IRQ_SET);
}


static int msm_vfe44_axi_halt(struct vfe_device *vfe_dev,
	uint32_t blocking)
{
@@ -1397,12 +1403,10 @@ static void msm_vfe44_axi_restart(struct vfe_device *vfe_dev,
	vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, VFE_SRC_MAX);
	memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info));
	atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW);

	if (enable_camif) {
	if (enable_camif)
		vfe_dev->hw_info->vfe_ops.core_ops.
			update_camif_state(vfe_dev, ENABLE_CAMIF);
}
}

static uint32_t msm_vfe44_get_wm_mask(
	uint32_t irq_status0, uint32_t irq_status1)
@@ -1913,6 +1917,8 @@ struct msm_vfe_hardware_info vfe44_hw_info = {
			.is_module_cfg_lock_needed =
				msm_vfe44_is_module_cfg_lock_needed,
			.ahb_clk_cfg = NULL,
			.set_halt_restart_mask =
				msm_vfe44_set_halt_restart_mask,
		},
		.stats_ops = {
			.get_stats_idx = msm_vfe44_get_stats_idx,
+9 −4
Original line number Diff line number Diff line
@@ -1423,6 +1423,11 @@ static void msm_vfe46_update_ping_pong_addr(
		VFE46_PING_PONG_BASE(wm_idx, pingpong_bit));
}

static void msm_vfe46_set_halt_restart_mask(struct vfe_device *vfe_dev)
{
	msm_vfe46_config_irq(vfe_dev, BIT(31), BIT(8), MSM_ISP_IRQ_SET);
}

static int msm_vfe46_axi_halt(struct vfe_device *vfe_dev,
	uint32_t blocking)
{
@@ -1478,12 +1483,10 @@ static void msm_vfe46_axi_restart(struct vfe_device *vfe_dev,
	vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, VFE_SRC_MAX);
	memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info));
	atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW);

	if (enable_camif) {
	if (enable_camif)
		vfe_dev->hw_info->vfe_ops.core_ops.
			update_camif_state(vfe_dev, ENABLE_CAMIF);
}
}

static uint32_t msm_vfe46_get_wm_mask(
	uint32_t irq_status0, uint32_t irq_status1)
@@ -2005,6 +2008,8 @@ struct msm_vfe_hardware_info vfe46_hw_info = {
			.is_module_cfg_lock_needed =
				msm_vfe46_is_module_cfg_lock_needed,
			.ahb_clk_cfg = NULL,
			.set_halt_restart_mask =
				msm_vfe46_set_halt_restart_mask,
		},
		.stats_ops = {
			.get_stats_idx = msm_vfe46_get_stats_idx,
+10 −7
Original line number Diff line number Diff line
@@ -744,7 +744,7 @@ long msm_vfe47_reset_hardware(struct vfe_device *vfe_dev,

	if (blocking_call) {
		rc = wait_for_completion_timeout(
			&vfe_dev->reset_complete, msecs_to_jiffies(50));
			&vfe_dev->reset_complete, msecs_to_jiffies(100));
		if (rc <= 0) {
			pr_err("%s:%d failed: reset timeout\n", __func__,
				__LINE__);
@@ -1821,6 +1821,11 @@ void msm_vfe47_update_ping_pong_addr(

}

void msm_vfe47_set_halt_restart_mask(struct vfe_device *vfe_dev)
{
	msm_vfe47_config_irq(vfe_dev, BIT(31), BIT(8), MSM_ISP_IRQ_SET);
}

int msm_vfe47_axi_halt(struct vfe_device *vfe_dev,
	uint32_t blocking)
{
@@ -1882,14 +1887,10 @@ void msm_vfe47_axi_restart(struct vfe_device *vfe_dev,
	vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, VFE_SRC_MAX);
	memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info));
	atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW);

	if (enable_camif) {
	if (enable_camif)
		vfe_dev->hw_info->vfe_ops.core_ops.
			update_camif_state(vfe_dev, ENABLE_CAMIF);
}
	vfe_dev->hw_info->vfe_ops.irq_ops.config_irq(vfe_dev,
			0x810000E0, 0xFFFFFF7E, MSM_ISP_IRQ_ENABLE);
}

uint32_t msm_vfe47_get_wm_mask(
	uint32_t irq_status0, uint32_t irq_status1)
@@ -2797,6 +2798,8 @@ struct msm_vfe_hardware_info vfe47_hw_info = {
			.ahb_clk_cfg = msm_isp47_ahb_clk_cfg,
			.start_fetch_eng_multi_pass =
				msm_vfe47_start_fetch_engine_multi_pass,
			.set_halt_restart_mask =
				msm_vfe47_set_halt_restart_mask,
		},
		.stats_ops = {
			.get_stats_idx = msm_vfe47_get_stats_idx,
Loading