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

Commit 868c6440 authored by Mohit Setia's avatar Mohit Setia
Browse files

msm-camera: Update bit shift for VFE write masters



Make changes for correct bit shift required for VFE write masters
and update burst length.

Change-Id: I9fccfeee33d24674344ebce5190e6d429b985303
Signed-off-by: default avatarChandan Gera <cgera@codeaurora.org>
Signed-off-by: default avatarMohit Setia <msetia@codeaurora.org>
parent d5d4b2a9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@
#define VFE40_8916_VERSION 0x10030000
#define VFE40_8939_VERSION 0x10040000
#define VFE40_8952_VERSION 0x10060000
#define VFE40_8976_VERSION 0x10050000
#define VFE32_8909_VERSION 0x30600

#define MAX_IOMMU_CTX 2
+15 −6
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@
#define VFE40_BURST_LEN 1
#define VFE40_BURST_LEN_8916_VERSION 2
#define VFE40_BURST_LEN_8952_VERSION 3
#define VFE40_WM_BIT_SHIFT 4
#define VFE40_WM_BIT_SHIFT_8976_VERSION 3
#define VFE40_STATS_BURST_LEN 1
#define VFE40_STATS_BURST_LEN_8916_VERSION 2
#define VFE40_FETCH_BURST_LEN 3
@@ -1369,16 +1371,22 @@ static void msm_vfe40_axi_cfg_wm_reg(
	uint8_t plane_idx)
{
	uint32_t val;
	uint32_t burst_len;
	uint32_t burst_len, wm_bit_shift = VFE40_WM_BIT_SHIFT_8976_VERSION;
	uint32_t wm_base = VFE40_WM_BASE(stream_info->wm[plane_idx]);

	if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION ||
	    vfe_dev->vfe_hw_version == VFE40_8939_VERSION)
	    vfe_dev->vfe_hw_version == VFE40_8939_VERSION) {
		burst_len = VFE40_BURST_LEN_8916_VERSION;
	else if (vfe_dev->vfe_hw_version == VFE40_8952_VERSION)
		wm_bit_shift = VFE40_WM_BIT_SHIFT;
	} else if (vfe_dev->vfe_hw_version == VFE40_8952_VERSION) {
		burst_len = VFE40_BURST_LEN_8952_VERSION;
	else
		wm_bit_shift = VFE40_WM_BIT_SHIFT;
	} else if (vfe_dev->vfe_hw_version == VFE40_8976_VERSION) {
		burst_len = VFE40_BURST_LEN_8952_VERSION;
		wm_bit_shift = VFE40_WM_BIT_SHIFT_8976_VERSION;
	} else {
		burst_len = VFE40_BURST_LEN;
	}

	if (!stream_info->frame_based) {
		msm_camera_io_w(0x0, vfe_dev->vfe_base + wm_base);
@@ -1398,7 +1406,7 @@ static void msm_vfe40_axi_cfg_wm_reg(
			stream_info->plane_cfg[
				plane_idx].output_stride) << 16 |
			(stream_info->plane_cfg[
				plane_idx].output_height - 1) << 4 |
				plane_idx].output_height - 1) << wm_bit_shift |
			burst_len;
		msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18);
	} else {
@@ -1876,7 +1884,8 @@ static void msm_vfe40_stats_cfg_ub(struct vfe_device *vfe_dev)
	    vfe_dev->vfe_hw_version == VFE40_8939_VERSION) {
		stats_burst_len = VFE40_STATS_BURST_LEN_8916_VERSION;
		ub_offset = VFE40_UB_SIZE_8916;
	} else if (vfe_dev->vfe_hw_version == VFE40_8952_VERSION) {
	} else if (vfe_dev->vfe_hw_version == VFE40_8952_VERSION ||
	    vfe_dev->vfe_hw_version == VFE40_8976_VERSION) {
		stats_burst_len = VFE40_STATS_BURST_LEN_8916_VERSION;
		ub_offset = VFE40_UB_SIZE_8952;
	} else {