diff mbox series

[2/2] media: cedrus: Add support for the D1 variant

Message ID 20211119031519.23430-2-samuel@sholland.org (mailing list archive)
State New, archived
Headers show
Series [1/2] dt-bindings: media: Add compatible for D1 | expand

Commit Message

Samuel Holland Nov. 19, 2021, 3:15 a.m. UTC
D1 has a unique variant of the video engine, which appears to drop the
VP8 support found on most earlier variants.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---

 drivers/staging/media/sunxi/cedrus/cedrus.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Maxime Ripard Nov. 19, 2021, 8:23 a.m. UTC | #1
On Thu, Nov 18, 2021 at 09:15:18PM -0600, Samuel Holland wrote:
> D1 has a unique variant of the video engine, which appears to drop the
> VP8 support found on most earlier variants.
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Acked-by: Maxime Ripard <maxime@cerno.tech>

Maxime
Jernej Škrabec Nov. 19, 2021, 3:53 p.m. UTC | #2
Hi Samuel!

Dne petek, 19. november 2021 ob 04:15:18 CET je Samuel Holland napisal(a):
> D1 has a unique variant of the video engine, which appears to drop the
> VP8 support found on most earlier variants.
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>
> ---
> 
>  drivers/staging/media/sunxi/cedrus/cedrus.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/
media/sunxi/cedrus/cedrus.c
> index c76fc97d97a0..4a4b714b0f26 100644
> --- a/drivers/staging/media/sunxi/cedrus/cedrus.c
> +++ b/drivers/staging/media/sunxi/cedrus/cedrus.c
> @@ -580,6 +580,14 @@ static const struct cedrus_variant 
sun8i_r40_cedrus_variant = {
>  	.mod_rate	= 297000000,
>  };
>  
> +static const struct cedrus_variant sun20i_d1_cedrus_variant = {
> +	.capabilities	= CEDRUS_CAPABILITY_UNTILED |
> +			  CEDRUS_CAPABILITY_MPEG2_DEC |
> +			  CEDRUS_CAPABILITY_H264_DEC |
> +			  CEDRUS_CAPABILITY_H265_DEC,

Did you check if VP8 really doesn't work? It would be strange because it 
shares decoding blocks with H264 and VP8 is present in (almost) all SoCs.

Best regards,
Jernej

> +	.mod_rate	= 432000000,
> +};
> +
>  static const struct cedrus_variant sun50i_a64_cedrus_variant = {
>  	.capabilities	= CEDRUS_CAPABILITY_UNTILED |
>  			  CEDRUS_CAPABILITY_MPEG2_DEC |
> @@ -637,6 +645,10 @@ static const struct of_device_id cedrus_dt_match[] = {
>  		.compatible = "allwinner,sun8i-r40-video-engine",
>  		.data = &sun8i_r40_cedrus_variant,
>  	},
> +	{
> +		.compatible = "allwinner,sun20i-d1-video-engine",
> +		.data = &sun20i_d1_cedrus_variant,
> +	},
>  	{
>  		.compatible = "allwinner,sun50i-a64-video-engine",
>  		.data = &sun50i_a64_cedrus_variant,
> -- 
> 2.32.0
> 
>
diff mbox series

Patch

diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/media/sunxi/cedrus/cedrus.c
index c76fc97d97a0..4a4b714b0f26 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus.c
+++ b/drivers/staging/media/sunxi/cedrus/cedrus.c
@@ -580,6 +580,14 @@  static const struct cedrus_variant sun8i_r40_cedrus_variant = {
 	.mod_rate	= 297000000,
 };
 
+static const struct cedrus_variant sun20i_d1_cedrus_variant = {
+	.capabilities	= CEDRUS_CAPABILITY_UNTILED |
+			  CEDRUS_CAPABILITY_MPEG2_DEC |
+			  CEDRUS_CAPABILITY_H264_DEC |
+			  CEDRUS_CAPABILITY_H265_DEC,
+	.mod_rate	= 432000000,
+};
+
 static const struct cedrus_variant sun50i_a64_cedrus_variant = {
 	.capabilities	= CEDRUS_CAPABILITY_UNTILED |
 			  CEDRUS_CAPABILITY_MPEG2_DEC |
@@ -637,6 +645,10 @@  static const struct of_device_id cedrus_dt_match[] = {
 		.compatible = "allwinner,sun8i-r40-video-engine",
 		.data = &sun8i_r40_cedrus_variant,
 	},
+	{
+		.compatible = "allwinner,sun20i-d1-video-engine",
+		.data = &sun20i_d1_cedrus_variant,
+	},
 	{
 		.compatible = "allwinner,sun50i-a64-video-engine",
 		.data = &sun50i_a64_cedrus_variant,