Re: [PATCH 0/4] iommu/arm-smmu: Support Tegra234 SMMU

2021-11-12 Thread Thierry Reding
On Fri, Nov 12, 2021 at 01:43:54PM +, Robin Murphy wrote: > On 12/11/2021 1:12 pm, Thierry Reding wrote: > > From: Thierry Reding > > > > Hi, > > > > this series of patches adds and enables support for the ARM SMMU > > instances found on the new Tegra234 SoC. This is mostly similar to what >

Re: [PATCH 0/4] iommu/arm-smmu: Support Tegra234 SMMU

2021-11-12 Thread Robin Murphy
On 12/11/2021 1:12 pm, Thierry Reding wrote: From: Thierry Reding Hi, this series of patches adds and enables support for the ARM SMMU instances found on the new Tegra234 SoC. This is mostly similar to what can be found on Tegra194 except that there are a few more instances to meet increased b

[PATCH 4/4] arm64: tegra: Add Tegra234 IOMMUs

2021-11-12 Thread Thierry Reding
From: Thierry Reding The NVIDIA Tegra234 SoC comes with one single-instance ARM SMMU used by isochronous memory clients and two dual-instance ARM SMMUs used by non- isochronous memory clients. Add the corresponding device tree nodes and hook up existing memory clients (SDHCI and BPMP). Signed-o

[PATCH 1/4] dt-bindings: arm-smmu: Document nvidia, memory-controller property

2021-11-12 Thread Thierry Reding
From: Thierry Reding On NVIDIA SoC's the ARM SMMU needs to interact with the memory controller in order to map memory clients to the corresponding stream IDs. Document how the nvidia,memory-controller property can be used to achieve this. Signed-off-by: Thierry Reding --- Documentation/devicet

[PATCH 3/4] iommu/arm-smmu: Support Tegra234 SMMU

2021-11-12 Thread Thierry Reding
From: Thierry Reding Allow the NVIDIA-specific ARM SMMU implementation to bind to the SMMU instances found on Tegra234. Signed-off-by: Thierry Reding --- drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/arm/arm-smmu/

[PATCH 2/4] dt-bindings: arm-smmu: Add compatible for Tegra234 SOC

2021-11-12 Thread Thierry Reding
From: Thierry Reding The NVIDIA Tegra234 SoC comes with one single-instance ARM SMMU used by isochronous memory clients and two dual-instance ARM SMMUs used by non- isochronous memory clients. Signed-off-by: Thierry Reding --- Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 4 +++- 1 f

[PATCH 0/4] iommu/arm-smmu: Support Tegra234 SMMU

2021-11-12 Thread Thierry Reding
From: Thierry Reding Hi, this series of patches adds and enables support for the ARM SMMU instances found on the new Tegra234 SoC. This is mostly similar to what can be found on Tegra194 except that there are a few more instances to meet increased bandwidth needs. In addition to adding support

[PATCH v9 15/15] arm64: dts: mediatek: Get rid of mediatek, larb for MM nodes

2021-11-12 Thread Yong Wu
After adding device_link between the IOMMU consumer and smi, the mediatek,larb is unnecessary now. CC: Matthias Brugger Signed-off-by: Yong Wu Reviewed-by: Evan Green --- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 16 arch/arm64/boot/dts/mediatek/mt8183.dtsi | 6 -- 2 fil

[PATCH v9 14/15] arm: dts: mediatek: Get rid of mediatek, larb for MM nodes

2021-11-12 Thread Yong Wu
After adding device_link between the IOMMU consumer and smi, the mediatek,larb is unnecessary now. CC: Matthias Brugger Signed-off-by: Yong Wu Reviewed-by: Evan Green Tested-by: Frank Wunderlich # BPI-R2/MT7623 --- arch/arm/boot/dts/mt2701.dtsi | 2 -- arch/arm/boot/dts/mt7623n.dtsi | 5

[PATCH v9 13/15] memory: mtk-smi: Get rid of mtk_smi_larb_get/put

2021-11-12 Thread Yong Wu
After adding device_link between the iommu consumer and smi-larb, the pm_runtime_get(_sync) of smi-larb and smi-common will be called automatically. we can get rid of mtk_smi_larb_get/put. CC: Matthias Brugger Signed-off-by: Yong Wu Reviewed-by: Evan Green Acked-by: Krzysztof Kozlowski Acked-b

[PATCH v9 12/15] media: mtk-vcodec: enc: Remove mtk_vcodec_release_enc_pm

2021-11-12 Thread Yong Wu
After this patchset, mtk_vcodec_release_enc_pm has only one line. then remove that function, use pm_runtime_disable instead. meanwhile, mtk_vcodec_init_enc_pm only operate for the clocks, rename it from the _pm to _clk. No functional change. CC: Tiffany Lin CC: Irui Wang Signed-off-by: Yong Wu

[PATCH v9 11/15] media: mtk-vcodec: dec: Remove mtk_vcodec_release_dec_pm

2021-11-12 Thread Yong Wu
After this patchset, mtk_vcodec_release_dec_pm has only one line. then remove that function. Use pm_runtime_disable directly instead. For symmetry, move the pm_runtime_enable out from mtk_vcodec_init_dec_pm, then mtk_vcodec_init_dec_pm only operate for the clocks, rename it from the _pm to _clk.

[PATCH v9 10/15] media: mtk-vcodec: Get rid of mtk_smi_larb_get/put

2021-11-12 Thread Yong Wu
MediaTek IOMMU has already added the device_link between the consumer and smi-larb device. If the vcodec device call the pm_runtime_get_sync, the smi-larb's pm_runtime_get_sync also be called automatically. CC: Tiffany Lin CC: Irui Wang Signed-off-by: Yong Wu Reviewed-by: Evan Green Acked-by:

[PATCH v9 09/15] drm/mediatek: Get rid of mtk_smi_larb_get/put

2021-11-12 Thread Yong Wu
MediaTek IOMMU has already added the device_link between the consumer and smi-larb device. If the drm device call the pm_runtime_get_sync, the smi-larb's pm_runtime_get_sync also be called automatically. CC: CK Hu CC: Philipp Zabel Signed-off-by: Yong Wu Reviewed-by: Evan Green Acked-by: Chun-

[PATCH v9 08/15] drm/mediatek: Add pm runtime support for ovl and rdma

2021-11-12 Thread Yong Wu
From: Yongqiang Niu Prepare for smi cleaning up "mediatek,larb". Display use the dispsys device to call pm_rumtime_get_sync before. This patch add pm_runtime_xx with ovl and rdma device whose nodes has "iommus" property, then display could help pm_runtime_get for smi via ovl or rdma device. CC:

[PATCH v9 07/15] media: mtk-mdp: Get rid of mtk_smi_larb_get/put

2021-11-12 Thread Yong Wu
MediaTek IOMMU has already added the device_link between the consumer and smi-larb device. If the mdp device call the pm_runtime_get_sync, the smi-larb's pm_runtime_get_sync also be called automatically. CC: Minghsiu Tsai CC: Houlong Wei Signed-off-by: Yong Wu Reviewed-by: Evan Green Reviewed-

[PATCH v9 06/15] media: mtk-jpeg: Get rid of mtk_smi_larb_get/put

2021-11-12 Thread Yong Wu
MediaTek IOMMU has already added device_link between the consumer and smi-larb device. If the jpg device call the pm_runtime_get_sync, the smi-larb's pm_runtime_get_sync also be called automatically. After removing the larb_get operations, then mtk_jpeg_clk_init is also unnecessary. Remove it too.

[PATCH v9 05/15] iommu/mediatek: Add device_link between the consumer and the larb devices

2021-11-12 Thread Yong Wu
MediaTek IOMMU-SMI diagram is like below. all the consumer connect with smi-larb, then connect with smi-common. M4U | smi-common | - | |... | | larb1 larb2 | | vdec venc When the consumer works, it should enab

[PATCH v9 04/15] iommu/mediatek: Add probe_defer for smi-larb

2021-11-12 Thread Yong Wu
Prepare for adding device_link. The iommu consumer should use device_link to connect with the smi-larb(supplier). then the smi-larb should run before the iommu consumer. Here we delay the iommu driver until the smi driver is ready, then all the iommu consumers always are after the smi driver. Whe

[PATCH v9 03/15] iommu/mediatek: Return ENODEV if the device is NULL

2021-11-12 Thread Yong Wu
The platform device is created at: of_platform_default_populate_init: arch_initcall_sync ->of_platform_populate ->of_platform_device_create_pdata When entering our probe, all the devices should be already created. if it is null, means NODEV. Currently we don't get the fail case. It's a

[PATCH v9 02/15] iommu/mediatek-v1: Free the existed fwspec if the master dev already has

2021-11-12 Thread Yong Wu
When the iommu master device enters of_iommu_xlate, the ops may be NULL(iommu dev is defered), then it will initialize the fwspec here: [] (dev_iommu_fwspec_set) from [] (iommu_fwspec_init+0xbc/0xd4) [] (iommu_fwspec_init) from [] (of_iommu_xlate+0x7c/0x12c) [] (of_iommu_xlate) from [] (of_iommu_c

[PATCH v9 01/15] dt-binding: mediatek: Get rid of mediatek, larb for multimedia HW

2021-11-12 Thread Yong Wu
After adding device_link between the consumer with the smi-larbs, if the consumer call its owner pm_runtime_get(_sync), the pm_runtime_get(_sync) of smi-larb and smi-common will be called automatically. Thus, the consumer don't need this property. And IOMMU also know which larb this consumer conne

[PATCH v9 00/15] Clean up "mediatek,larb"

2021-11-12 Thread Yong Wu
MediaTek IOMMU block diagram always like below: M4U | smi-common | - | | ... | | larb1 larb2 | | vdec venc All the consumer connect with smi-larb, then connect with smi-common. When the consumer works, it should