From c804280222a08b37ed0217edb830b14b392fcc85 Mon Sep 17 00:00:00 2001 From: "liangzhuo.xie" Date: Fri, 23 Nov 2018 10:36:11 +0800 Subject: [PATCH] dts: add video11 and video12 for screenrecord [2/6] 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 --- arch/arm/boot/dts/amlogic/txl_t962_p321.dts | 16 ++++++++++++++++ arch/arm/boot/dts/amlogic/txl_t962_p321_720p.dts | 17 ++++++++++++++++- arch/arm64/boot/dts/amlogic/txl_t962_p321.dts | 16 ++++++++++++++++ arch/arm64/boot/dts/amlogic/txl_t962_p321_720p.dts | 16 ++++++++++++++++ .../amlogic/media/video_processor/video_dev/amlvideo2.c | 9 +++++---- 5 files changed, 69 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/amlogic/txl_t962_p321.dts b/arch/arm/boot/dts/amlogic/txl_t962_p321.dts index 9662a7a..5dea093 100644 --- a/arch/arm/boot/dts/amlogic/txl_t962_p321.dts +++ b/arch/arm/boot/dts/amlogic/txl_t962_p321.dts @@ -280,6 +280,22 @@ 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"; 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 068fa91..6e2a67f 100644 --- a/arch/arm/boot/dts/amlogic/txl_t962_p321_720p.dts +++ b/arch/arm/boot/dts/amlogic/txl_t962_p321_720p.dts @@ -280,6 +280,22 @@ 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"; @@ -1185,4 +1201,3 @@ memory-region = <&defendkey_reserved>; status = "okay"; }; - diff --git a/arch/arm64/boot/dts/amlogic/txl_t962_p321.dts b/arch/arm64/boot/dts/amlogic/txl_t962_p321.dts index 5745eeb..61638c8 100644 --- a/arch/arm64/boot/dts/amlogic/txl_t962_p321.dts +++ b/arch/arm64/boot/dts/amlogic/txl_t962_p321.dts @@ -272,6 +272,22 @@ 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"; diff --git a/arch/arm64/boot/dts/amlogic/txl_t962_p321_720p.dts b/arch/arm64/boot/dts/amlogic/txl_t962_p321_720p.dts index 439619b..95766b7 100644 --- a/arch/arm64/boot/dts/amlogic/txl_t962_p321_720p.dts +++ b/arch/arm64/boot/dts/amlogic/txl_t962_p321_720p.dts @@ -272,6 +272,22 @@ 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"; diff --git a/drivers/amlogic/media/video_processor/video_dev/amlvideo2.c b/drivers/amlogic/media/video_processor/video_dev/amlvideo2.c index 8a58211..05e1c34 100644 --- a/drivers/amlogic/media/video_processor/video_dev/amlvideo2.c +++ b/drivers/amlogic/media/video_processor/video_dev/amlvideo2.c @@ -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]-> -- 2.7.4