From 8d0507c8109243bf8c85b721e33a275eb12e90ce Mon Sep 17 00:00:00 2001 From: tao zeng Date: Fri, 9 Nov 2018 12:10:49 +0800 Subject: [PATCH] dts: change CMA layout [1/1] PD#SWPL-1909 Problem: On 32bit kernel, codec cma is located in normal zone by "alloc-ranges" parameter with large size. This takse up memory space for kernel and drivers. Sometimes we can see memory allocation fail log but there are still enought free pages. But most of these pages are CMA pages. Solution: Move codec cma location to high memzone. On 32bit, low 768MB memory is normal zone. This change also correct first 1MB memory lost problem for chips later than TXLX Verify: P212 Change-Id: I4592d34d08ee4dbb6700bbbfc4e0fadaceab0310 Signed-off-by: tao zeng --- .../arm/boot/dts/amlogic/g12a_s905d2_u200.dts | 8 ++--- .../boot/dts/amlogic/g12a_s905d2_u200_1g.dts | 24 +++++++------ .../arm/boot/dts/amlogic/g12a_s905x2_u212.dts | 4 +-- .../boot/dts/amlogic/g12a_s905x2_u212_1g.dts | 22 ++++++------ .../arm/boot/dts/amlogic/g12a_s905y2_u221.dts | 6 ++-- arch/arm/boot/dts/amlogic/g12b_a311d_w400.dts | 2 +- arch/arm/boot/dts/amlogic/gxl_p212_1g.dts | 23 +++++++------ arch/arm/boot/dts/amlogic/gxl_p212_2g.dts | 4 +-- arch/arm/boot/dts/amlogic/gxl_p230_2g.dts | 4 +-- arch/arm/boot/dts/amlogic/gxl_p241_1g.dts | 22 ++++++------ arch/arm/boot/dts/amlogic/gxl_p241_v2-1g.dts | 24 +++++++------ arch/arm/boot/dts/amlogic/tl1_pxp.dts | 6 ++-- arch/arm/boot/dts/amlogic/txl_t962_p321.dts | 32 ++++++++--------- .../boot/dts/amlogic/txl_t962_p321_720p.dts | 34 +++++++++---------- arch/arm/boot/dts/amlogic/txlx_t962e_r321.dts | 2 +- .../boot/dts/amlogic/txlx_t962x_r311_1g.dts | 27 ++++++++------- .../boot/dts/amlogic/txlx_t962x_r311_2g.dts | 6 ++-- .../boot/dts/amlogic/txl_t962_p321_720p.dts | 0 18 files changed, 131 insertions(+), 119 deletions(-) mode change 100755 => 100644 arch/arm64/boot/dts/amlogic/txl_t962_p321_720p.dts diff --git a/arch/arm/boot/dts/amlogic/g12a_s905d2_u200.dts b/arch/arm/boot/dts/amlogic/g12a_s905d2_u200.dts index 6b99519eadf9..c5e894a25c65 100644 --- a/arch/arm/boot/dts/amlogic/g12a_s905d2_u200.dts +++ b/arch/arm/boot/dts/amlogic/g12a_s905d2_u200.dts @@ -45,7 +45,7 @@ memory@00000000 { device_type = "memory"; - linux,usable-memory = <0x100000 0x7ff00000>; + linux,usable-memory = <0x000000 0x80000000>; }; reserved-memory { @@ -80,14 +80,14 @@ reusable; size = <0x800000>; alignment = <0x400000>; - alloc-ranges = <0x0 0x30000000>; + alloc-ranges = <0x30000000 0x50000000>; }; ion_cma_reserved:linux,ion-dev { compatible = "shared-dma-pool"; reusable; size = <0x8000000>; alignment = <0x400000>; - alloc-ranges = <0x0 0x30000000>; + alloc-ranges = <0x30000000 0x50000000>; }; //di_reserved:linux,di { //compatible = "amlogic, di-mem"; @@ -126,7 +126,7 @@ size = <0x13400000>; alignment = <0x400000>; linux,contiguous-region; - alloc-ranges = <0x0 0x30000000>; + alloc-ranges = <0x30000000 0x50000000>; }; /* codec shared reserved */ codec_mm_reserved:linux,codec_mm_reserved { diff --git a/arch/arm/boot/dts/amlogic/g12a_s905d2_u200_1g.dts b/arch/arm/boot/dts/amlogic/g12a_s905d2_u200_1g.dts index 411bd71873c9..25a38773ac6e 100644 --- a/arch/arm/boot/dts/amlogic/g12a_s905d2_u200_1g.dts +++ b/arch/arm/boot/dts/amlogic/g12a_s905d2_u200_1g.dts @@ -45,7 +45,7 @@ memory@00000000 { device_type = "memory"; - linux,usable-memory = <0x100000 0x3ff00000>; + linux,usable-memory = <0x000000 0x40000000>; }; reserved-memory { @@ -82,6 +82,16 @@ alignment = <0x400000>; alloc-ranges = <0x3f800000 0x800000>; }; + + codec_mm_cma:linux,codec_mm_cma { + compatible = "shared-dma-pool"; + reusable; + /* ion_codec_mm max can alloc size 80M*/ + size = <0xC400000>; + alignment = <0x400000>; + linux,contiguous-region; + alloc-ranges = <0x30000000 0x10000000>; + }; ion_cma_reserved:linux,ion-dev { compatible = "shared-dma-pool"; reusable; @@ -112,6 +122,7 @@ */ size = <0x02800000>; alignment = <0x400000>; + alloc-ranges = <0x30000000 0x10000000>; }; /* POST PROCESS MANAGER */ ppmgr_reserved:linux,ppmgr { @@ -119,15 +130,6 @@ size = <0x0>; }; - codec_mm_cma:linux,codec_mm_cma { - compatible = "shared-dma-pool"; - reusable; - /* ion_codec_mm max can alloc size 80M*/ - size = <0xC400000>; - alignment = <0x400000>; - linux,contiguous-region; - alloc-ranges = <0x0 0x30000000>; - }; /* codec shared reserved */ codec_mm_reserved:linux,codec_mm_reserved { compatible = "amlogic, codec-mm-reserved"; @@ -142,6 +144,7 @@ /* 1920x1080x2x4 =16+4 M */ size = <0x04000000>; alignment = <0x400000>; + alloc-ranges = <0x0 0x30000000>; }; /* vdin1 CMA pool */ vdin1_cma_reserved:linux,vdin1_cma { @@ -150,6 +153,7 @@ /* 1920x1080x2x4 =16 M */ size = <0x04000000>; alignment = <0x400000>; + alloc-ranges = <0x0 0x30000000>; }; }; diff --git a/arch/arm/boot/dts/amlogic/g12a_s905x2_u212.dts b/arch/arm/boot/dts/amlogic/g12a_s905x2_u212.dts index 278d4c8d4839..501a60803fa7 100644 --- a/arch/arm/boot/dts/amlogic/g12a_s905x2_u212.dts +++ b/arch/arm/boot/dts/amlogic/g12a_s905x2_u212.dts @@ -45,7 +45,7 @@ memory@00000000 { device_type = "memory"; - linux,usable-memory = <0x100000 0x7ff00000>; + linux,usable-memory = <0x000000 0x80000000>; }; reserved-memory { @@ -80,7 +80,7 @@ reusable; size = <0x800000>; alignment = <0x400000>; - alloc-ranges = <0x7f700000 0x800000>; + alloc-ranges = <0x7f800000 0x800000>; }; ion_cma_reserved:linux,ion-dev { compatible = "shared-dma-pool"; diff --git a/arch/arm/boot/dts/amlogic/g12a_s905x2_u212_1g.dts b/arch/arm/boot/dts/amlogic/g12a_s905x2_u212_1g.dts index aeb9cb0ddd09..3a2feedadf1c 100644 --- a/arch/arm/boot/dts/amlogic/g12a_s905x2_u212_1g.dts +++ b/arch/arm/boot/dts/amlogic/g12a_s905x2_u212_1g.dts @@ -45,7 +45,7 @@ memory@00000000 { device_type = "memory"; - linux,usable-memory = <0x100000 0x3ff00000>; + linux,usable-memory = <0x000000 0x40000000>; }; @@ -83,6 +83,15 @@ alignment = <0x400000>; alloc-ranges = <0x3f800000 0x800000>; }; + codec_mm_cma:linux,codec_mm_cma { + compatible = "shared-dma-pool"; + reusable; + /* ion_codec_mm max can alloc size 80M*/ + size = <0xd000000>; + alignment = <0x400000>; + linux,contiguous-region; + alloc-ranges = <0x30000000 0x10000000>; + }; ion_cma_reserved:linux,ion-dev { compatible = "shared-dma-pool"; reusable; @@ -113,6 +122,7 @@ */ size = <0x02800000>; alignment = <0x400000>; + alloc-ranges = <0x30000000 0x10000000>; }; /* POST PROCESS MANAGER */ ppmgr_reserved:linux,ppmgr { @@ -120,15 +130,6 @@ size = <0x0>; }; - codec_mm_cma:linux,codec_mm_cma { - compatible = "shared-dma-pool"; - reusable; - /* ion_codec_mm max can alloc size 80M*/ - size = <0xd000000>; - alignment = <0x400000>; - linux,contiguous-region; - alloc-ranges = <0x00000000 0x30000000>; - }; /* codec shared reserved */ codec_mm_reserved:linux,codec_mm_reserved { compatible = "amlogic, codec-mm-reserved"; @@ -151,6 +152,7 @@ /* 1920x1080x2x4 =16 M */ size = <0x01000000>; alignment = <0x400000>; + alloc-ranges = <0x0 0x30000000>; }; }; diff --git a/arch/arm/boot/dts/amlogic/g12a_s905y2_u221.dts b/arch/arm/boot/dts/amlogic/g12a_s905y2_u221.dts index 1755d33aa8f1..dffeca8af531 100644 --- a/arch/arm/boot/dts/amlogic/g12a_s905y2_u221.dts +++ b/arch/arm/boot/dts/amlogic/g12a_s905y2_u221.dts @@ -44,7 +44,7 @@ memory@00000000 { device_type = "memory"; - linux,usable-memory = <0x100000 0x7ff00000>; + linux,usable-memory = <0x000000 0x80000000>; }; reserved-memory { @@ -77,7 +77,7 @@ reusable; size = <0x8000000>; alignment = <0x400000>; - alloc-ranges = <0x0 0x30000000>; + alloc-ranges = <0x30000000 0x50000000>; }; //di_reserved:linux,di { //compatible = "amlogic, di-mem"; @@ -116,7 +116,7 @@ size = <0x13400000>; alignment = <0x400000>; linux,contiguous-region; - alloc-ranges = <0x0 0x30000000>; + alloc-ranges = <0x30000000 0x50000000>; }; /* codec shared reserved */ codec_mm_reserved:linux,codec_mm_reserved { diff --git a/arch/arm/boot/dts/amlogic/g12b_a311d_w400.dts b/arch/arm/boot/dts/amlogic/g12b_a311d_w400.dts index b858e07da5dd..39f0d5498d98 100644 --- a/arch/arm/boot/dts/amlogic/g12b_a311d_w400.dts +++ b/arch/arm/boot/dts/amlogic/g12b_a311d_w400.dts @@ -45,7 +45,7 @@ memory@00000000 { device_type = "memory"; - linux,usable-memory = <0x100000 0x7ff00000>; + linux,usable-memory = <0x000000 0x80000000>; }; reserved-memory { diff --git a/arch/arm/boot/dts/amlogic/gxl_p212_1g.dts b/arch/arm/boot/dts/amlogic/gxl_p212_1g.dts index 3a35ca9e16e3..9f1cacf32fd1 100644 --- a/arch/arm/boot/dts/amlogic/gxl_p212_1g.dts +++ b/arch/arm/boot/dts/amlogic/gxl_p212_1g.dts @@ -70,6 +70,16 @@ alignment = <0x400000>; alloc-ranges = <0x3f800000 0x800000>; }; + + codec_mm_cma:linux,codec_mm_cma { + compatible = "shared-dma-pool"; + reusable; + /* ion_codec_mm max can alloc size 80M*/ + size = <0xd000000>; + alignment = <0x400000>; + linux,contiguous-region; + alloc-ranges = <0x30000000 0x10000000>; + }; //don't put other dts in front of logo_reserved //di_reserved:linux,di { @@ -84,13 +94,14 @@ /** 10x3133440=30M(0x1e) support 8bit **/ size = <0x2000000>; alignment = <0x400000>; + alloc-ranges = <0x30000000 0x10000000>; }; ion_reserved:linux,ion-dev { compatible = "shared-dma-pool"; reusable; size = <0x4C00000>; alignment = <0x400000>; - alloc-ranges = <0x0 0x2ee00000>; + alloc-ranges = <0x0 0x30000000>; }; /* vdin0 CMA pool */ @@ -109,6 +120,7 @@ /* 1920x1080x2x4 =16 M */ size = <0x01000000>; alignment = <0x400000>; + alloc-ranges = <0x0 0x30000000>; }; /* POST PROCESS MANAGER */ ppmgr_reserved:linux,ppmgr { @@ -116,15 +128,6 @@ size = <0x0>; }; - codec_mm_cma:linux,codec_mm_cma { - compatible = "shared-dma-pool"; - reusable; - /* ion_codec_mm max can alloc size 80M*/ - size = <0xd000000>; - alignment = <0x400000>; - linux,contiguous-region; - alloc-ranges = <0x12000000 0x13400000>; - }; picdec_cma_reserved:linux,picdec { compatible = "shared-dma-pool"; reusable; diff --git a/arch/arm/boot/dts/amlogic/gxl_p212_2g.dts b/arch/arm/boot/dts/amlogic/gxl_p212_2g.dts index fcfbb3911c41..927241897f91 100644 --- a/arch/arm/boot/dts/amlogic/gxl_p212_2g.dts +++ b/arch/arm/boot/dts/amlogic/gxl_p212_2g.dts @@ -99,7 +99,7 @@ reusable; size = <0x7C00000>; alignment = <0x400000>; - alloc-ranges = <0x0 0x2ee00000>; + alloc-ranges = <0x30000000 0x50000000>; }; /* vdin0 CMA pool */ @@ -132,7 +132,7 @@ size = <0x13400000>; alignment = <0x400000>; linux,contiguous-region; - alloc-ranges = <0x12000000 0x13400000>; + alloc-ranges = <0x30000000 0x50000000>; }; picdec_cma_reserved:linux,picdec { compatible = "shared-dma-pool"; diff --git a/arch/arm/boot/dts/amlogic/gxl_p230_2g.dts b/arch/arm/boot/dts/amlogic/gxl_p230_2g.dts index 3dc6b4f41ad9..dda52f1d35ce 100644 --- a/arch/arm/boot/dts/amlogic/gxl_p230_2g.dts +++ b/arch/arm/boot/dts/amlogic/gxl_p230_2g.dts @@ -99,7 +99,7 @@ reusable; size = <0x7C00000>; alignment = <0x400000>; - alloc-ranges = <0x0 0x2ee00000>; + alloc-ranges = <0x30000000 0x50000000>; }; /* vdin0 CMA pool */ @@ -132,7 +132,7 @@ size = <0x13400000>; alignment = <0x400000>; linux,contiguous-region; - alloc-ranges = <0x12000000 0x13400000>; + alloc-ranges = <0x30000000 0x50000000>; }; picdec_cma_reserved:linux,picdec { compatible = "shared-dma-pool"; diff --git a/arch/arm/boot/dts/amlogic/gxl_p241_1g.dts b/arch/arm/boot/dts/amlogic/gxl_p241_1g.dts index a69c391bf60f..b7ac075b6f2e 100644 --- a/arch/arm/boot/dts/amlogic/gxl_p241_1g.dts +++ b/arch/arm/boot/dts/amlogic/gxl_p241_1g.dts @@ -79,6 +79,15 @@ alignment = <0x400000>; alloc-ranges = <0x3fc00000 0x400000>; }; + codec_mm_cma:linux,codec_mm_cma { + compatible = "shared-dma-pool"; + reusable; + /* ion_codec_mm max can alloc size 80M*/ + size = <0xd000000>; + alignment = <0x400000>; + linux,contiguous-region; + alloc-ranges = <0x30000000 0x10000000>; + }; //don't put other dts in front of logo_reserved //di_reserved:linux,di { @@ -96,13 +105,14 @@ /** 10x4074560=39M(0x27) support 10bit **/ size = <0x02400000>; alignment = <0x400000>; + alloc-ranges = <0x30000000 0x10000000>; }; ion_reserved:linux,ion-dev { compatible = "shared-dma-pool"; reusable; size = <0x4C00000>; alignment = <0x400000>; - alloc-ranges = <0x0 0x2ee00000>; + alloc-ranges = <0x0 0x30000000>; }; /* vdin0 CMA pool */ @@ -121,6 +131,7 @@ /* 1920x1080x2x4 =16 M */ size = <0x01000000>; alignment = <0x400000>; + alloc-ranges = <0x0 0x30000000>; }; /* POST PROCESS MANAGER */ ppmgr_reserved:linux,ppmgr { @@ -129,15 +140,6 @@ multi-use; }; - codec_mm_cma:linux,codec_mm_cma { - compatible = "shared-dma-pool"; - reusable; - /* ion_codec_mm max can alloc size 80M*/ - size = <0xd000000>; - alignment = <0x400000>; - linux,contiguous-region; - alloc-ranges = <0x12000000 0x13400000>; - }; picdec_cma_reserved:linux,picdec { compatible = "shared-dma-pool"; reusable; diff --git a/arch/arm/boot/dts/amlogic/gxl_p241_v2-1g.dts b/arch/arm/boot/dts/amlogic/gxl_p241_v2-1g.dts index eeb5267261a5..0380e400c67d 100644 --- a/arch/arm/boot/dts/amlogic/gxl_p241_v2-1g.dts +++ b/arch/arm/boot/dts/amlogic/gxl_p241_v2-1g.dts @@ -79,6 +79,16 @@ alignment = <0x400000>; alloc-ranges = <0x3fc00000 0x400000>; }; + + codec_mm_cma:linux,codec_mm_cma { + compatible = "shared-dma-pool"; + reusable; + /* ion_codec_mm max can alloc size 80M*/ + size = <0xd000000>; + alignment = <0x400000>; + linux,contiguous-region; + alloc-ranges = <0x30000000 0x10000000>; + }; //don't put other dts in front of logo_reserved //di_reserved:linux,di { @@ -96,13 +106,14 @@ /** 10x4074560=39M(0x27) support 10bit **/ size = <0x02400000>; alignment = <0x400000>; + alloc-ranges = <0x30000000 0x10000000>; }; ion_reserved:linux,ion-dev { compatible = "shared-dma-pool"; reusable; size = <0x4C00000>; alignment = <0x400000>; - alloc-ranges = <0x0 0x2ee00000>; + alloc-ranges = <0x0 0x30000000>; }; /* vdin0 CMA pool */ @@ -121,6 +132,7 @@ /* 1920x1080x2x4 =16 M */ size = <0x01000000>; alignment = <0x400000>; + alloc-ranges = <0x0 0x30000000>; }; /* POST PROCESS MANAGER */ ppmgr_reserved:linux,ppmgr { @@ -128,16 +140,6 @@ size = <0x0>; multi-use; }; - - codec_mm_cma:linux,codec_mm_cma { - compatible = "shared-dma-pool"; - reusable; - /* ion_codec_mm max can alloc size 80M*/ - size = <0xd000000>; - alignment = <0x400000>; - linux,contiguous-region; - alloc-ranges = <0x12000000 0x13400000>; - }; picdec_cma_reserved:linux,picdec { compatible = "shared-dma-pool"; reusable; diff --git a/arch/arm/boot/dts/amlogic/tl1_pxp.dts b/arch/arm/boot/dts/amlogic/tl1_pxp.dts index d32721920de4..2df2461aae66 100644 --- a/arch/arm/boot/dts/amlogic/tl1_pxp.dts +++ b/arch/arm/boot/dts/amlogic/tl1_pxp.dts @@ -34,7 +34,7 @@ memory@00000000 { device_type = "memory"; - linux,usable-memory = <0x100000 0x7ff00000>; + linux,usable-memory = <0x000000 0x80000000>; }; reserved-memory { @@ -57,7 +57,7 @@ size = <0x13400000>; alignment = <0x400000>; linux,contiguous-region; - alloc-ranges = <0x12000000 0x13400000>; + alloc-ranges = <0x30000000 0x50000000>; }; /* codec shared reserved */ @@ -109,7 +109,7 @@ /* 2M-30M for emp or tmds to ddr */ size = <0x01e00000>; alignment = <0x10000>; - alloc-ranges = <0x00200000 0x01e00000>; + alloc-ranges = <0x30000000 0x50000000>; }; }; /* end of reserved-memory */ diff --git a/arch/arm/boot/dts/amlogic/txl_t962_p321.dts b/arch/arm/boot/dts/amlogic/txl_t962_p321.dts index fce14f4110cb..4bdf240e89a5 100644 --- a/arch/arm/boot/dts/amlogic/txl_t962_p321.dts +++ b/arch/arm/boot/dts/amlogic/txl_t962_p321.dts @@ -78,13 +78,24 @@ alloc-ranges = <0x3f800000 0x800000>; }; + codec_mm_cma:linux,codec_mm_cma { + compatible = "shared-dma-pool"; + reusable; + /* ion_codec_mm max can alloc size 80M*/ + size = <0xd000000>; + alignment = <0x400000>; + linux,contiguous-region; + /** alloc by self **/ + alloc-ranges = <0x30000000 0x10000000>; + }; + ion_reserved:linux,ion-dev { compatible = "shared-dma-pool"; reusable; size = <0x4C00000>; alignment = <0x400000>; /* alloc by self */ - alloc-ranges = <0x0 0x2ee00000>; + alloc-ranges = <0x0 0x30000000>; }; /*di CMA pool */ @@ -100,25 +111,13 @@ */ size = <0x02800000>; alignment = <0x400000>; - alloc-ranges = <0x32000000 0xc800000>; + alloc-ranges = <0x30000000 0x10000000>; }; /* POST PROCESS MANAGER */ ppmgr_reserved:linux,ppmgr { compatible = "amlogic, ppmgr_memory"; size = <0x0>; - alloc-ranges = <0x32000000 0xc800000>; - }; - - codec_mm_cma:linux,codec_mm_cma { - compatible = "shared-dma-pool"; - reusable; - /* ion_codec_mm max can alloc size 80M*/ - size = <0xd000000>; - alignment = <0x400000>; - linux,contiguous-region; - /** alloc by self **/ - alloc-ranges = <0x0 0x2ee00000>; }; picdec_cma_reserved:linux,picdec { @@ -127,7 +126,6 @@ size = <0x0>; alignment = <0x0>; linux,contiguous-region; - alloc-ranges = <0x32000000 0xc800000>; }; /* codec shared reserved */ @@ -144,7 +142,7 @@ /* 5M */ size = <0x0800000>; alignment = <0x400000>; - alloc-ranges = <0x32000000 0xc800000>; + alloc-ranges = <0x00000000 0x30000000>; }; /* vdin1 CMA pool */ @@ -155,7 +153,7 @@ size = <0x01000000>; alignment = <0x400000>; /** alloc by self **/ - alloc-ranges = <0x32000000 0xc800000>; + alloc-ranges = <0x00000000 0x30000000>; }; }; /* end of reserved-memory */ diff --git a/arch/arm/boot/dts/amlogic/txl_t962_p321_720p.dts b/arch/arm/boot/dts/amlogic/txl_t962_p321_720p.dts index dc8a04820aba..e71d7ebe1740 100644 --- a/arch/arm/boot/dts/amlogic/txl_t962_p321_720p.dts +++ b/arch/arm/boot/dts/amlogic/txl_t962_p321_720p.dts @@ -75,8 +75,19 @@ reusable; size = <0x400000>; alignment = <0x400000>; - alloc-ranges = <0x3fc00000 0x400000>; + alloc-ranges = <0x0 0x30000000>; }; + codec_mm_cma:linux,codec_mm_cma { + compatible = "shared-dma-pool"; + reusable; + /* ion_codec_mm max can alloc size 80M*/ + size = <0xd000000>; + alignment = <0x400000>; + linux,contiguous-region; + /** alloc by self **/ + alloc-ranges = <0x30000000 0x10000000>; + }; + ion_reserved:linux,ion-dev { compatible = "shared-dma-pool"; @@ -84,7 +95,7 @@ size = <0x4C00000>; alignment = <0x400000>; /* alloc by self */ - alloc-ranges = <0x0 0x2ee00000>; + alloc-ranges = <0x0 0x30000000>; }; /*di CMA pool */ @@ -100,25 +111,13 @@ */ size = <0x02800000>; alignment = <0x400000>; - alloc-ranges = <0x32000000 0xc800000>; + alloc-ranges = <0x30000000 0x10000000>; }; /* POST PROCESS MANAGER */ ppmgr_reserved:linux,ppmgr { compatible = "amlogic, ppmgr_memory"; size = <0x0>; - alloc-ranges = <0x32000000 0xc800000>; - }; - - codec_mm_cma:linux,codec_mm_cma { - compatible = "shared-dma-pool"; - reusable; - /* ion_codec_mm max can alloc size 80M*/ - size = <0xd000000>; - alignment = <0x400000>; - linux,contiguous-region; - /** alloc by self **/ - alloc-ranges = <0x0 0x2ee00000>; }; picdec_cma_reserved:linux,picdec { @@ -127,7 +126,6 @@ size = <0x0>; alignment = <0x0>; linux,contiguous-region; - alloc-ranges = <0x32000000 0xc800000>; }; /* codec shared reserved */ @@ -144,7 +142,7 @@ /* 5M */ size = <0x0800000>; alignment = <0x400000>; - alloc-ranges = <0x32000000 0xc800000>; + alloc-ranges = <0x0 0x30000000>; }; /* vdin1 CMA pool */ @@ -155,7 +153,7 @@ size = <0x01000000>; alignment = <0x400000>; /** alloc by self **/ - alloc-ranges = <0x32000000 0xc800000>; + alloc-ranges = <0x0 0x30000000>; }; }; /* end of reserved-memory */ diff --git a/arch/arm/boot/dts/amlogic/txlx_t962e_r321.dts b/arch/arm/boot/dts/amlogic/txlx_t962e_r321.dts index 97ea55a3da26..8340c0d7eeb6 100644 --- a/arch/arm/boot/dts/amlogic/txlx_t962e_r321.dts +++ b/arch/arm/boot/dts/amlogic/txlx_t962e_r321.dts @@ -45,7 +45,7 @@ memory@00000000 { device_type = "memory"; - linux,usable-memory = <0x100000 0x7ff00000>; + linux,usable-memory = <0x000000 0x80000000>; }; reserved-memory { diff --git a/arch/arm/boot/dts/amlogic/txlx_t962x_r311_1g.dts b/arch/arm/boot/dts/amlogic/txlx_t962x_r311_1g.dts index d75970534893..26e2416724ad 100644 --- a/arch/arm/boot/dts/amlogic/txlx_t962x_r311_1g.dts +++ b/arch/arm/boot/dts/amlogic/txlx_t962x_r311_1g.dts @@ -46,7 +46,7 @@ memory@00000000 { device_type = "memory"; - linux,usable-memory = <0x100000 0x3ff00000>; + linux,usable-memory = <0x000000 0x40000000>; }; reserved-memory { @@ -92,12 +92,22 @@ // size = <0x0 0x1000>; //}; + + codec_mm_cma:linux,codec_mm_cma { + compatible = "shared-dma-pool"; + reusable; + /* ion_codec_mm max can alloc size 80M*/ + size = <0xd000000>; + alignment = <0x400000>; + linux,contiguous-region; + alloc-ranges = <0x30000000 0x10000000>; + }; ion_reserved:linux,ion-dev { compatible = "shared-dma-pool"; reusable; size = <0x4C00000>; alignment = <0x400000>; - alloc-ranges = <0x0 0x2ee00000>; + alloc-ranges = <0x0 0x30000000>; }; /*di CMA pool */ @@ -113,6 +123,7 @@ */ size = <0x02800000>; alignment = <0x400000>; + alloc-ranges = <0x30000000 0x10000000>; }; /* POST PROCESS MANAGER */ @@ -121,16 +132,6 @@ size = <0x0>; }; - codec_mm_cma:linux,codec_mm_cma { - compatible = "shared-dma-pool"; - reusable; - /* ion_codec_mm max can alloc size 80M*/ - size = <0xd000000>; - alignment = <0x400000>; - linux,contiguous-region; - alloc-ranges = <0x12000000 0x13400000>; - }; - picdec_cma_reserved:linux,picdec { compatible = "shared-dma-pool"; reusable; @@ -153,6 +154,7 @@ /* 5M */ size = <0x0800000>; alignment = <0x400000>; + alloc-ranges = <0x0 0x30000000>; }; /* vdin1 CMA pool */ @@ -163,6 +165,7 @@ /* 1920x1080x2x4 =16+4 M */ size = <0x01400000>; alignment = <0x400000>; + alloc-ranges = <0x0 0x30000000>; }; /*vbi reserved mem*/ diff --git a/arch/arm/boot/dts/amlogic/txlx_t962x_r311_2g.dts b/arch/arm/boot/dts/amlogic/txlx_t962x_r311_2g.dts index 95164b3a9933..814f0b5782ef 100644 --- a/arch/arm/boot/dts/amlogic/txlx_t962x_r311_2g.dts +++ b/arch/arm/boot/dts/amlogic/txlx_t962x_r311_2g.dts @@ -46,7 +46,7 @@ memory@00000000 { device_type = "memory"; - linux,usable-memory = <0x100000 0x7ff00000>; + linux,usable-memory = <0x000000 0x80000000>; }; reserved-memory { @@ -97,7 +97,7 @@ reusable; size = <0x7C00000>; alignment = <0x400000>; - alloc-ranges = <0x0 0x2ee00000>; + alloc-ranges = <0x30000000 0x50000000>; }; /*di CMA pool */ @@ -128,7 +128,7 @@ size = <0x13400000>; alignment = <0x400000>; linux,contiguous-region; - alloc-ranges = <0x12000000 0x13400000>; + alloc-ranges = <0x30000000 0x50000000>; }; picdec_cma_reserved:linux,picdec { diff --git a/arch/arm64/boot/dts/amlogic/txl_t962_p321_720p.dts b/arch/arm64/boot/dts/amlogic/txl_t962_p321_720p.dts old mode 100755 new mode 100644