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

Commit 72573804 authored by Sagar Gore's avatar Sagar Gore
Browse files

msm: camera: isp: Enable CGC override for read intf



Added changes to override CGC while doing fetch engine config.
This change will enable Bus read interface clock to use VFE in
offline mode. CGC reset will happen as part of close node.

Change-Id: Ia1cf49a0868731a8abd54f075061e4fe04481ad9
Signed-off-by: default avatarSagar Gore <sgore@codeaurora.org>
parent 0b5fe757
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -49,6 +49,8 @@
#define VFE44_PING_PONG_BASE(wm, ping_pong) \
	(VFE44_WM_BASE(wm) + 0x4 * (1 + (~(ping_pong >> wm) & 0x1)))

#define VFE44_BUS_RD_CGC_OVERRIDE_BIT 16

static uint8_t stats_pingpong_offset_map[] = {
	7, 8, 9, 10, 11, 12, 13, 14, 15};

@@ -871,6 +873,9 @@ static void msm_vfe44_cfg_fetch_engine(struct vfe_device *vfe_dev,
			__func__, fe_cfg->buf_width, fe_cfg->buf_height,
			fe_cfg->fetch_width, fe_cfg->fetch_height);

		vfe_dev->hw_info->vfe_ops.axi_ops.update_cgc_override(vfe_dev,
			VFE44_BUS_RD_CGC_OVERRIDE_BIT, 1);

		temp = msm_camera_io_r(vfe_dev->vfe_base + 0x50);
		temp &= 0xFFFFFFFD;
		temp |= (1 << 1);
+4 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@
	(VFE46_WM_BASE(wm) + 0x4 * (1 + (~(ping_pong >> wm) & 0x1)))
#define SHIFT_BF_SCALE_BIT 1
#define VFE46_NUM_STATS_COMP 2
#define VFE46_BUS_RD_CGC_OVERRIDE_BIT 16

static uint32_t stats_base_addr[] = {
	0x1E4, /* BF_SCALE */
@@ -855,6 +856,9 @@ static void msm_vfe46_cfg_fetch_engine(struct vfe_device *vfe_dev,
		msm_camera_io_w(0xF6543210, vfe_dev->vfe_base + 0x288);
		msm_camera_io_w(0xF, vfe_dev->vfe_base + 0x2A4);

		vfe_dev->hw_info->vfe_ops.axi_ops.update_cgc_override(vfe_dev,
			VFE46_BUS_RD_CGC_OVERRIDE_BIT, 1);

		temp = msm_camera_io_r(vfe_dev->vfe_base + 0x50);
		temp |= 2 << 5;
		temp |= 128 << 8;