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

Commit 544ab406 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera_v2: dualvfesync support for analysis stream"

parents 743e342f a913647f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ struct msm_vfe_irq_ops {
	void (*dual_config_irq)(struct vfe_device *vfe_dev,
		uint32_t irq_status0, uint32_t irq_status1,
		enum msm_isp_irq_operation);
	void (*read_and_clear_dual_irq_status)(struct vfe_device *vfe_dev,
	void (*clear_dual_irq_status)(struct vfe_device *vfe_dev,
		uint32_t *dual_irq_status0);
};

@@ -870,6 +870,7 @@ struct vfe_device {
	/* Dual VFE IRQ CAMSS Info*/
	void __iomem *camss_base;
	struct resource *dual_vfe_irq;
	bool dual_isp_sync_irq_enabled;
	/* irq info */
	uint32_t dual_irq_mask;
	uint32_t irq_sof_id;
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -2268,7 +2268,7 @@ struct msm_vfe_hardware_info vfe40_hw_info = {
			.config_irq = msm_vfe40_config_irq,
			.preprocess_camif_irq = msm_isp47_preprocess_camif_irq,
			.dual_config_irq = NULL,
			.read_and_clear_dual_irq_status =
			.clear_dual_irq_status =
				NULL,
		},
		.axi_ops = {
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1836,7 +1836,7 @@ struct msm_vfe_hardware_info vfe44_hw_info = {
			.config_irq = msm_vfe44_config_irq,
			.preprocess_camif_irq = msm_isp47_preprocess_camif_irq,
			.dual_config_irq = NULL,
			.read_and_clear_dual_irq_status =
			.clear_dual_irq_status =
				NULL,
		},
		.axi_ops = {
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1905,7 +1905,7 @@ struct msm_vfe_hardware_info vfe46_hw_info = {
			.config_irq = msm_vfe46_config_irq,
			.preprocess_camif_irq = msm_isp47_preprocess_camif_irq,
			.dual_config_irq = NULL,
			.read_and_clear_dual_irq_status =
			.clear_dual_irq_status =
				NULL,
		},
		.axi_ops = {
+7 −7
Original line number Diff line number Diff line
@@ -575,12 +575,14 @@ void msm_vfe47_read_and_clear_irq_status(struct vfe_device *vfe_dev,
	uint32_t count = 0;
	*irq_status0 = msm_camera_io_r(vfe_dev->vfe_base + 0x6C);
	*irq_status1 = msm_camera_io_r(vfe_dev->vfe_base + 0x70);

	/* Mask off bits that are not enabled */
	*irq_status0 &= vfe_dev->irq0_mask;
	*irq_status1 &= vfe_dev->irq1_mask;

	msm_camera_io_w(*irq_status0, vfe_dev->vfe_base + 0x64);
	msm_camera_io_w(*irq_status1, vfe_dev->vfe_base + 0x68);
	msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x58);
	*irq_status0 &= vfe_dev->irq0_mask;
	*irq_status1 &= vfe_dev->irq1_mask;
	/* check if status register is cleared if not clear again*/
	while (*irq_status0 &&
		(*irq_status0 & msm_camera_io_r(vfe_dev->vfe_base + 0x6C)) &&
@@ -628,8 +630,8 @@ void msm_vfe47_process_reg_update(struct vfe_device *vfe_dev,
	for (i = VFE_PIX_0; i <= VFE_RAW_2; i++) {
		if (shift_irq & BIT(i)) {
			reg_updated |= BIT(i);
			ISP_DBG("%s REG_UPDATE IRQ %x vfe %d\n", __func__,
				(uint32_t)BIT(i), vfe_dev->pdev->id);
			ISP_DBG("%s REG_UPDATE IRQ %x i %d vfe %d\n", __func__,
				(uint32_t)BIT(i), i, vfe_dev->pdev->id);
			switch (i) {
			case VFE_PIX_0:
				msm_isp_notify(vfe_dev, ISP_EVENT_REG_UPDATE,
@@ -672,11 +674,9 @@ void msm_vfe47_process_reg_update(struct vfe_device *vfe_dev,
			}
		}
	}

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

	vfe_dev->reg_update_requested &= ~reg_updated;
	spin_unlock_irqrestore(&vfe_dev->reg_update_lock, flags);
}
@@ -3068,7 +3068,7 @@ struct msm_vfe_hardware_info vfe47_hw_info = {
			.read_irq_status = msm_vfe47_read_irq_status,
			.preprocess_camif_irq = msm_isp47_preprocess_camif_irq,
			.dual_config_irq = NULL,
			.read_and_clear_dual_irq_status =
			.clear_dual_irq_status =
				NULL,
		},
		.axi_ops = {
Loading