[1/2] media: dt-bindings: allwinner: video-engine: Fix number of IOMMU channels

Message ID 20221116193105.363297-2-jernej.skrabec@gmail.com
State New
Headers
Series arm64: allwinner: h6: Add second IOMMU reference to Cedrus |

Commit Message

Jernej Škrabec Nov. 16, 2022, 7:31 p.m. UTC
  Cedrus (video engine) on Allwinner H6 actually uses two IOMMU channel,
not just one. However, Cedrus on SoCs like D1 only uses one channel.

Allow up to 2 IOMMU channels.

Fixes: 62a8ccf3a248 ("arm64: dts: allwinner: h6: Fix Cedrus IOMMU usage")
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
 .../bindings/media/allwinner,sun4i-a10-video-engine.yaml        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Samuel Holland Nov. 16, 2022, 11:06 p.m. UTC | #1
On 11/16/22 13:31, Jernej Skrabec wrote:
> Cedrus (video engine) on Allwinner H6 actually uses two IOMMU channel,
> not just one. However, Cedrus on SoCs like D1 only uses one channel.
> 
> Allow up to 2 IOMMU channels.
> 
> Fixes: 62a8ccf3a248 ("arm64: dts: allwinner: h6: Fix Cedrus IOMMU usage")
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> ---
>  .../bindings/media/allwinner,sun4i-a10-video-engine.yaml        | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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 541325f900a1..257bb372d166 100644
> --- a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-video-engine.yaml
> +++ b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-video-engine.yaml
> @@ -55,7 +55,7 @@ properties:
>      description: Phandle to the device SRAM
>  
>    iommus:
> -    maxItems: 1
> +    maxItems: 2

You need to add minItems: 1, or else this will require two items.

Regards,
Samuel

>  
>    memory-region:
>      maxItems: 1
  
Rob Herring Nov. 16, 2022, 11:42 p.m. UTC | #2
On Wed, 16 Nov 2022 20:31:04 +0100, Jernej Skrabec wrote:
> Cedrus (video engine) on Allwinner H6 actually uses two IOMMU channel,
> not just one. However, Cedrus on SoCs like D1 only uses one channel.
> 
> Allow up to 2 IOMMU channels.
> 
> Fixes: 62a8ccf3a248 ("arm64: dts: allwinner: h6: Fix Cedrus IOMMU usage")
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> ---
>  .../bindings/media/allwinner,sun4i-a10-video-engine.yaml        | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/


video-codec@1c0e000: iommus: [[10, 3]] is too short
	arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dtb
	arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dtb

video-codec@1c0e000: iommus: [[12, 3]] is too short
	arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dtb
	arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dtb
	arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dtb
	arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64-model-b.dtb
	arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dtb
	arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6-mini.dtb
  

Patch

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 541325f900a1..257bb372d166 100644
--- a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-video-engine.yaml
+++ b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-video-engine.yaml
@@ -55,7 +55,7 @@  properties:
     description: Phandle to the device SRAM
 
   iommus:
-    maxItems: 1
+    maxItems: 2
 
   memory-region:
     maxItems: 1