diff mbox series

[v5,2/3] media: dt-bindings: media: mediatek: Remove "dma-ranges" property for decoder

Message ID 20221128143832.25584-3-allen-kh.cheng@mediatek.com (mailing list archive)
State New, archived
Headers show
Series Add vcodec lat and core nodes for mt8192 | expand

Commit Message

Allen-KH Cheng Nov. 28, 2022, 2:38 p.m. UTC
Since commit f1ad5338a4d5 ("of: Fix "dma-ranges" handling for bus
controllers") was merge, we don't need a dma-ranges property for IOMMU
in mediatek video codec.

We remove the dma-ranges property and fix the example in
mediatek,vcodec-subdev-decoder.yaml

Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
---
 .../bindings/media/mediatek,vcodec-subdev-decoder.yaml     | 7 -------
 1 file changed, 7 deletions(-)

Comments

AngeloGioacchino Del Regno Nov. 30, 2022, 11:27 a.m. UTC | #1
Il 28/11/22 15:38, Allen-KH Cheng ha scritto:
> Since commit f1ad5338a4d5 ("of: Fix "dma-ranges" handling for bus
> controllers") was merge, we don't need a dma-ranges property for IOMMU
> in mediatek video codec.
> 
> We remove the dma-ranges property and fix the example in
> mediatek,vcodec-subdev-decoder.yaml
> 
> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Rob Herring Dec. 1, 2022, 11:14 p.m. UTC | #2
On Mon, 28 Nov 2022 22:38:31 +0800, Allen-KH Cheng wrote:
> Since commit f1ad5338a4d5 ("of: Fix "dma-ranges" handling for bus
> controllers") was merge, we don't need a dma-ranges property for IOMMU
> in mediatek video codec.
> 
> We remove the dma-ranges property and fix the example in
> mediatek,vcodec-subdev-decoder.yaml
> 
> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
> ---
>  .../bindings/media/mediatek,vcodec-subdev-decoder.yaml     | 7 -------
>  1 file changed, 7 deletions(-)
> 

Acked-by: Rob Herring <robh@kernel.org>
Nícolas F. R. A. Prado Dec. 5, 2022, 8:32 p.m. UTC | #3
On Mon, Nov 28, 2022 at 10:38:31PM +0800, Allen-KH Cheng wrote:
> Since commit f1ad5338a4d5 ("of: Fix "dma-ranges" handling for bus
> controllers") was merge, we don't need a dma-ranges property for IOMMU
> in mediatek video codec.

This description isn't right, as it gives the impression that the mentioned
commit removed the need for having a dma-ranges property, but that isn't the
case, the property wasn't needed even before that commit. That commit did
however expose the fact that having this property didn't make sense in the first
place.

Here's a suggestion:

	The decoder nodes already make use of the iommus property to configure the IOMMU
	for address translations, so also having a dma-ranges property doesn't make
	sense.

	In fact, after commit f1ad5338a4d5 ("of: Fix "dma-ranges" handling for bus
	controllers"), having a dma-ranges property causes IOMMU faults.

	Remove the dma-ranges property and update the example.

Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

Thanks,
Nícolas
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml
index 695402041e04..7c5b4a91c59b 100644
--- a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml
+++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml
@@ -76,11 +76,6 @@  properties:
       The node of system control processor (SCP), using
       the remoteproc & rpmsg framework.
 
-  dma-ranges:
-    maxItems: 1
-    description: |
-      Describes the physical address space of IOMMU maps to memory.
-
   "#address-cells":
     const: 2
 
@@ -151,7 +146,6 @@  required:
   - reg
   - iommus
   - mediatek,scp
-  - dma-ranges
   - ranges
 
 if:
@@ -184,7 +178,6 @@  examples:
             compatible = "mediatek,mt8192-vcodec-dec";
             mediatek,scp = <&scp>;
             iommus = <&iommu0 M4U_PORT_L4_VDEC_MC_EXT>;
-            dma-ranges = <0x1 0x0 0x0 0x40000000 0x0 0xfff00000>;
             #address-cells = <2>;
             #size-cells = <2>;
             ranges = <0 0 0 0x16000000 0 0x40000>;