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

Commit dfa7baf8 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: Dual camera sync feature"

parents a9ec3bd6 2527a06c
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
@@ -95,11 +95,9 @@ struct msm_vfe_sof_info {
struct msm_vfe_dual_hw_ms_info {
	/* type is Master/Slave */
	enum msm_vfe_dual_hw_ms_type dual_hw_ms_type;
	/* sof_info is resource from common_data. If NULL, then this INTF
	 * sof does not need to be saved */
	struct msm_vfe_sof_info *sof_info;
	/* slave_id is index in common_data sof_info array for slaves */
	uint8_t slave_id;
	enum msm_vfe_dual_cam_sync_mode sync_state;
	struct msm_vfe_sof_info sof_info;
	int index;
};

struct vfe_subscribe_info {
@@ -245,7 +243,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);
@@ -678,13 +678,14 @@ struct dual_vfe_resource {

struct master_slave_resource_info {
	enum msm_vfe_dual_hw_type dual_hw_type;
	struct msm_vfe_sof_info master_sof_info;
	uint8_t master_active;
	uint32_t sof_delta_threshold; /* Updated by Master */
	uint32_t num_slave;
	uint32_t reserved_slave_mask;
	uint32_t slave_active_mask;
	struct msm_vfe_sof_info slave_sof_info[MS_NUM_SLAVE_MAX];
	uint32_t active_src_mask;
	uint32_t src_sof_mask;
	int master_index;
	int primary_slv_idx;
	struct msm_vfe_src_info *src_info[MAX_VFE * VFE_SRC_MAX];
	uint32_t num_src;
	enum msm_vfe_dual_cam_sync_mode dual_sync_mode;
};

struct msm_vfe_common_dev_data {
+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