msm: 7627a: Allocate bigger heap size for ZSL feature
ZSL feature in camera requires more heap size (60 MB)
than usual requirement (18 MB). So, check that if we
have sufficient RAM available and allocate more memory
accordingly.
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
(cherry picked from commit d8413769c6ecac074c10d505cb2f1552c4f15c26)
Change-Id: I01cb01e1e6fa04d3f21eec05f96fe4688d7aebfb
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-msm7x27a.c b/arch/arm/mach-msm/board-msm7x27a.c
index 110e326..5e6b0cc 100644
--- a/arch/arm/mach-msm/board-msm7x27a.c
+++ b/arch/arm/mach-msm/board-msm7x27a.c
@@ -171,7 +171,7 @@
#define MSM_PMEM_ADSP_SIZE 0x1200000
#define MSM7x25A_MSM_PMEM_ADSP_SIZE 0xB91000
-
+#define CAMERA_ZSL_SIZE (SZ_1M * 60)
#endif
#ifdef CONFIG_ION_MSM
@@ -946,6 +946,9 @@
pmem_mdp_size = MSM_PMEM_MDP_SIZE;
pmem_adsp_size = MSM_PMEM_ADSP_SIZE;
}
+
+ if (get_ddr_size() > SZ_512M)
+ pmem_adsp_size = CAMERA_ZSL_SIZE;
#ifdef CONFIG_ION_MSM
msm_ion_camera_size = pmem_adsp_size;
msm_ion_audio_size = (MSM_PMEM_AUDIO_SIZE + PMEM_KERNEL_EBI1_SIZE);