Skip to contentSkip to conversation

arm64: dts: mediatek: mt8192: Add missing dma-ranges to soc node

PATCH Applied Nícolas F. R. A. Prado 3 participants 3 messages Jun 1, 2023 – Jun 6, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: mediatek: mt8192: Add missing dma-ranges to soc node

In the series "Adjust the dma-ranges for MTK IOMMU", the mtk-iommu driver was adapted to separate the iova range based on the larb used, and a dma-ranges property was added to the soc node in the devicetree of the affected SoCs allowing the whole 16GB iova range to be used. Except that for mt8192, there was no patch adding dma-ranges.

Add the missing dma-ranges property to the soc node like was done for mt8195 and mt8186. This fixes the usage of the vcodec, which would otherwise trigger iommu faults.

---
Matthias,

this is a very simple but important fix for the vcodec functionality. Since the vcodec node for mt8192 was just merged, can we please get this in in this merge window as well?

Thanks,
Nícolas

 arch/arm64/boot/dts/mediatek/mt8192.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/mediatek/mt8192.dtsi +1 -0
index 7ff183c35494..a3612de8e9d1 100644
@@ -401,6 +401,7 @@ soc {
 		#address-cells = <2>;
 		#size-cells = <2>;
 		compatible = "simple-bus";
+		dma-ranges = <0x0 0x0 0x0 0x0 0x4 0x0>;
 		ranges;
 
 		gic: interrupt-controller@c000000 {
Signature · 1 line
2.40.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

Il 01/06/23 22:32, Nícolas F. R. A. Prado ha scritto:

Quoted 10 lines

In the series "Adjust the dma-ranges for MTK IOMMU", the mtk-iommu driver was adapted to separate the iova range based on the larb used, and a dma-ranges property was added to the soc node in the devicetree of the affected SoCs allowing the whole 16GB iova range to be used. Except that for mt8192, there was no patch adding dma-ranges.

Add the missing dma-ranges property to the soc node like was done for mt8195 and mt8186. This fixes the usage of the vcodec, which would otherwise trigger iommu faults.

Quoted 8 lines

---
Matthias,

this is a very simple but important fix for the vcodec functionality. Since the vcodec node for mt8192 was just merged, can we please get this in in this merge window as well?

+1

Quoted 19 lines

Thanks,
Nícolas

  arch/arm64/boot/dts/mediatek/mt8192.dtsi | 1 +
  1 file changed, 1 insertion(+)
arch/arm64/boot/dts/mediatek/mt8192.dtsi +1 -0
index 7ff183c35494..a3612de8e9d1 100644
@@ -401,6 +401,7 @@ soc {
  		#address-cells = <2>;
  		#size-cells = <2>;
  		compatible = "simple-bus";
+		dma-ranges = <0x0 0x0 0x0 0x0 0x4 0x0>;
  		ranges;
 
  		gic: interrupt-controller@c000000 {
maintainer Applied
#2 lore raw
Quoted 16 lines · AngeloGioacchino Del Regno

Il 01/06/23 22:32, Nícolas F. R. A. Prado ha scritto:

Quoted 15 lines

In the series "Adjust the dma-ranges for MTK IOMMU", the mtk-iommu driver was adapted to separate the iova range based on the larb used, and a dma-ranges property was added to the soc node in the devicetree of the affected SoCs allowing the whole 16GB iova range to be used. Except that for mt8192, there was no patch adding dma-ranges.

Add the missing dma-ranges property to the soc node like was done for mt8195 and mt8186. This fixes the usage of the vcodec, which would otherwise trigger iommu faults.

---
Matthias,

Quoted 8 lines
Quoted 3 lines

this is a very simple but important fix for the vcodec functionality. Since the vcodec node for mt8192 was just merged, can we please get this in in this merge window as well?

+1

Applied, thanks!

Quoted 19 lines
Quoted 18 lines

Thanks,
Nícolas

  arch/arm64/boot/dts/mediatek/mt8192.dtsi | 1 +

  1 file changed, 1 insertion(+)
arch/arm64/boot/dts/mediatek/mt8192.dtsi +1 -0
index 7ff183c35494..a3612de8e9d1 100644
@@ -401,6 +401,7 @@ soc {
           #address-cells = <2>;
           #size-cells = <2>;
           compatible = "simple-bus";
+        dma-ranges = <0x0 0x0 0x0 0x0 0x4 0x0>;
           ranges;
           gic: interrupt-controller@c000000 {