aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorLuden <luden@ghostmail.com>2016-02-20 01:46:28 +0100
committerZiyan <jaraidaniel@gmail.com>2016-03-11 01:05:03 +0100
commit83183ed610ea9a7e473582322c6faa64ae0d5812 (patch)
tree45fb2b1d81c7035cbff24b7a2e7ccbd27782e3d3 /arch/arm
parent04bddbd3f43ddb336d5f01823723c23ba37d1c2f (diff)
downloadkernel_samsung_tuna-83183ed610ea9a7e473582322c6faa64ae0d5812.zip
kernel_samsung_tuna-83183ed610ea9a7e473582322c6faa64ae0d5812.tar.gz
kernel_samsung_tuna-83183ed610ea9a7e473582322c6faa64ae0d5812.tar.bz2
omap4: ion: add config option to force dynamic tiler allocations
Change-Id: I35aa150bdeda21b063591cd18ef55f01a6171e8c
Diffstat (limited to 'arch/arm')
-rwxr-xr-xarch/arm/mach-omap2/omap4_ion.c15
-rw-r--r--arch/arm/plat-omap/Kconfig5
2 files changed, 16 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/omap4_ion.c b/arch/arm/mach-omap2/omap4_ion.c
index 2c7daba..6233173 100755
--- a/arch/arm/mach-omap2/omap4_ion.c
+++ b/arch/arm/mach-omap2/omap4_ion.c
@@ -104,7 +104,9 @@ void __init omap_ion_init(void)
{
int i;
int ret;
+#ifndef CONFIG_ION_OMAP_TILER_DYNAMIC_ALLOC
u32 nonsecure = omap4_ion_pdata.nonsecure_tiler2d_size;
+#endif
system_512m = (omap_total_ram_size() == SZ_512M);
@@ -125,10 +127,15 @@ void __init omap_ion_init(void)
omap4_ion_heap_secure_output_wfdhdcp_size = (SZ_1M * 16);
#endif
omap4_ducati_heap_size = (SZ_1M * 105);
- omap4_ion_heap_nonsec_tiler_mem_size = nonsecure;
- omap4_ion_heap_tiler_mem_size =
- (ALIGN(omap4_ion_pdata.tiler2d_size +
- nonsecure, SZ_2M) - nonsecure);
+#ifdef CONFIG_ION_OMAP_TILER_DYNAMIC_ALLOC
+ omap4_ion_heap_nonsec_tiler_mem_size = 0;
+ omap4_ion_heap_tiler_mem_size = 0;
+#else
+ omap4_ion_heap_nonsec_tiler_mem_size = nonsecure;
+ omap4_ion_heap_tiler_mem_size =
+ (ALIGN(omap4_ion_pdata.tiler2d_size +
+ nonsecure, SZ_2M) - nonsecure);
+#endif
}
/* carveout addresses */
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index c41d948..e414516 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -301,6 +301,11 @@ config ION_OMAP_TILER2D_SIZE
depends on ION_OMAP
default 128
+config ION_OMAP_TILER_DYNAMIC_ALLOC
+ bool "Force dynamic allocation of tiler memory."
+ depends on ION_OMAP
+ default n
+
endmenu
endif