* [PATCH v2 1/6] media: cedrus: Register all codecs as capability
2020-09-12 14:30 [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder Martin Cerveny
@ 2020-09-12 14:30 ` Martin Cerveny
2020-09-12 14:30 ` [PATCH v2 2/6] dt-bindings: sram: allwinner, sun4i-a10-system-control: Add V3s compatibles Martin Cerveny
` (6 subsequent siblings)
7 siblings, 0 replies; 17+ messages in thread
From: Martin Cerveny @ 2020-09-12 14:30 UTC (permalink / raw)
To: Maxime Ripard
Cc: devel, devicetree, Greg Kroah-Hartman, linux-kernel,
Paul Kocialkowski, Chen-Yu Tsai, Rob Herring, Martin Cerveny,
Mauro Carvalho Chehab, linux-arm-kernel, linux-media
All codecs should have capabilities.
For example "Allwinner V3s" does not support "MPEG2".
Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
---
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(-)
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/media/sunxi/cedrus/cedrus.c
index 7c6b91f0e780..ae7e154eca9f 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus.c
+++ b/drivers/staging/media/sunxi/cedrus/cedrus.c
@@ -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,
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.h b/drivers/staging/media/sunxi/cedrus/cedrus.h
index 96765555ab8a..b6032f40cde8 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus.h
+++ b/drivers/staging/media/sunxi/cedrus/cedrus.h
@@ -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)
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_video.c b/drivers/staging/media/sunxi/cedrus/cedrus_video.c
index 16d82309e7b6..cb4aca5be415 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus_video.c
+++ b/drivers/staging/media/sunxi/cedrus/cedrus_video.c
@@ -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,
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 2/6] dt-bindings: sram: allwinner, sun4i-a10-system-control: Add V3s compatibles
2020-09-12 14:30 [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder Martin Cerveny
2020-09-12 14:30 ` [PATCH v2 1/6] media: cedrus: Register all codecs as capability Martin Cerveny
@ 2020-09-12 14:30 ` Martin Cerveny
2020-09-22 23:00 ` Rob Herring
2020-09-12 14:30 ` [PATCH v2 3/6] ARM: dts: sun8i: v3s: Add node for system control Martin Cerveny
` (5 subsequent siblings)
7 siblings, 1 reply; 17+ messages in thread
From: Martin Cerveny @ 2020-09-12 14:30 UTC (permalink / raw)
To: Maxime Ripard
Cc: devel, devicetree, Greg Kroah-Hartman, linux-kernel,
Paul Kocialkowski, Chen-Yu Tsai, Rob Herring, Martin Cerveny,
Mauro Carvalho Chehab, linux-arm-kernel, linux-media
Allwinner V3s has system control similar to that in H3.
Add compatibles for system control with SRAM C1 region.
Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
---
.../bindings/sram/allwinner,sun4i-a10-system-control.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml b/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml
index f5825935fd22..9577d6c1494a 100644
--- a/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml
+++ b/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml
@@ -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
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v2 2/6] dt-bindings: sram: allwinner, sun4i-a10-system-control: Add V3s compatibles
2020-09-12 14:30 ` [PATCH v2 2/6] dt-bindings: sram: allwinner, sun4i-a10-system-control: Add V3s compatibles Martin Cerveny
@ 2020-09-22 23:00 ` Rob Herring
0 siblings, 0 replies; 17+ messages in thread
From: Rob Herring @ 2020-09-22 23:00 UTC (permalink / raw)
To: Martin Cerveny
Cc: devel, devicetree, Greg Kroah-Hartman, linux-kernel,
Maxime Ripard, Paul Kocialkowski, Chen-Yu Tsai, Rob Herring,
Mauro Carvalho Chehab, linux-arm-kernel, linux-media
On Sat, 12 Sep 2020 16:30:48 +0200, Martin Cerveny wrote:
> Allwinner V3s has system control similar to that in H3.
> Add compatibles for system control with SRAM C1 region.
>
> Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
> ---
> .../bindings/sram/allwinner,sun4i-a10-system-control.yaml | 6 ++++++
> 1 file changed, 6 insertions(+)
>
Acked-by: Rob Herring <robh@kernel.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 3/6] ARM: dts: sun8i: v3s: Add node for system control
2020-09-12 14:30 [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder Martin Cerveny
2020-09-12 14:30 ` [PATCH v2 1/6] media: cedrus: Register all codecs as capability Martin Cerveny
2020-09-12 14:30 ` [PATCH v2 2/6] dt-bindings: sram: allwinner, sun4i-a10-system-control: Add V3s compatibles Martin Cerveny
@ 2020-09-12 14:30 ` Martin Cerveny
2020-09-12 14:30 ` [PATCH v2 4/6] media: cedrus: Add support for V3s Martin Cerveny
` (4 subsequent siblings)
7 siblings, 0 replies; 17+ messages in thread
From: Martin Cerveny @ 2020-09-12 14:30 UTC (permalink / raw)
To: Maxime Ripard
Cc: devel, devicetree, Greg Kroah-Hartman, linux-kernel,
Paul Kocialkowski, Chen-Yu Tsai, Rob Herring, Martin Cerveny,
Mauro Carvalho Chehab, linux-arm-kernel, linux-media
Allwinner V3s has system control and SRAM C1 region similar to H3.
Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
---
arch/arm/boot/dts/sun8i-v3s.dtsi | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi
index e5312869c0d2..3f18866fb37b 100644
--- a/arch/arm/boot/dts/sun8i-v3s.dtsi
+++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
@@ -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>;
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 4/6] media: cedrus: Add support for V3s
2020-09-12 14:30 [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder Martin Cerveny
` (2 preceding siblings ...)
2020-09-12 14:30 ` [PATCH v2 3/6] ARM: dts: sun8i: v3s: Add node for system control Martin Cerveny
@ 2020-09-12 14:30 ` Martin Cerveny
2020-09-12 14:30 ` [PATCH v2 5/6] dt-bindings: media: cedrus: Add V3s compatible Martin Cerveny
` (3 subsequent siblings)
7 siblings, 0 replies; 17+ messages in thread
From: Martin Cerveny @ 2020-09-12 14:30 UTC (permalink / raw)
To: Maxime Ripard
Cc: devel, devicetree, Greg Kroah-Hartman, linux-kernel,
Paul Kocialkowski, Chen-Yu Tsai, Rob Herring, Martin Cerveny,
Mauro Carvalho Chehab, linux-arm-kernel, linux-media
V3s video engine runs at lower speed and support video decoder
for H.264 and JPEG/MJPEG only.
Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
---
drivers/staging/media/sunxi/cedrus/cedrus.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/media/sunxi/cedrus/cedrus.c
index ae7e154eca9f..79ec5e07b416 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus.c
+++ b/drivers/staging/media/sunxi/cedrus/cedrus.c
@@ -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,
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 5/6] dt-bindings: media: cedrus: Add V3s compatible
2020-09-12 14:30 [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder Martin Cerveny
` (3 preceding siblings ...)
2020-09-12 14:30 ` [PATCH v2 4/6] media: cedrus: Add support for V3s Martin Cerveny
@ 2020-09-12 14:30 ` Martin Cerveny
2020-09-22 23:00 ` Rob Herring
2020-09-12 14:30 ` [PATCH v2 6/6] ARM: dts: sun8i: v3s: Add video engine node Martin Cerveny
` (2 subsequent siblings)
7 siblings, 1 reply; 17+ messages in thread
From: Martin Cerveny @ 2020-09-12 14:30 UTC (permalink / raw)
To: Maxime Ripard
Cc: devel, devicetree, Greg Kroah-Hartman, linux-kernel,
Paul Kocialkowski, Chen-Yu Tsai, Rob Herring, Martin Cerveny,
Mauro Carvalho Chehab, linux-arm-kernel, linux-media
Allwinner V3s SoC contains video engine. Add compatible for it.
Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
---
.../bindings/media/allwinner,sun4i-a10-video-engine.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-video-engine.yaml b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-video-engine.yaml
index 4cc1a670c986..08515c18cbb7 100644
--- a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-video-engine.yaml
+++ b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-video-engine.yaml
@@ -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
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v2 5/6] dt-bindings: media: cedrus: Add V3s compatible
2020-09-12 14:30 ` [PATCH v2 5/6] dt-bindings: media: cedrus: Add V3s compatible Martin Cerveny
@ 2020-09-22 23:00 ` Rob Herring
0 siblings, 0 replies; 17+ messages in thread
From: Rob Herring @ 2020-09-22 23:00 UTC (permalink / raw)
To: Martin Cerveny
Cc: devel, devicetree, Greg Kroah-Hartman, linux-kernel,
Maxime Ripard, Paul Kocialkowski, Chen-Yu Tsai, Rob Herring,
Mauro Carvalho Chehab, linux-arm-kernel, linux-media
On Sat, 12 Sep 2020 16:30:51 +0200, Martin Cerveny wrote:
> Allwinner V3s SoC contains video engine. Add compatible for it.
>
> Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
> ---
> .../bindings/media/allwinner,sun4i-a10-video-engine.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
Acked-by: Rob Herring <robh@kernel.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 6/6] ARM: dts: sun8i: v3s: Add video engine node
2020-09-12 14:30 [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder Martin Cerveny
` (4 preceding siblings ...)
2020-09-12 14:30 ` [PATCH v2 5/6] dt-bindings: media: cedrus: Add V3s compatible Martin Cerveny
@ 2020-09-12 14:30 ` Martin Cerveny
2020-10-30 11:06 ` [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder Hans Verkuil
2020-11-05 13:54 ` Hans Verkuil
7 siblings, 0 replies; 17+ messages in thread
From: Martin Cerveny @ 2020-09-12 14:30 UTC (permalink / raw)
To: Maxime Ripard
Cc: devel, devicetree, Greg Kroah-Hartman, linux-kernel,
Paul Kocialkowski, Chen-Yu Tsai, Rob Herring, Martin Cerveny,
Mauro Carvalho Chehab, linux-arm-kernel, linux-media
Allwinner V3S SoC has a video engine.
Add a node for it.
Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
---
arch/arm/boot/dts/sun8i-v3s.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi
index 3f18866fb37b..3fb01dc1a9ba 100644
--- a/arch/arm/boot/dts/sun8i-v3s.dtsi
+++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
@@ -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";
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder
2020-09-12 14:30 [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder Martin Cerveny
` (5 preceding siblings ...)
2020-09-12 14:30 ` [PATCH v2 6/6] ARM: dts: sun8i: v3s: Add video engine node Martin Cerveny
@ 2020-10-30 11:06 ` Hans Verkuil
2020-10-30 15:49 ` Maxime Ripard
2020-11-05 13:54 ` Hans Verkuil
7 siblings, 1 reply; 17+ messages in thread
From: Hans Verkuil @ 2020-10-30 11:06 UTC (permalink / raw)
To: Martin Cerveny, Maxime Ripard
Cc: devel, devicetree, Greg Kroah-Hartman, linux-kernel,
Paul Kocialkowski, Chen-Yu Tsai, Rob Herring,
Mauro Carvalho Chehab, linux-arm-kernel, linux-media
Maxime,
Are you OK with this series? It looks good to me.
Regards,
Hans
On 12/09/2020 16:30, Martin Cerveny wrote:
> 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(-)
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder
2020-10-30 11:06 ` [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder Hans Verkuil
@ 2020-10-30 15:49 ` Maxime Ripard
0 siblings, 0 replies; 17+ messages in thread
From: Maxime Ripard @ 2020-10-30 15:49 UTC (permalink / raw)
To: Hans Verkuil
Cc: devel, devicetree, Greg Kroah-Hartman, linux-kernel,
Paul Kocialkowski, Chen-Yu Tsai, Rob Herring, Martin Cerveny,
Mauro Carvalho Chehab, linux-arm-kernel, linux-media
[-- Attachment #1.1: Type: text/plain, Size: 226 bytes --]
Hi!
On Fri, Oct 30, 2020 at 12:06:10PM +0100, Hans Verkuil wrote:
> 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
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder
2020-09-12 14:30 [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder Martin Cerveny
` (6 preceding siblings ...)
2020-10-30 11:06 ` [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder Hans Verkuil
@ 2020-11-05 13:54 ` Hans Verkuil
2020-11-15 18:59 ` Martin Cerveny
7 siblings, 1 reply; 17+ messages in thread
From: Hans Verkuil @ 2020-11-05 13:54 UTC (permalink / raw)
To: Martin Cerveny, Maxime Ripard
Cc: devel, devicetree, Greg Kroah-Hartman, linux-kernel,
Paul Kocialkowski, Chen-Yu Tsai, Rob Herring,
Mauro Carvalho Chehab, linux-arm-kernel, linux-media
Hi Martin,
On 12/09/2020 16:30, Martin Cerveny wrote:
> 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
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/20200825173523.1289379-4-jernej.skrabec@siol.net/
https://patchwork.linuxtv.org/project/linux-media/patch/20200825173523.1289379-5-jernej.skrabec@siol.net/
I've merged Jerne's patches and posted a PR for that:
https://patchwork.linuxtv.org/project/linux-media/patch/f3b8e5e2-5f0e-fb6f-e5b2-7f44f7e365e7@xs4all.nl/
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
>
> 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(-)
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder
2020-11-05 13:54 ` Hans Verkuil
@ 2020-11-15 18:59 ` Martin Cerveny
2020-11-16 8:38 ` Hans Verkuil
0 siblings, 1 reply; 17+ messages in thread
From: Martin Cerveny @ 2020-11-15 18:59 UTC (permalink / raw)
To: Hans Verkuil
Cc: devel, devicetree, Greg Kroah-Hartman, linux-kernel,
Maxime Ripard, Paul Kocialkowski, Chen-Yu Tsai, Rob Herring,
Martin Cerveny, Mauro Carvalho Chehab, linux-arm-kernel,
linux-media
Hello.
On Thu, 5 Nov 2020, Hans Verkuil wrote:
> Hi Martin,
>
> On 12/09/2020 16:30, Martin Cerveny wrote:
>> 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
>
> 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/20200825173523.1289379-4-jernej.skrabec@siol.net/
> https://patchwork.linuxtv.org/project/linux-media/patch/20200825173523.1289379-5-jernej.skrabec@siol.net/
>
> I've merged Jerne's patches and posted a PR for that:
> https://patchwork.linuxtv.org/project/linux-media/patch/f3b8e5e2-5f0e-fb6f-e5b2-7f44f7e365e7@xs4all.nl/
>
> 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
>> 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
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder
2020-11-15 18:59 ` Martin Cerveny
@ 2020-11-16 8:38 ` Hans Verkuil
2020-11-16 9:37 ` Martin Cerveny
0 siblings, 1 reply; 17+ messages in thread
From: Hans Verkuil @ 2020-11-16 8:38 UTC (permalink / raw)
To: Martin Cerveny
Cc: devel, devicetree, Greg Kroah-Hartman, linux-kernel,
Maxime Ripard, Paul Kocialkowski, Chen-Yu Tsai, Rob Herring,
Mauro Carvalho Chehab, linux-arm-kernel, linux-media
On 15/11/2020 19:59, Martin Cerveny wrote:
> Hello.
>
> On Thu, 5 Nov 2020, Hans Verkuil wrote:
>
>> Hi Martin,
>>
>> On 12/09/2020 16:30, Martin Cerveny wrote:
>>> 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
>>
>> 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/20200825173523.1289379-4-jernej.skrabec@siol.net/
>> https://patchwork.linuxtv.org/project/linux-media/patch/20200825173523.1289379-5-jernej.skrabec@siol.net/
>>
>> I've merged Jerne's patches and posted a PR for that:
>> https://patchwork.linuxtv.org/project/linux-media/patch/f3b8e5e2-5f0e-fb6f-e5b2-7f44f7e365e7@xs4all.nl/
>>
>> 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.
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.
>
> 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
>
> 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(-)
>>>
>>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder
2020-11-16 8:38 ` Hans Verkuil
@ 2020-11-16 9:37 ` Martin Cerveny
2020-11-16 12:07 ` Martin Cerveny
0 siblings, 1 reply; 17+ messages in thread
From: Martin Cerveny @ 2020-11-16 9:37 UTC (permalink / raw)
To: Hans Verkuil
Cc: devel, devicetree, Greg Kroah-Hartman, linux-kernel,
Maxime Ripard, Paul Kocialkowski, Chen-Yu Tsai, Rob Herring,
Martin Cerveny, Mauro Carvalho Chehab, linux-arm-kernel,
linux-media
On Mon, 16 Nov 2020, Hans Verkuil wrote:
> On 15/11/2020 19:59, Martin Cerveny wrote:
>> Hello.
>>
>> On Thu, 5 Nov 2020, Hans Verkuil wrote:
>>
>>> Hi Martin,
>>>
>>> On 12/09/2020 16:30, Martin Cerveny wrote:
>>>> 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
>>>
>>> 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/20200825173523.1289379-4-jernej.skrabec@siol.net/
>>> https://patchwork.linuxtv.org/project/linux-media/patch/20200825173523.1289379-5-jernej.skrabec@siol.net/
>>>
>>> I've merged Jerne's patches and posted a PR for that:
>>> https://patchwork.linuxtv.org/project/linux-media/patch/f3b8e5e2-5f0e-fb6f-e5b2-7f44f7e365e7@xs4all.nl/
>>>
>>> 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.
>
> 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 !
>>
>> 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
> Regards,
>
> Hans
>
>>
>> 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(-)
>>>>
>>>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder
2020-11-16 9:37 ` Martin Cerveny
@ 2020-11-16 12:07 ` Martin Cerveny
2020-11-16 12:18 ` Hans Verkuil
0 siblings, 1 reply; 17+ messages in thread
From: Martin Cerveny @ 2020-11-16 12:07 UTC (permalink / raw)
To: Martin Cerveny
Cc: devel, devicetree, Greg Kroah-Hartman, linux-kernel,
Maxime Ripard, Hans Verkuil, Chen-Yu Tsai, Rob Herring,
Mauro Carvalho Chehab, Paul Kocialkowski, linux-arm-kernel,
linux-media
Hello.
On Mon, 16 Nov 2020, Martin Cerveny wrote:
> On Mon, 16 Nov 2020, Hans Verkuil wrote:
>> On 15/11/2020 19:59, Martin Cerveny wrote:
>>> On Thu, 5 Nov 2020, Hans Verkuil wrote:
>>>> On 12/09/2020 16:30, Martin Cerveny wrote:
>>>>> 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
>>>>
>>>> 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/20200825173523.1289379-4-jernej.skrabec@siol.net/
>>>> https://patchwork.linuxtv.org/project/linux-media/patch/20200825173523.1289379-5-jernej.skrabec@siol.net/
>>>>
>>>> I've merged Jerne's patches and posted a PR for that:
>>>> https://patchwork.linuxtv.org/project/linux-media/patch/f3b8e5e2-5f0e-fb6f-e5b2-7f44f7e365e7@xs4all.nl/
>>>>
>>>> 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.
>>
>> 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 !
>
>>>
>>> 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
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
>> Regards,
>>
>> Hans
>>
>>>
>>> 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(-)
>>>>>
>>>>
>>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/6] ARM: dts: sun8i: v3s: Enable video decoder
2020-11-16 12:07 ` Martin Cerveny
@ 2020-11-16 12:18 ` Hans Verkuil
0 siblings, 0 replies; 17+ messages in thread
From: Hans Verkuil @ 2020-11-16 12:18 UTC (permalink / raw)
To: Martin Cerveny
Cc: devel, devicetree, Greg Kroah-Hartman, linux-kernel,
Maxime Ripard, Paul Kocialkowski, Chen-Yu Tsai, Rob Herring,
Mauro Carvalho Chehab, linux-arm-kernel, linux-media
On 16/11/2020 13:07, Martin Cerveny wrote:
> Hello.
>
> On Mon, 16 Nov 2020, Martin Cerveny wrote:
>> On Mon, 16 Nov 2020, Hans Verkuil wrote:
>>> On 15/11/2020 19:59, Martin Cerveny wrote:
>>>> On Thu, 5 Nov 2020, Hans Verkuil wrote:
>>>>> On 12/09/2020 16:30, Martin Cerveny wrote:
>>>>>> 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
>>>>>
>>>>> 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/20200825173523.1289379-4-jernej.skrabec@siol.net/
>>>>> https://patchwork.linuxtv.org/project/linux-media/patch/20200825173523.1289379-5-jernej.skrabec@siol.net/
>>>>>
>>>>> I've merged Jerne's patches and posted a PR for that:
>>>>> https://patchwork.linuxtv.org/project/linux-media/patch/f3b8e5e2-5f0e-fb6f-e5b2-7f44f7e365e7@xs4all.nl/
>>>>>
>>>>> 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.
>>>
>>> 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 !
>>
>>>>
>>>> 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
>
> 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
>
> Regards, Martin
>
>>> Regards,
>>>
>>> Hans
>>>
>>>>
>>>> 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(-)
>>>>>>
>>>>>
>>>
>>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 17+ messages in thread