Skip to contentSkip to conversation

ARM: dts: sun8i: v3s: Enable video decoder

PATCH Superseded Martin Cerveny 5 participants 17 messages Sep 12, 2020 – Nov 16, 2020

Subsystems (5)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover ARM: dts: sun8i: v3s: Enable video decoder

First patch extends cedrus capability to all decoders because V3s missing MPEG2 decoder.

Next two patches add system control node (SRAM C1) and next three patches add support for Cedrus VPU.

Tested on "Lichee Zero" V3s platform with testing LCD patch ( https://github.com/mcerveny/linux/tree/v3s_videocodec_v4 ) and V4L2 raw API testing utility
( https://github.com/mcerveny/v4l2-request-test ):
- enabled LCD (DRM dual VI and sigle UI planes)
- added RGB panel
- enabled PWM

There is low memory on V3s (64MB) and maximum must be available to CMA:
- CONFIG_CMA_SIZE_MBYTES=28
- add swap to swapout other processes
- decrease buffers in v4l2-request-test (.buffers_count from 16 to 6)

Only H.264 decoder working - MPEG and H.265 unsupported by V3s, JPEG/MJPEG still unimplemented, encoder unimplemented

best regards,
Martin

Changes since v1:
- patch 0005 rename
- added testing description

Martin Cerveny (6):
media: cedrus: Register all codecs as capability
dt-bindings: sram: allwinner,sun4i-a10-system-control: Add V3s
compatibles
ARM: dts: sun8i: v3s: Add node for system control
media: cedrus: Add support for V3s
dt-bindings: media: cedrus: Add V3s compatible
ARM: dts: sun8i: v3s: Add video engine node

 .../allwinner,sun4i-a10-video-engine.yaml     |  1 +
 .../allwinner,sun4i-a10-system-control.yaml   |  6 ++++
 arch/arm/boot/dts/sun8i-v3s.dtsi              | 33 +++++++++++++++++++
 drivers/staging/media/sunxi/cedrus/cedrus.c   | 28 +++++++++++++++-
 drivers/staging/media/sunxi/cedrus/cedrus.h   |  2 ++
 .../staging/media/sunxi/cedrus/cedrus_video.c |  2 ++
 6 files changed, 71 insertions(+), 1 deletion(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/6 media: cedrus: Register all codecs as capability

All codecs should have capabilities.
For example "Allwinner V3s" does not support "MPEG2".

---
 drivers/staging/media/sunxi/cedrus/cedrus.c    | 18 +++++++++++++++++-
 drivers/staging/media/sunxi/cedrus/cedrus.h    |  2 ++
 .../staging/media/sunxi/cedrus/cedrus_video.c  |  2 ++
 3 files changed, 21 insertions(+), 1 deletion(-)
drivers/staging/media/sunxi/cedrus/cedrus.c +17 -1
index 7c6b91f0e780..ae7e154eca9f 100644
@@ -479,42 +479,58 @@ static int cedrus_remove(struct platform_device *pdev)
 }
 
 static const struct cedrus_variant sun4i_a10_cedrus_variant = {
+	.capabilities	= CEDRUS_CAPABILITY_MPEG2_DEC |
+			  CEDRUS_CAPABILITY_H264_DEC,
 	.mod_rate	= 320000000,
 };
 
 static const struct cedrus_variant sun5i_a13_cedrus_variant = {
+	.capabilities	= CEDRUS_CAPABILITY_MPEG2_DEC |
+			  CEDRUS_CAPABILITY_H264_DEC,
 	.mod_rate	= 320000000,
 };
 
 static const struct cedrus_variant sun7i_a20_cedrus_variant = {
+	.capabilities	= CEDRUS_CAPABILITY_MPEG2_DEC |
+			  CEDRUS_CAPABILITY_H264_DEC,
 	.mod_rate	= 320000000,
 };
 
 static const struct cedrus_variant sun8i_a33_cedrus_variant = {
-	.capabilities	= CEDRUS_CAPABILITY_UNTILED,
+	.capabilities	= CEDRUS_CAPABILITY_UNTILED |
+			  CEDRUS_CAPABILITY_MPEG2_DEC |
+			  CEDRUS_CAPABILITY_H264_DEC,
 	.mod_rate	= 320000000,
 };
 
 static const struct cedrus_variant sun8i_h3_cedrus_variant = {
 	.capabilities	= CEDRUS_CAPABILITY_UNTILED |
+			  CEDRUS_CAPABILITY_MPEG2_DEC |
+			  CEDRUS_CAPABILITY_H264_DEC |
 			  CEDRUS_CAPABILITY_H265_DEC,
 	.mod_rate	= 402000000,
 };
 
 static const struct cedrus_variant sun50i_a64_cedrus_variant = {
 	.capabilities	= CEDRUS_CAPABILITY_UNTILED |
+			  CEDRUS_CAPABILITY_MPEG2_DEC |
+			  CEDRUS_CAPABILITY_H264_DEC |
 			  CEDRUS_CAPABILITY_H265_DEC,
 	.mod_rate	= 402000000,
 };
 
 static const struct cedrus_variant sun50i_h5_cedrus_variant = {
 	.capabilities	= CEDRUS_CAPABILITY_UNTILED |
+			  CEDRUS_CAPABILITY_MPEG2_DEC |
+			  CEDRUS_CAPABILITY_H264_DEC |
 			  CEDRUS_CAPABILITY_H265_DEC,
 	.mod_rate	= 402000000,
 };
 
 static const struct cedrus_variant sun50i_h6_cedrus_variant = {
 	.capabilities	= CEDRUS_CAPABILITY_UNTILED |
+			  CEDRUS_CAPABILITY_MPEG2_DEC |
+			  CEDRUS_CAPABILITY_H264_DEC |
 			  CEDRUS_CAPABILITY_H265_DEC,
 	.quirks		= CEDRUS_QUIRK_NO_DMA_OFFSET,
 	.mod_rate	= 600000000,
drivers/staging/media/sunxi/cedrus/cedrus.h +2 -0
index 96765555ab8a..b6032f40cde8 100644
@@ -28,6 +28,8 @@
 
 #define CEDRUS_CAPABILITY_UNTILED	BIT(0)
 #define CEDRUS_CAPABILITY_H265_DEC	BIT(1)
+#define CEDRUS_CAPABILITY_H264_DEC	BIT(2)
+#define CEDRUS_CAPABILITY_MPEG2_DEC	BIT(3)
 
 #define CEDRUS_QUIRK_NO_DMA_OFFSET	BIT(0)
 
drivers/staging/media/sunxi/cedrus/cedrus_video.c +2 -0
index 16d82309e7b6..cb4aca5be415 100644
@@ -38,10 +38,12 @@ static struct cedrus_format cedrus_formats[] = {
 	{
 		.pixelformat	= V4L2_PIX_FMT_MPEG2_SLICE,
 		.directions	= CEDRUS_DECODE_SRC,
+		.capabilities	= CEDRUS_CAPABILITY_MPEG2_DEC,
 	},
 	{
 		.pixelformat	= V4L2_PIX_FMT_H264_SLICE,
 		.directions	= CEDRUS_DECODE_SRC,
+		.capabilities	= CEDRUS_CAPABILITY_H264_DEC,
 	},
 	{
 		.pixelformat	= V4L2_PIX_FMT_HEVC_SLICE,
Signature · 1 line
2.17.1
#2 lore raw

PATCH v2 2/6 dt-bindings: sram: allwinner,sun4i-a10-system-control: Add V3s compatibles

In reply to Martin Cerveny

Allwinner V3s has system control similar to that in H3. Add compatibles for system control with SRAM C1 region.

---
 .../bindings/sram/allwinner,sun4i-a10-system-control.yaml   | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml +6 -0
index f5825935fd22..9577d6c1494a 100644
@@ -33,6 +33,9 @@ properties:
           - const: allwinner,sun4i-a10-system-control
       - const: allwinner,sun8i-a23-system-control
       - const: allwinner,sun8i-h3-system-control
+      - items:
+          - const: allwinner,sun8i-v3s-system-control
+          - const: allwinner,sun8i-h3-system-control
       - const: allwinner,sun50i-a64-sram-controller
         deprecated: true
       - const: allwinner,sun50i-a64-system-control
@@ -86,6 +89,9 @@ patternProperties:
               - items:
                   - const: allwinner,sun8i-h3-sram-c1
                   - const: allwinner,sun4i-a10-sram-c1
+              - items:
+                  - const: allwinner,sun8i-v3s-sram-c1
+                  - const: allwinner,sun4i-a10-sram-c1
               - items:
                   - const: allwinner,sun50i-a64-sram-c1
                   - const: allwinner,sun4i-a10-sram-c1
Signature · 1 line
2.17.1
maintainer Acked-by on v2 2/6
#3 lore raw

Re: [PATCH v2 2/6] dt-bindings: sram: allwinner, sun4i-a10-system-control: Add V3s compatibles

Quoted 8 lines · Martin Cerveny

Allwinner V3s has system control similar to that in H3. Add compatibles for system control with SRAM C1 region.

---
 .../bindings/sram/allwinner,sun4i-a10-system-control.yaml   | 6 ++++++
 1 file changed, 6 insertions(+)
#4 lore raw

PATCH v2 3/6 ARM: dts: sun8i: v3s: Add node for system control

In reply to Martin Cerveny

Allwinner V3s has system control and SRAM C1 region similar to H3.

---
 arch/arm/boot/dts/sun8i-v3s.dtsi | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
arch/arm/boot/dts/sun8i-v3s.dtsi +23 -0
index e5312869c0d2..3f18866fb37b 100644
@@ -138,6 +138,29 @@
 			};
 		};
 
+		syscon: system-control@1c00000 {
+			compatible = "allwinner,sun8i-v3s-system-control",
+				     "allwinner,sun8i-h3-system-control";
+			reg = <0x01c00000 0x1000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			sram_c: sram@1d00000 {
+				compatible = "mmio-sram";
+				reg = <0x01d00000 0x80000>;
+				#address-cells = <1>;
+				#size-cells = <1>;
+				ranges = <0 0x01d00000 0x80000>;
+
+				ve_sram: sram-section@0 {
+					compatible = "allwinner,sun8i-v3s-sram-c1",
+						     "allwinner,sun4i-a10-sram-c1";
+					reg = <0x000000 0x80000>;
+				};
+			};
+		};
+
 		tcon0: lcd-controller@1c0c000 {
 			compatible = "allwinner,sun8i-v3s-tcon";
 			reg = <0x01c0c000 0x1000>;
Signature · 1 line
2.17.1
#5 lore raw

PATCH v2 4/6 media: cedrus: Add support for V3s

In reply to Martin Cerveny

V3s video engine runs at lower speed and support video decoder for H.264 and JPEG/MJPEG only.

---
 drivers/staging/media/sunxi/cedrus/cedrus.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/staging/media/sunxi/cedrus/cedrus.c +10 -0
index ae7e154eca9f..79ec5e07b416 100644
@@ -511,6 +511,12 @@ static const struct cedrus_variant sun8i_h3_cedrus_variant = {
 	.mod_rate	= 402000000,
 };
 
+static const struct cedrus_variant sun8i_v3s_cedrus_variant = {
+	.capabilities	= CEDRUS_CAPABILITY_UNTILED |
+			  CEDRUS_CAPABILITY_H264_DEC,
+	.mod_rate	= 297000000,
+};
+
 static const struct cedrus_variant sun50i_a64_cedrus_variant = {
 	.capabilities	= CEDRUS_CAPABILITY_UNTILED |
 			  CEDRUS_CAPABILITY_MPEG2_DEC |
@@ -557,6 +563,10 @@ static const struct of_device_id cedrus_dt_match[] = {
 		.compatible = "allwinner,sun8i-h3-video-engine",
 		.data = &sun8i_h3_cedrus_variant,
 	},
+	{
+		.compatible = "allwinner,sun8i-v3s-video-engine",
+		.data = &sun8i_v3s_cedrus_variant,
+	},
 	{
 		.compatible = "allwinner,sun50i-a64-video-engine",
 		.data = &sun50i_a64_cedrus_variant,
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#6 lore raw

PATCH v2 5/6 dt-bindings: media: cedrus: Add V3s compatible

In reply to Martin Cerveny

Allwinner V3s SoC contains video engine. Add compatible for it.

---
 .../bindings/media/allwinner,sun4i-a10-video-engine.yaml         | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/media/allwinner,sun4i-a10-video-engine.yaml +1 -0
index 4cc1a670c986..08515c18cbb7 100644
@@ -18,6 +18,7 @@ properties:
       - allwinner,sun7i-a20-video-engine
       - allwinner,sun8i-a33-video-engine
       - allwinner,sun8i-h3-video-engine
+      - allwinner,sun8i-v3s-video-engine
       - allwinner,sun50i-a64-video-engine
       - allwinner,sun50i-h5-video-engine
       - allwinner,sun50i-h6-video-engine
Signature · 1 line
2.17.1
#8 lore raw

PATCH v2 6/6 ARM: dts: sun8i: v3s: Add video engine node

In reply to Martin Cerveny

Allwinner V3S SoC has a video engine.
Add a node for it.

---
 arch/arm/boot/dts/sun8i-v3s.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/sun8i-v3s.dtsi +10 -0
index 3f18866fb37b..3fb01dc1a9ba 100644
@@ -195,6 +195,16 @@
 			};
 		};
 
+		video-codec@1c0e000 {
+			compatible = "allwinner,sun8i-v3s-video-engine";
+			reg = <0x01c0e000 0x1000>;
+			clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>,
+				 <&ccu CLK_DRAM_VE>;
+			clock-names = "ahb", "mod", "ram";
+			resets = <&ccu RST_BUS_VE>;
+			interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
+			allwinner,sram = <&ve_sram 1>;
+		};
 
 		mmc0: mmc@1c0f000 {
 			compatible = "allwinner,sun7i-a20-mmc";
Signature · 1 line
2.17.1
#9 lore raw
In reply to Martin Cerveny

Maxime,

Are you OK with this series? It looks good to me.

Regards,

Hans

Quoted 46 lines · Martin Cerveny

First patch extends cedrus capability to all decoders because V3s missing MPEG2 decoder.

Next two patches add system control node (SRAM C1) and next three patches add support for Cedrus VPU.

Tested on "Lichee Zero" V3s platform with testing LCD patch ( https://github.com/mcerveny/linux/tree/v3s_videocodec_v4 ) and V4L2 raw API testing utility
( https://github.com/mcerveny/v4l2-request-test ):
- enabled LCD (DRM dual VI and sigle UI planes)
- added RGB panel
- enabled PWM

There is low memory on V3s (64MB) and maximum must be available to CMA:
- CONFIG_CMA_SIZE_MBYTES=28
- add swap to swapout other processes
- decrease buffers in v4l2-request-test (.buffers_count from 16 to 6)

Only H.264 decoder working - MPEG and H.265 unsupported by V3s, JPEG/MJPEG still unimplemented, encoder unimplemented

best regards,
Martin

Changes since v1:
- patch 0005 rename
- added testing description

Martin Cerveny (6):
media: cedrus: Register all codecs as capability
dt-bindings: sram: allwinner,sun4i-a10-system-control: Add V3s
compatibles
ARM: dts: sun8i: v3s: Add node for system control
media: cedrus: Add support for V3s
dt-bindings: media: cedrus: Add V3s compatible
ARM: dts: sun8i: v3s: Add video engine node

 .../allwinner,sun4i-a10-video-engine.yaml     |  1 +
 .../allwinner,sun4i-a10-system-control.yaml   |  6 ++++
 arch/arm/boot/dts/sun8i-v3s.dtsi              | 33 +++++++++++++++++++
 drivers/staging/media/sunxi/cedrus/cedrus.c   | 28 +++++++++++++++-
 drivers/staging/media/sunxi/cedrus/cedrus.h   |  2 ++
 .../staging/media/sunxi/cedrus/cedrus_video.c |  2 ++
 6 files changed, 71 insertions(+), 1 deletion(-)
#10 lore raw

Hi!

Quoted 3 lines · Hans Verkuil

Maxime,

Are you OK with this series? It looks good to me.

I am, you can take it. I'll merge the dt patches through arm-soc

Thanks!
Maxime

#11 lore raw
In reply to Martin Cerveny

Hi Martin,

Quoted 14 lines · Martin Cerveny

First patch extends cedrus capability to all decoders because V3s missing MPEG2 decoder.

Next two patches add system control node (SRAM C1) and next three patches add support for Cedrus VPU.

Tested on "Lichee Zero" V3s platform with testing LCD patch ( https://github.com/mcerveny/linux/tree/v3s_videocodec_v4 ) and V4L2 raw API testing utility
( https://github.com/mcerveny/v4l2-request-test ):
- enabled LCD (DRM dual VI and sigle UI planes)
- added RGB panel
- enabled PWM

Quoted 7 lines

There is low memory on V3s (64MB) and maximum must be available to CMA:
- CONFIG_CMA_SIZE_MBYTES=28
- add swap to swapout other processes
- decrease buffers in v4l2-request-test (.buffers_count from 16 to 6)

Only H.264 decoder working - MPEG and H.265 unsupported by V3s, JPEG/MJPEG still unimplemented, encoder unimplemented

When I tried to merged these patches I got merge conflicts.

Possibly due to other 5.10 changes, but certainly because of conflicts with patches from Jernej:

https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/

I've merged Jerne's patches and posted a PR for that:
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/

Can you rebase your patches on top of my branch that contains Jernej's patches?

https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=for-v5.11e

Once my PR is merged into the media_tree master I can take your rebased patches.

Regards,

Hans

Quoted 25 lines

best regards,
Martin

Changes since v1:
- patch 0005 rename
- added testing description

Martin Cerveny (6):
media: cedrus: Register all codecs as capability
dt-bindings: sram: allwinner,sun4i-a10-system-control: Add V3s
compatibles
ARM: dts: sun8i: v3s: Add node for system control
media: cedrus: Add support for V3s
dt-bindings: media: cedrus: Add V3s compatible
ARM: dts: sun8i: v3s: Add video engine node

 .../allwinner,sun4i-a10-video-engine.yaml     |  1 +
 .../allwinner,sun4i-a10-system-control.yaml   |  6 ++++
 arch/arm/boot/dts/sun8i-v3s.dtsi              | 33 +++++++++++++++++++
 drivers/staging/media/sunxi/cedrus/cedrus.c   | 28 +++++++++++++++-
 drivers/staging/media/sunxi/cedrus/cedrus.h   |  2 ++
 .../staging/media/sunxi/cedrus/cedrus_video.c |  2 ++
 6 files changed, 71 insertions(+), 1 deletion(-)
#12 lore raw

Hello.

Quoted 36 lines · Hans Verkuil

Hi Martin,

Quoted 14 lines · Martin Cerveny

First patch extends cedrus capability to all decoders because V3s missing MPEG2 decoder.

Next two patches add system control node (SRAM C1) and next three patches add support for Cedrus VPU.

Tested on "Lichee Zero" V3s platform with testing LCD patch ( https://github.com/mcerveny/linux/tree/v3s_videocodec_v4 ) and V4L2 raw API testing utility
( https://github.com/mcerveny/v4l2-request-test ):
- enabled LCD (DRM dual VI and sigle UI planes)
- added RGB panel
- enabled PWM

Quoted 7 lines

There is low memory on V3s (64MB) and maximum must be available to CMA:
- CONFIG_CMA_SIZE_MBYTES=28
- add swap to swapout other processes
- decrease buffers in v4l2-request-test (.buffers_count from 16 to 6)

Only H.264 decoder working - MPEG and H.265 unsupported by V3s, JPEG/MJPEG still unimplemented, encoder unimplemented

When I tried to merged these patches I got merge conflicts.

Possibly due to other 5.10 changes, but certainly because of conflicts with patches from Jernej:

https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/

I've merged Jerne's patches and posted a PR for that:
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/

Quoted 6 lines

Can you rebase your patches on top of my branch that contains Jernej's patches?

https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=for-v5.11e

Once my PR is merged into the media_tree master I can take your rebased patches.

I updated patches:
https://github.com/mcerveny/linux/tree/media_tree_for-v5.11e

BUT, commit (555 commits) for v5.10-1
https://github.com/torvalds/linux/commit/fd5c32d80884268a381ed0e67cccef0b3d37750b
disrupts usability of Cedrus H.264 (at least for my Allwinner V3s):

1) colors are disrupted

There are missing some initialization now.

If I use "5.9" compatible code
(last bisect good point https://github.com/torvalds/linux/commit/647412daeb454b6dad12a6c6961ab90aac9e5d29 ) then reboot (not power-off!) and use new code ( https://github.com/mcerveny/linux/tree/media_tree_for-v5.11e ) and colors are OK.

2) decoding of complex streams fails

( https://github.com/mcerveny/v4l2-request-test/tree/v5.10 )
- bbb-h264-all-i-32 - OK
- bbb-h264-32 - bad from frame 5
- bbb-h264-high-32 - bad from frame 6

best regards,
Martin

Quoted 13 lines
Quoted 13 lines

Changes since v1:
- patch 0005 rename
- added testing description

Martin Cerveny (6):
media: cedrus: Register all codecs as capability
dt-bindings: sram: allwinner,sun4i-a10-system-control: Add V3s
compatibles
ARM: dts: sun8i: v3s: Add node for system control
media: cedrus: Add support for V3s
dt-bindings: media: cedrus: Add V3s compatible
ARM: dts: sun8i: v3s: Add video engine node

Quoted 9 lines
Quoted 8 lines
 .../allwinner,sun4i-a10-video-engine.yaml     |  1 +
 .../allwinner,sun4i-a10-system-control.yaml   |  6 ++++
 arch/arm/boot/dts/sun8i-v3s.dtsi              | 33 +++++++++++++++++++
 drivers/staging/media/sunxi/cedrus/cedrus.c   | 28 +++++++++++++++-
 drivers/staging/media/sunxi/cedrus/cedrus.h   |  2 ++
 .../staging/media/sunxi/cedrus/cedrus_video.c |  2 ++
 6 files changed, 71 insertions(+), 1 deletion(-)

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#13 lore raw
Quoted 56 lines · Martin Cerveny

Hello.

Quoted 36 lines · Hans Verkuil

Hi Martin,

Quoted 14 lines · Martin Cerveny

First patch extends cedrus capability to all decoders because V3s missing MPEG2 decoder.

Next two patches add system control node (SRAM C1) and next three patches add support for Cedrus VPU.

Tested on "Lichee Zero" V3s platform with testing LCD patch ( https://github.com/mcerveny/linux/tree/v3s_videocodec_v4 ) and V4L2 raw API testing utility
( https://github.com/mcerveny/v4l2-request-test ):
- enabled LCD (DRM dual VI and sigle UI planes)
- added RGB panel
- enabled PWM

Quoted 7 lines

There is low memory on V3s (64MB) and maximum must be available to CMA:
- CONFIG_CMA_SIZE_MBYTES=28
- add swap to swapout other processes
- decrease buffers in v4l2-request-test (.buffers_count from 16 to 6)

Only H.264 decoder working - MPEG and H.265 unsupported by V3s, JPEG/MJPEG still unimplemented, encoder unimplemented

When I tried to merged these patches I got merge conflicts.

Possibly due to other 5.10 changes, but certainly because of conflicts with patches from Jernej:

https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/

I've merged Jerne's patches and posted a PR for that:
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/

Quoted 6 lines

Can you rebase your patches on top of my branch that contains Jernej's patches?

https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=for-v5.11e

Once my PR is merged into the media_tree master I can take your rebased patches.

I updated patches:
https://github.com/mcerveny/linux/tree/media_tree_for-v5.11e

BUT, commit (555 commits) for v5.10-1
https://github.com/torvalds/linux/commit/fd5c32d80884268a381ed0e67cccef0b3d37750b
disrupts usability of Cedrus H.264 (at least for my Allwinner V3s):

1) colors are disrupted

Quoted 7 lines

There are missing some initialization now.

If I use "5.9" compatible code
(last bisect good point https://github.com/torvalds/linux/commit/647412daeb454b6dad12a6c6961ab90aac9e5d29 ) then reboot (not power-off!) and use new code
( https://github.com/mcerveny/linux/tree/media_tree_for-v5.11e )
and colors are OK.

Could this or the next issue be related to this bug fix?

https://git.linuxtv.org/media_tree.git/commit/?h=fixes&id=9ac924b98728c3733c91c6c59fc410827d0da49f

That fix isn't yet in our master tree.

Quoted 7 lines

2) decoding of complex streams fails

( https://github.com/mcerveny/v4l2-request-test/tree/v5.10 )
- bbb-h264-all-i-32 - OK
- bbb-h264-32 - bad from frame 5
- bbb-h264-high-32 - bad from frame 6

I think cedrus devs need to take a look at these issues.

Regards,

Hans

Quoted 26 lines

best regards,
Martin

Quoted 22 lines
Quoted 21 lines

Changes since v1:
- patch 0005 rename
- added testing description

Martin Cerveny (6):
media: cedrus: Register all codecs as capability
dt-bindings: sram: allwinner,sun4i-a10-system-control: Add V3s
compatibles
ARM: dts: sun8i: v3s: Add node for system control
media: cedrus: Add support for V3s
dt-bindings: media: cedrus: Add V3s compatible
ARM: dts: sun8i: v3s: Add video engine node

 .../allwinner,sun4i-a10-video-engine.yaml     |  1 +
 .../allwinner,sun4i-a10-system-control.yaml   |  6 ++++
 arch/arm/boot/dts/sun8i-v3s.dtsi              | 33 +++++++++++++++++++
 drivers/staging/media/sunxi/cedrus/cedrus.c   | 28 +++++++++++++++-
 drivers/staging/media/sunxi/cedrus/cedrus.h   |  2 ++
 .../staging/media/sunxi/cedrus/cedrus_video.c |  2 ++
 6 files changed, 71 insertions(+), 1 deletion(-)

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#14 lore raw
Quoted 65 lines · Hans Verkuil
Quoted 56 lines · Martin Cerveny

Hello.

Quoted 36 lines · Hans Verkuil

Hi Martin,

Quoted 14 lines · Martin Cerveny

First patch extends cedrus capability to all decoders because V3s missing MPEG2 decoder.

Next two patches add system control node (SRAM C1) and next three patches add support for Cedrus VPU.

Tested on "Lichee Zero" V3s platform with testing LCD patch ( https://github.com/mcerveny/linux/tree/v3s_videocodec_v4 ) and V4L2 raw API testing utility
( https://github.com/mcerveny/v4l2-request-test ):
- enabled LCD (DRM dual VI and sigle UI planes)
- added RGB panel
- enabled PWM

Quoted 7 lines

There is low memory on V3s (64MB) and maximum must be available to CMA:
- CONFIG_CMA_SIZE_MBYTES=28
- add swap to swapout other processes
- decrease buffers in v4l2-request-test (.buffers_count from 16 to 6)

Only H.264 decoder working - MPEG and H.265 unsupported by V3s, JPEG/MJPEG still unimplemented, encoder unimplemented

When I tried to merged these patches I got merge conflicts.

Possibly due to other 5.10 changes, but certainly because of conflicts with patches from Jernej:

https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/

I've merged Jerne's patches and posted a PR for that:
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/

Quoted 6 lines

Can you rebase your patches on top of my branch that contains Jernej's patches?

https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=for-v5.11e

Once my PR is merged into the media_tree master I can take your rebased patches.

I updated patches:
https://github.com/mcerveny/linux/tree/media_tree_for-v5.11e

BUT, commit (555 commits) for v5.10-1
https://github.com/torvalds/linux/commit/fd5c32d80884268a381ed0e67cccef0b3d37750b
disrupts usability of Cedrus H.264 (at least for my Allwinner V3s):

1) colors are disrupted

Quoted 7 lines

There are missing some initialization now.

If I use "5.9" compatible code
(last bisect good point https://github.com/torvalds/linux/commit/647412daeb454b6dad12a6c6961ab90aac9e5d29 ) then reboot (not power-off!) and use new code
( https://github.com/mcerveny/linux/tree/media_tree_for-v5.11e )
and colors are OK.

Quoted 5 lines

Could this or the next issue be related to this bug fix?

https://git.linuxtv.org/media_tree.git/commit/?h=fixes&id=9ac924b98728c3733c91c6c59fc410827d0da49f

That fix isn't yet in our master tree.

Confirmed. It recovers colors !

Quoted 9 lines
Quoted 7 lines

2) decoding of complex streams fails

( https://github.com/mcerveny/v4l2-request-test/tree/v5.10 )
- bbb-h264-all-i-32 - OK
- bbb-h264-32 - bad from frame 5
- bbb-h264-high-32 - bad from frame 6

I think cedrus devs need to take a look at these issues.

Maybe something wrong in my testing code,
problematic commit swapped some variables between structures :-(

I try to investigate more, regards Martin

Quoted 31 lines

Regards,

Hans

Quoted 26 lines

best regards,
Martin

Quoted 22 lines
Quoted 21 lines

Changes since v1:
- patch 0005 rename
- added testing description

Martin Cerveny (6):
media: cedrus: Register all codecs as capability
dt-bindings: sram: allwinner,sun4i-a10-system-control: Add V3s
compatibles
ARM: dts: sun8i: v3s: Add node for system control
media: cedrus: Add support for V3s
dt-bindings: media: cedrus: Add V3s compatible
ARM: dts: sun8i: v3s: Add video engine node

 .../allwinner,sun4i-a10-video-engine.yaml     |  1 +
 .../allwinner,sun4i-a10-system-control.yaml   |  6 ++++
 arch/arm/boot/dts/sun8i-v3s.dtsi              | 33 +++++++++++++++++++
 drivers/staging/media/sunxi/cedrus/cedrus.c   | 28 +++++++++++++++-
 drivers/staging/media/sunxi/cedrus/cedrus.h   |  2 ++
 .../staging/media/sunxi/cedrus/cedrus_video.c |  2 ++
 6 files changed, 71 insertions(+), 1 deletion(-)

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#15 lore raw

Hello.

Quoted 77 lines · Martin Cerveny
Quoted 60 lines · Hans Verkuil
Quoted 51 lines · Martin Cerveny
Quoted 34 lines · Hans Verkuil
Quoted 14 lines · Martin Cerveny

First patch extends cedrus capability to all decoders because V3s missing MPEG2 decoder.

Next two patches add system control node (SRAM C1) and next three patches add support for Cedrus VPU.

Tested on "Lichee Zero" V3s platform with testing LCD patch ( https://github.com/mcerveny/linux/tree/v3s_videocodec_v4 ) and V4L2 raw API testing utility
( https://github.com/mcerveny/v4l2-request-test ):
- enabled LCD (DRM dual VI and sigle UI planes)
- added RGB panel
- enabled PWM

Quoted 7 lines

There is low memory on V3s (64MB) and maximum must be available to CMA:
- CONFIG_CMA_SIZE_MBYTES=28
- add swap to swapout other processes
- decrease buffers in v4l2-request-test (.buffers_count from 16 to 6)

Only H.264 decoder working - MPEG and H.265 unsupported by V3s, JPEG/MJPEG still unimplemented, encoder unimplemented

When I tried to merged these patches I got merge conflicts.

Possibly due to other 5.10 changes, but certainly because of conflicts with patches from Jernej:

https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/

I've merged Jerne's patches and posted a PR for that:
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/

Quoted 6 lines

Can you rebase your patches on top of my branch that contains Jernej's patches?

https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=for-v5.11e

Once my PR is merged into the media_tree master I can take your rebased patches.

I updated patches:
https://github.com/mcerveny/linux/tree/media_tree_for-v5.11e

BUT, commit (555 commits) for v5.10-1
https://github.com/torvalds/linux/commit/fd5c32d80884268a381ed0e67cccef0b3d37750b
disrupts usability of Cedrus H.264 (at least for my Allwinner V3s):

1) colors are disrupted

Quoted 7 lines

There are missing some initialization now.

If I use "5.9" compatible code
(last bisect good point https://github.com/torvalds/linux/commit/647412daeb454b6dad12a6c6961ab90aac9e5d29 ) then reboot (not power-off!) and use new code
( https://github.com/mcerveny/linux/tree/media_tree_for-v5.11e )
and colors are OK.

Quoted 5 lines

Could this or the next issue be related to this bug fix?

https://git.linuxtv.org/media_tree.git/commit/?h=fixes&id=9ac924b98728c3733c91c6c59fc410827d0da49f

That fix isn't yet in our master tree.

Confirmed. It recovers colors !

Quoted 8 lines
Quoted 7 lines

2) decoding of complex streams fails

( https://github.com/mcerveny/v4l2-request-test/tree/v5.10 )
- bbb-h264-all-i-32 - OK
- bbb-h264-32 - bad from frame 5
- bbb-h264-high-32 - bad from frame 6

Quoted 6 lines
Quoted 1 line

I think cedrus devs need to take a look at these issues.

Maybe something wrong in my testing code,
problematic commit swapped some variables between structures :-(

I try to investigate more, regards Martin

Yes. I found new format in ref_pic_list.
I updated test application. All H.264 tests are working now.

https://github.com/mcerveny/v4l2-request-test

Is it necessary to release new "Patch V3" (rebased) series from https://github.com/mcerveny/linux/tree/media_tree_for-v5.11e or not ?

Regards, Martin

Quoted 21 lines
Quoted 21 lines

Regards,

Hans

Quoted 17 lines

best regards,
Martin

Quoted 13 lines
Quoted 13 lines

Changes since v1:
- patch 0005 rename
- added testing description

Martin Cerveny (6):
media: cedrus: Register all codecs as capability
dt-bindings: sram: allwinner,sun4i-a10-system-control: Add V3s
compatibles
ARM: dts: sun8i: v3s: Add node for system control
media: cedrus: Add support for V3s
dt-bindings: media: cedrus: Add V3s compatible
ARM: dts: sun8i: v3s: Add video engine node

Quoted 11 lines
Quoted 10 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
 .../allwinner,sun4i-a10-video-engine.yaml     |  1 +
 .../allwinner,sun4i-a10-system-control.yaml   |  6 ++++
 arch/arm/boot/dts/sun8i-v3s.dtsi              | 33 +++++++++++++++++++
 drivers/staging/media/sunxi/cedrus/cedrus.c   | 28 +++++++++++++++-
 drivers/staging/media/sunxi/cedrus/cedrus.h   |  2 ++
 .../staging/media/sunxi/cedrus/cedrus_video.c |  2 ++
 6 files changed, 71 insertions(+), 1 deletion(-)

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#16 lore raw
Quoted 90 lines · Martin Cerveny

Hello.

Quoted 80 lines · Martin Cerveny
Quoted 63 lines · Hans Verkuil
Quoted 54 lines · Martin Cerveny
Quoted 34 lines · Hans Verkuil
Quoted 14 lines · Martin Cerveny

First patch extends cedrus capability to all decoders because V3s missing MPEG2 decoder.

Next two patches add system control node (SRAM C1) and next three patches add support for Cedrus VPU.

Tested on "Lichee Zero" V3s platform with testing LCD patch ( https://github.com/mcerveny/linux/tree/v3s_videocodec_v4 ) and V4L2 raw API testing utility
( https://github.com/mcerveny/v4l2-request-test ):
- enabled LCD (DRM dual VI and sigle UI planes)
- added RGB panel
- enabled PWM

Quoted 7 lines

There is low memory on V3s (64MB) and maximum must be available to CMA:
- CONFIG_CMA_SIZE_MBYTES=28
- add swap to swapout other processes
- decrease buffers in v4l2-request-test (.buffers_count from 16 to 6)

Only H.264 decoder working - MPEG and H.265 unsupported by V3s, JPEG/MJPEG still unimplemented, encoder unimplemented

When I tried to merged these patches I got merge conflicts.

Possibly due to other 5.10 changes, but certainly because of conflicts with patches from Jernej:

https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/

I've merged Jerne's patches and posted a PR for that:
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/

Quoted 7 lines

Can you rebase your patches on top of my branch that contains Jernej's patches?

https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=for-v5.11e

Once my PR is merged into the media_tree master I can take your rebased patches.

I updated patches:
https://github.com/mcerveny/linux/tree/media_tree_for-v5.11e

BUT, commit (555 commits) for v5.10-1
https://github.com/torvalds/linux/commit/fd5c32d80884268a381ed0e67cccef0b3d37750b
disrupts usability of Cedrus H.264 (at least for my Allwinner V3s):

1) colors are disrupted

There are missing some initialization now.

Quoted 7 lines

If I use "5.9" compatible code
(last bisect good point
https://github.com/torvalds/linux/commit/647412daeb454b6dad12a6c6961ab90aac9e5d29
)
then reboot (not power-off!) and use new code
( https://github.com/mcerveny/linux/tree/media_tree_for-v5.11e ) and colors are OK.

Quoted 5 lines

Could this or the next issue be related to this bug fix?

https://git.linuxtv.org/media_tree.git/commit/?h=fixes&id=9ac924b98728c3733c91c6c59fc410827d0da49f

That fix isn't yet in our master tree.

Confirmed. It recovers colors !

Quoted 8 lines
Quoted 7 lines

2) decoding of complex streams fails

( https://github.com/mcerveny/v4l2-request-test/tree/v5.10 )
- bbb-h264-all-i-32 - OK
- bbb-h264-32 - bad from frame 5
- bbb-h264-high-32 - bad from frame 6

Quoted 6 lines
Quoted 1 line

I think cedrus devs need to take a look at these issues.

Maybe something wrong in my testing code,
problematic commit swapped some variables between structures :-(

I try to investigate more, regards Martin

Quoted 7 lines

Yes. I found new format in ref_pic_list.
I updated test application. All H.264 tests are working now.

https://github.com/mcerveny/v4l2-request-test

Is it necessary to release new "Patch V3" (rebased) series from
https://github.com/mcerveny/linux/tree/media_tree_for-v5.11e or not ?

Yes, please! That would be much appreciated.

Regards,

Hans

Quoted 35 lines

Regards, Martin

Quoted 32 lines
Quoted 31 lines

Regards,

Hans

Quoted 26 lines

best regards,
Martin

Quoted 22 lines
Quoted 21 lines

Changes since v1:
- patch 0005 rename
- added testing description

Martin Cerveny (6):
media: cedrus: Register all codecs as capability
dt-bindings: sram: allwinner,sun4i-a10-system-control: Add V3s
compatibles
ARM: dts: sun8i: v3s: Add node for system control
media: cedrus: Add support for V3s
dt-bindings: media: cedrus: Add V3s compatible
ARM: dts: sun8i: v3s: Add video engine node

 .../allwinner,sun4i-a10-video-engine.yaml     |  1 +
 .../allwinner,sun4i-a10-system-control.yaml   |  6 ++++
 arch/arm/boot/dts/sun8i-v3s.dtsi              | 33 +++++++++++++++++++
 drivers/staging/media/sunxi/cedrus/cedrus.c   | 28 +++++++++++++++-
 drivers/staging/media/sunxi/cedrus/cedrus.h   |  2 ++
 .../staging/media/sunxi/cedrus/cedrus_video.c |  2 ++
 6 files changed, 71 insertions(+), 1 deletion(-)