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

Commit 15605ece authored by Harsh Shah's avatar Harsh Shah Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera isp: Force equal slicing of UB



The UB buffer cannot be resized runtime when one session is ON.
This causes 2nd session to starve when using proportional distribution.
Hence enforce equal slicing for all WM.

Change-Id: Iaa1ad96ec14637d618ae1755313346731279c54d
Signed-off-by: default avatarHarsh Shah <harshs@codeaurora.org>
parent f0cc8eb8
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@
#define VFE40_UB_SIZE_8952 2048 /* 2048 * 128 bits = 32KB */
#define VFE40_UB_SIZE_8916 3072 /* 3072 * 128 bits = 48KB */
#define VFE40_EQUAL_SLICE_UB 190 /* (UB_SIZE - STATS SIZE)/6 */
#define VFE40_EQUAL_SLICE_UB_8916 276
#define VFE40_EQUAL_SLICE_UB_8916 236
#define VFE40_TOTAL_WM_UB 1144 /* UB_SIZE - STATS SIZE */
#define VFE40_TOTAL_WM_UB_8916 1656
#define VFE40_WM_BASE(idx) (0x6C + 0x24 * idx)
@@ -1574,7 +1574,8 @@ static void msm_vfe40_cfg_axi_ub_equal_slicing(
	uint32_t equal_slice_ub;
	struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data;

	if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) {
	if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION ||
		vfe_dev->vfe_hw_version == VFE40_8952_VERSION) {
		vfe_dev->ub_info->wm_ub = VFE40_EQUAL_SLICE_UB_8916;
		equal_slice_ub = VFE40_EQUAL_SLICE_UB_8916;
	} else {
@@ -1598,6 +1599,8 @@ static void msm_vfe40_cfg_axi_ub(struct vfe_device *vfe_dev)
	struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data;
	axi_data->wm_ub_cfg_policy =
		(enum msm_wm_ub_cfg_type)vfe_dev->vfe_ub_policy;
	ISP_DBG("%s: ub_policy %d\n", __func__, axi_data->wm_ub_cfg_policy);
	axi_data->wm_ub_cfg_policy = MSM_WM_UB_EQUAL_SLICING;
	if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING) {
		vfe_dev->ub_info->policy = MSM_WM_UB_EQUAL_SLICING;
		msm_vfe40_cfg_axi_ub_equal_slicing(vfe_dev);