Re: [PATCH v2 4/6] memory: mtk-smi: Fix the return value for clk_bulk_prepare_enable

2022-01-11 Thread AngeloGioacchino Del Regno
Il 11/01/22 07:39, Yong Wu ha scritto: The successful return value for clk_bulk_prepare_enable is 0, rather than "< 0". Fix this. Hello! Thanks for this commit! However, there are a few comments... This description is a bit confusing, please reword it, something like... "Function clk_bulk_pr

Re: [PATCH v2 5/6] memory: mtk-smi: Add sleep ctrl function

2022-01-11 Thread AngeloGioacchino Del Regno
Il 11/01/22 07:39, Yong Wu ha scritto: Sleep control means that when the larb goes to sleep, we should wait a bit until all the current commands are finished. Thus, when the larb runtime suspends, we need to enable this function to wait until all the existed commands are finished. When the larb r

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

2022-01-11 Thread AngeloGioacchino Del Regno
Il 12/11/21 11:55, Yong Wu ha scritto: 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 Gree

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

2022-01-11 Thread AngeloGioacchino Del Regno
Il 12/11/21 11:55, Yong Wu ha scritto: 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 Reviewed-by: AngeloGioacchino Del Regno __

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

2022-01-11 Thread AngeloGioacchino Del Regno
Il 12/11/21 11:55, Yong Wu ha scritto: 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 L

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

2022-01-11 Thread AngeloGioacchino Del Regno
Il 12/11/21 11:55, Yong Wu ha scritto: 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

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

2022-01-11 Thread AngeloGioacchino Del Regno
Il 12/11/21 11:55, Yong Wu ha scritto: 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: Yon

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

2022-01-11 Thread AngeloGioacchino Del Regno
Il 12/11/21 11:55, Yong Wu ha scritto: 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

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

2022-01-11 Thread AngeloGioacchino Del Regno
Il 12/11/21 11:55, Yong Wu ha scritto: 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

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

2022-01-11 Thread AngeloGioacchino Del Regno
Il 12/11/21 11:54, Yong Wu ha scritto: 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

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

2022-01-11 Thread AngeloGioacchino Del Regno
Il 12/11/21 11:55, Yong Wu ha scritto: 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: Yo

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

2022-01-11 Thread AngeloGioacchino Del Regno
Il 12/11/21 11:54, Yong Wu ha scritto: 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

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

2022-01-11 Thread AngeloGioacchino Del Regno
Il 12/11/21 11:54, Yong Wu ha scritto: 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 consum

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

2022-01-11 Thread AngeloGioacchino Del Regno
Il 12/11/21 11:54, Yong Wu ha scritto: 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

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

2022-01-11 Thread AngeloGioacchino Del Regno
Il 12/11/21 11:55, Yong Wu ha scritto: 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

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

2022-01-11 Thread AngeloGioacchino Del Regno
Il 12/11/21 11:54, Yong Wu ha scritto: 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. Cu

Re: [PATCH v12 00/13] Introduce VDUSE - vDPA Device in Userspace

2022-01-11 Thread Michael S. Tsirkin
On Tue, Jan 11, 2022 at 11:31:37AM +0800, Yongji Xie wrote: > On Mon, Jan 10, 2022 at 11:44 PM Michael S. Tsirkin wrote: > > > > On Mon, Jan 10, 2022 at 11:24:40PM +0800, Yongji Xie wrote: > > > On Mon, Jan 10, 2022 at 11:10 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Mon, Jan 10, 2022

Re: [PATCH v12 00/13] Introduce VDUSE - vDPA Device in Userspace

2022-01-11 Thread Yongji Xie
On Tue, Jan 11, 2022 at 7:54 PM Michael S. Tsirkin wrote: > > On Tue, Jan 11, 2022 at 11:31:37AM +0800, Yongji Xie wrote: > > On Mon, Jan 10, 2022 at 11:44 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Jan 10, 2022 at 11:24:40PM +0800, Yongji Xie wrote: > > > > On Mon, Jan 10, 2022 at 11:10 PM

Re: [PATCH v12 00/13] Introduce VDUSE - vDPA Device in Userspace

2022-01-11 Thread Michael S. Tsirkin
On Tue, Jan 11, 2022 at 08:57:49PM +0800, Yongji Xie wrote: > On Tue, Jan 11, 2022 at 7:54 PM Michael S. Tsirkin wrote: > > > > On Tue, Jan 11, 2022 at 11:31:37AM +0800, Yongji Xie wrote: > > > On Mon, Jan 10, 2022 at 11:44 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Mon, Jan 10, 2022

Re: [PATCH v3] dt-bindings: iommu: Convert msm,iommu-v0 to yaml

2022-01-11 Thread Rob Herring
On Sat, Jan 08, 2022 at 07:41:42PM +0100, David Heidelberg wrote: > Convert Qualcomm IOMMU v0 implementation to yaml format. > > Signed-off-by: David Heidelberg > --- > v2: > - fix wrong path in binding $id > - comment qcom,mdp4 node example (we don't want to validate it yet) > > v3: > - I ke