dts: tv: optimize ion and codec_mm_cma usage [1/1]
authorLei Qian <lei.qian@amlogic.com>
Thu, 11 Oct 2018 07:22:06 +0000 (15:22 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Thu, 11 Oct 2018 14:24:02 +0000 (07:24 -0700)
PD#SWPL-334

Problem:
gfx graphics test fail caused by low memory

Solution:
enlarge ion and reduce codec_mm_cma

Verify:
verified by p321

Change-Id: I8dc3bfa35a4093199291f21ed0c80ce51e38ea81
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
arch/arm/boot/dts/amlogic/txl_t962_p321.dts
arch/arm64/boot/dts/amlogic/txl_t962_p321.dts
arch/arm64/boot/dts/amlogic/txlx_t962x_r311_720p.dts

index 0c6a3c9..6d54c5f 100644 (file)
                ion_reserved:linux,ion-dev {
                        compatible = "shared-dma-pool";
                        reusable;
-                       /* if no direct render, ion size = fb0_size x 3 + fb1_size + 4 M */
-                       size = <0x2400000>;
+                       size = <0x7400000>;
                        alignment = <0x400000>;
                        /* alloc by self */
                        alloc-ranges = <0x0 0x2ee00000>;
                };
 
-               codec_mm_cma:linux,codec_mm_cma {
-                       compatible = "shared-dma-pool";
-                       reusable;
-                       /* ion_codec_mm max can alloc size 80M*/
-                       size = <0x13400000>;
-                       alignment = <0x400000>;
-                       linux,contiguous-region;
-                       /** alloc by self **/
-                       alloc-ranges = <0x0 0x2ee00000>;
-               };
-
-               /* codec shared reserved */
-               codec_mm_reserved:linux,codec_mm_reserved {
-                       compatible = "amlogic, codec-mm-reserved";
-                       size = <0x0>;
-                       alignment = <0x100000>;
-                       //no-map;
-               };
-
-               //di_reserved:linux,di {
-                       //compatible = "amlogic, di-mem";
-                       /* buffer_size = 3621952(yuv422 8bit) */
-                       /* 4179008(yuv422 10bit full pack mode) */
-                       /** 10x3621952=34.6M(0x23) support 8bit **/
-                       /** 10x4736064=45.2M(0x2e) support 12bit **/
-                       /** 10x4179008=40M(0x28) support 10bit **/
-                       //size = <0x2800000>;
-                       //no-map;
-               //};
-
                /*di CMA pool */
                di_cma_reserved:linux,di_cma {
                        compatible = "shared-dma-pool";
                        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 = <0xc000000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+                       /** alloc by self **/
+                       alloc-ranges = <0x0 0x2ee00000>;
+               };
+
                picdec_cma_reserved:linux,picdec {
                        compatible = "shared-dma-pool";
                        reusable;
                        alloc-ranges = <0x32000000 0xc800000>;
                };
 
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+
                demod_cma_reserved:linux,demod_cma {
                        compatible = "shared-dma-pool";
                        reusable;
                        compatible = "shared-dma-pool";
                        reusable;
                        /* 1920x1080x2x4  =16 M */
-                       size = <0x04000000>;
+                       size = <0x01000000>;
                        alignment = <0x400000>;
                        /** alloc by self **/
                        alloc-ranges = <0x32000000 0xc800000>;
index 08d3550..d405243 100644 (file)
                ion_reserved:linux,ion-dev {
                        compatible = "shared-dma-pool";
                        reusable;
-                       // if no direct render, ion size = fb0_size x 3 + fb1_size + 4 M
-                       size = <0x0 0x2400000>;
+                       size = <0x0 0x7400000>;
                        alignment = <0x0 0x400000>;
                };
 
-               codec_mm_cma:linux,codec_mm_cma {
-                       compatible = "shared-dma-pool";
-                       reusable;
-                       /* ion_codec_mm max can alloc size 80M*/
-                       size = <0x0 0x13400000>;
-                       alignment = <0x0 0x400000>;
-                       linux,contiguous-region;
-               };
-
-               /* codec shared reserved */
-               codec_mm_reserved:linux,codec_mm_reserved {
-                       compatible = "amlogic, codec-mm-reserved";
-                       size = <0x0 0x0>;
-                       alignment = <0x0 0x100000>;
-                       //no-map;
-               };
-
-               //di_reserved:linux,di {
-                       //compatible = "amlogic, di-mem";
-                       /* buffer_size = 3621952(yuv422 8bit) */
-                       /* 4179008(yuv422 10bit full pack mode) */
-                       /** 10x3621952=34.6M(0x23) support 8bit **/
-                       /** 10x4736064=45.2M(0x2e) support 12bit **/
-                       /** 10x4179008=40M(0x28) support 10bit **/
-                       //size = <0x0 0x2800000>;
-                       //no-map;
-               //};
-
                /*di CMA pool */
                di_cma_reserved:linux,di_cma {
                        compatible = "shared-dma-pool";
                        size = <0x0 0x0>;
                };
 
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x0 0xc000000>;
+                       alignment = <0x0 0x400000>;
+                       linux,contiguous-region;
+               };
+
                picdec_cma_reserved:linux,picdec {
                        compatible = "shared-dma-pool";
                        reusable;
                        linux,contiguous-region;
                };
 
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0 0x0>;
+                       alignment = <0x0 0x100000>;
+                       //no-map;
+               };
+
                demod_cma_reserved:linux,demod_cma {
                        compatible = "shared-dma-pool";
                        reusable;
                        compatible = "shared-dma-pool";
                        reusable;
                        /* 1920x1080x2x4  =16 M */
-                       size = <0x0 0x04000000>;
+                       size = <0x0 0x01000000>;
                        alignment = <0x0 0x400000>;
                };
        }; /* end of reserved-memory */
index c6e9fdd..43419ff 100644 (file)
@@ -95,7 +95,7 @@
                ion_reserved:linux,ion-dev {
                        compatible = "shared-dma-pool";
                        reusable;
-                       size = <0x0 0x2000000>;
+                       size = <0x0 0x6400000>;
                        alignment = <0x0 0x400000>;
                };
 
                        compatible = "shared-dma-pool";
                        reusable;
                        /* ion_codec_mm max can alloc size 80M*/
-                       size = <0x0 0x11000000>;
+                       size = <0x0 0xc000000>;
                        alignment = <0x0 0x400000>;
                        linux,contiguous-region;
                };
                compatible = "amlogic, vbi";
                memory-region = <&vbi_reserved>;
                dev_name = "vbi";
-               status = "disabled";
+               status = "okay";
                interrupts = <0 83 1>;
                reserve-iomap = "true";
        };