[v3,1/7] dt-bindings: media: sun4i-a10-video-engine: Fix IOMMU count for H6
Commit Message
On the H6 SoC, the Video Engine has two memory ports, thus two IOMMU
connections. The secondary one that is missing is likely used for
reading reference frames. The newer H616 is the same. On the other
hand, the D1 only has one memory port.
Add the missing IOMMU connection for the Video Engine.
Fixes: 62a8ccf3a248 ("arm64: dts: allwinner: h6: Fix Cedrus IOMMU usage")
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
---
.../allwinner,sun4i-a10-video-engine.yaml | 21 ++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
Comments
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Validation failure: sun50i-h6.dtsi fails dtbs_check due to the new minItems: 2 constraint.
--
--- Patch [1]: [PATCH v3 1/7] dt-bindings: media: sun4i-a10-video-engine: Fix IOMMU count for H6 ---
commit 17817354e28859038f6eb81e492f4c4b1bc51a02
Author: Chen-Yu Tsai <wens@kernel.org>
dt-bindings: media: sun4i-a10-video-engine: Fix IOMMU count for H6
This commit updates the device tree binding for the sun4i-a10-video-engine to
specify that the H6 SoC requires two IOMMU connections. It adds a conditional
schema block enforcing a minimum of two items for the iommus property on H6
devices.
> 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 541325f900a1d..b4c0fabb38211 100644
> --- a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-video-engine.yaml
> +++ b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-video-engine.yaml
[ ... ]
> @@ -72,6 +75,22 @@ required:
> - resets
> - allwinner,sram
>
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - allwinner,sun50i-h6-video-engine
> + then:
> + properties:
> + iommus:
> + minItems: 2
[Severity: Low]
Will this strict constraint cause dtbs_check failures for existing device
trees?
Looking at the H6 dtsi file, the video-codec node only provides a single IOMMU
connection:
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi:video-codec@1c0e000 {
...
iommus = <&iommu 3>;
};
Since this commit enforces minItems: 2 without simultaneously updating the
device tree, will it cause make dtbs_check to report validation errors for the
H6 SoC?
@@ -55,7 +55,10 @@ properties:
description: Phandle to the device SRAM
iommus:
- maxItems: 1
+ minItems: 1
+ items:
+ - description: VE port on IOMMU
+ - description: VE_R port on IOMMU
memory-region:
maxItems: 1
@@ -82,6 +85,22 @@ required:
- resets
- allwinner,sram
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - allwinner,sun50i-h6-video-engine
+ then:
+ properties:
+ iommus:
+ minItems: 2
+ else:
+ properties:
+ iommus:
+ maxItems: 1
+
additionalProperties: false
examples: