dts: add video11 and video12 for screenrecord [2/6]
authorliangzhuo.xie <liangzhuo.xie@amlogic.com>
Fri, 23 Nov 2018 02:36:11 +0000 (10:36 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Wed, 12 Dec 2018 07:39:56 +0000 (23:39 -0800)
PD#SWPL-209

Problem:
add screenrecord function

Solution:
add video11 and video12 for screenrecord

Verify:
verify by t962_p321

Change-Id: I0d33d9d01704b6fe6e5c7dbeccb1fb2be68904b3
Signed-off-by: liangzhuo.xie <liangzhuo.xie@amlogic.com>
arch/arm/boot/dts/amlogic/txl_t962_p321.dts
arch/arm/boot/dts/amlogic/txl_t962_p321_720p.dts
arch/arm64/boot/dts/amlogic/txl_t962_p321.dts
arch/arm64/boot/dts/amlogic/txl_t962_p321_720p.dts
drivers/amlogic/media/video_processor/video_dev/amlvideo2.c

index 9662a7a..5dea093 100644 (file)
                status = "okay";
        };
 
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
        hdmirx {
                compatible = "amlogic, hdmirx-txl";
                status = "okay";
index 068fa91..6e2a67f 100644 (file)
                status = "okay";
        };
 
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
        hdmirx {
                compatible = "amlogic, hdmirx-txl";
                status = "okay";
        memory-region = <&defendkey_reserved>;
        status = "okay";
 };
-
index 5745eeb..61638c8 100644 (file)
                status = "okay";
        };
 
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
        hdmirx {
                compatible = "amlogic, hdmirx-txl";
                status = "okay";
index 439619b..95766b7 100644 (file)
                status = "okay";
        };
 
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
        hdmirx {
                compatible = "amlogic, hdmirx-txl";
                status = "okay";
index 8a58211..05e1c34 100644 (file)
@@ -77,7 +77,8 @@
 /* #define USE_SEMA_QBUF */
 /* #define USE_VDIN_PTS */
 
-/* #define MULTI_NODE */
+#define MULTI_NODE
+
 #ifdef MULTI_NODE
 #define MAX_SUB_DEV_NODE 2
 #else
@@ -4647,8 +4648,8 @@ static int vidiocgmbuf(struct file *file, void *priv, struct video_mbuf *mbuf)
 #ifdef PREVIOUS_VOUT_MODE
 static enum tvin_scan_mode_e vmode2scan_mode(enum vmode_e mode)
 {
-       enum tvin_scan_mode_e scan_mode =
-               TVIN_SCAN_MODE_NULL;/* 1: progressive 2:interlaced */
+       enum tvin_scan_mode_e scan_mode = TVIN_SCAN_MODE_PROGRESSIVE;
+               //TVIN_SCAN_MODE_NULL;/* 1: progressive 2:interlaced */
 
        switch (mode) {
        case VMODE_480I:
@@ -5353,7 +5354,7 @@ int amlvideo2_cma_buf_init(struct amlvideo2_device *vid_dev,  int node_id)
                                return -1;
                        }
                } else {
-                       flags = CODEC_MM_FLAGS_DMA |
+                       flags = CODEC_MM_FLAGS_DMA_CPU|
                                CODEC_MM_FLAGS_CMA_CLEAR;
                        if (node_id == 0) {
                                if (vid_dev->node[node_id]->