Re: [PATCH v3 1/2] dma-contiguous: Abstract dma_{alloc,free}_contiguous()

2019-07-25 Thread Dafna Hirschfeld
On Thu, 2019-07-25 at 09:50 -0700, Nicolin Chen wrote: > On Thu, Jul 25, 2019 at 01:06:42PM -0300, Ezequiel Garcia wrote: > > I can't find a way to forward-redirect from Gmail, so I'm Ccing Dafna > > who found a regression caused by this commit. Dafna, can you give all > > the details, including

Re: [PATCH v8 05/14] media: rkisp1: add Rockchip ISP1 subdev driver

2020-08-07 Thread Dafna Hirschfeld
Hi Am 06.08.20 um 14:22 schrieb Tomasz Figa: On Thu, Aug 6, 2020 at 11:21 AM Dafna Hirschfeld wrote: Am 05.08.20 um 23:10 schrieb Dafna Hirschfeld: Hi On 22.07.20 17:24, Tomasz Figa wrote: Hi Dafna, On Sat, Jul 11, 2020 at 01:04:31PM +0200, Dafna Hirschfeld wrote: Hi Laurent

Re: [PATCH v8 05/14] media: rkisp1: add Rockchip ISP1 subdev driver

2020-08-07 Thread Dafna Hirschfeld
Hi, Am 06.08.20 um 14:08 schrieb Tomasz Figa: On Wed, Aug 5, 2020 at 11:10 PM Dafna Hirschfeld wrote: Hi On 22.07.20 17:24, Tomasz Figa wrote: Hi Dafna, On Sat, Jul 11, 2020 at 01:04:31PM +0200, Dafna Hirschfeld wrote: Hi Laurent, On 16.08.19 02:13, Laurent Pinchart wrote: Hello Helen

Re: [PATCH v8 05/14] media: rkisp1: add Rockchip ISP1 subdev driver

2020-08-13 Thread Dafna Hirschfeld
Am 07.08.20 um 18:08 schrieb Dafna Hirschfeld: Hi Am 06.08.20 um 14:22 schrieb Tomasz Figa: On Thu, Aug 6, 2020 at 11:21 AM Dafna Hirschfeld wrote: Am 05.08.20 um 23:10 schrieb Dafna Hirschfeld: Hi On 22.07.20 17:24, Tomasz Figa wrote: Hi Dafna, On Sat, Jul 11, 2020 at 01:04:31PM

Re: [PATCH v5 11/16] drm/mediatek: Get rid of mtk_smi_larb_get/put

2021-05-25 Thread Dafna Hirschfeld
Hi On 10.04.21 12:11, Yong Wu wrote: 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 v7 04/12] iommu/mediatek: Add device_link between the consumer and the larb devices

2021-08-05 Thread Dafna Hirschfeld
org/patchwork/patch/1086569/ Suggested-by: Tomasz Figa Signed-off-by: Yong Wu Tested-by: Dafna Hirschfeld # on mt8173 Hi, unfortunately, I have to take back the Tested-by tag. I am now testing the mtk-vcodec with latest kernel + patches sent from the mailing list: https://gitlab.collabora.

Re: [PATCH v7 3/4] iommu: rockchip: Add internal ops to handle variants

2021-07-29 Thread Dafna Hirschfeld
On 25.05.21 14:15, Benjamin Gaignard wrote: Add internal ops to be able to handle incoming variant v2. The goal is to keep the overall structure of the framework but to allow to add the evolution of this hardware block. The ops are global for a SoC because iommu domains are not attached to a

Re: [PATCH v7 3/4] iommu: rockchip: Add internal ops to handle variants

2021-07-30 Thread Dafna Hirschfeld
On 29.07.21 18:58, Robin Murphy wrote: On 2021-07-29 17:08, Heiko Stübner wrote: Hi Dafna, Am Donnerstag, 29. Juli 2021, 17:59:26 CEST schrieb Dafna Hirschfeld: On 25.05.21 14:15, Benjamin Gaignard wrote: @@ -879,7 +895,7 @@ static int rk_iommu_enable(struct rk_iommu *iommu)    for (i

Re: [PATCH v8 04/12] iommu/mediatek: Add device_link between the consumer and the larb devices

2021-10-11 Thread Dafna Hirschfeld
On 29.09.21 03:37, Yong Wu wrote: 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 v8 04/12] iommu/mediatek: Add device_link between the consumer and the larb devices

2021-10-18 Thread Dafna Hirschfeld
On 16.10.21 04:23, Yong Wu wrote: On Mon, 2021-10-11 at 14:36 +0200, Dafna Hirschfeld wrote: On 29.09.21 03:37, Yong Wu wrote: MediaTek IOMMU-SMI diagram is like below. all the consumer connect with smi-larb, then connect with smi-common. M4U | smi-common

Re: [PATCH v8 09/12] media: mtk-vcodec: Get rid of mtk_smi_larb_get/put

2021-09-29 Thread Dafna Hirschfeld
Wu Reviewed-by: Evan Green Acked-by: Tiffany Lin Reviewed-by: Dafna Hirschfeld --- .../platform/mtk-vcodec/mtk_vcodec_dec_pm.c | 37 +++- .../platform/mtk-vcodec/mtk_vcodec_drv.h | 3 -- .../platform/mtk-vcodec/mtk_vcodec_enc.c | 1 - .../platform/mtk-vcodec

Re: [PATCH v8 03/12] iommu/mediatek: Add probe_defer for smi-larb

2021-09-29 Thread Dafna Hirschfeld
On 29.09.21 03:37, Yong Wu wrote: 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

Re: [PATCH v8 09/12] media: mtk-vcodec: Get rid of mtk_smi_larb_get/put

2021-09-30 Thread Dafna Hirschfeld
On 30.09.21 05:28, Yong Wu wrote: Hi Dafna, Thanks very much for the review. On Wed, 2021-09-29 at 14:13 +0200, Dafna Hirschfeld wrote: On 29.09.21 03:37, Yong Wu wrote: MediaTek IOMMU has already added the device_link between the consumer and smi-larb device. If the vcodec device call

Re: [PATCH v2 11/29] iommu/mediatek: Always pm_runtime_get while tlb flush

2021-09-30 Thread Dafna Hirschfeld
On 13.08.21 08:53, Yong Wu wrote: Prepare for 2 HWs that sharing pgtable in different power-domains. The previous SoC don't have PM. Only mt8192 has power-domain, and it is display's power-domain which nearly always is enabled. hi, I see that in mt1873.dtsi, many devices that uses the

Re: [PATCH v3 13/33] iommu/mediatek: Remove the power status checking in tlb flush all

2021-10-22 Thread Dafna Hirschfeld
Hi On 23.09.21 13:58, Yong Wu wrote: To simplify the code, Remove the power status checking in the tlb_flush_all, remove this: if (pm_runtime_get_if_in_use(data->dev) <= 0) continue; After this patch, the mtk_iommu_tlb_flush_all will be called from a) isr b) pm runtime resume

[PATCH 4/4] iommu/rockchip: replace pt_address cb with dma_addr_dte when setting dt addr

2021-12-04 Thread Dafna Hirschfeld
The dt address is calculated using the dma_addr_dte cb. So when setting the dt address to the DTE_ADDR_DUMMY that cb should be used instead of pt_address. Signed-off-by: Dafna Hirschfeld --- drivers/iommu/rockchip-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/4] iommu/rockchip: replace 4 with sizeof(u32)

2021-12-04 Thread Dafna Hirschfeld
In log_iova, multiply by 4 is used to calculate the addresses. In other places in this driver, sizeof(u3) is used. So replace 4 with sizeof(u32) for consistency Signed-off-by: Dafna Hirschfeld --- drivers/iommu/rockchip-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 2/4] iommu/rockchip: remove redundant var dte_addr

2021-12-04 Thread Dafna Hirschfeld
Using dte_addr as local var is redundant. Instead acces rk_domain->dt[dte_index] directly. Signed-off-by: Dafna Hirschfeld --- drivers/iommu/rockchip-iommu.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockc

[PATCH 3/4] iommu/rockchip: rename dte_index to dte

2021-12-04 Thread Dafna Hirschfeld
In rk_iommu_map, the var dte_index is actually set to the dte and not to the dte index. Rename it. Signed-off-by: Dafna Hirschfeld --- drivers/iommu/rockchip-iommu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip

Re: [PATCH v3 12/33] iommu/mediatek: Always tlb_flush_all when each PM resume

2021-11-09 Thread Dafna Hirschfeld
On 10.11.21 04:20, Yong Wu wrote: On Tue, 2021-11-09 at 14:21 +0200, Dafna Hirschfeld wrote: Hi This patch is needed in order to update the tlb when a device is powered on. Could you send this patch alone without the whole series so it get accepted easier? Which SoC are you testing

Re: [PATCH v3 12/33] iommu/mediatek: Always tlb_flush_all when each PM resume

2021-11-27 Thread Dafna Hirschfeld
On 10.11.21 09:50, Yong Wu wrote: On Wed, 2021-11-10 at 07:29 +0200, Dafna Hirschfeld wrote: On 10.11.21 04:20, Yong Wu wrote: On Tue, 2021-11-09 at 14:21 +0200, Dafna Hirschfeld wrote: Hi This patch is needed in order to update the tlb when a device is powered on. Could you send

[PATCH 0/2] iommu/mediatek: fix tlb flush logic

2021-11-22 Thread Dafna Hirschfeld
Often devices allocate dma buffers before they do runtime pm resume. This is the case for example with v4l2 devices where buffers are allocated during 'VIDIOC_REQBUFS` and runtime resume happens later usually during 'VIDIOC_STREAMON'. In such cases the partial tlb flush when allocating will fail

[PATCH 1/2] iommu/mediatek: Always tlb_flush_all when each PM resume

2021-11-22 Thread Dafna Hirschfeld
nearly always is enabled. thus no need fix tags here. Prepare for mt8195. Signed-off-by: Yong Wu [imporvie inline doc] Signed-off-by: Dafna Hirschfeld --- drivers/iommu/mtk_iommu.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c

[PATCH 2/2] iommu/mediatek: always check runtime PM status in tlb flush range callback

2021-11-22 Thread Dafna Hirschfeld
nvolved. Signed-off-by: Sebastian Reichel Reviewed-by: Dafna Hirschfeld --- drivers/iommu/mtk_iommu.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 28dc4b95b6d9..b0535fcfd1d7 100644 --- a/drivers/iommu/mtk_i

Re: [PATCH v3 12/33] iommu/mediatek: Always tlb_flush_all when each PM resume

2021-11-22 Thread Dafna Hirschfeld
On 22.11.21 09:05, Yong Wu wrote: Hi Dafna, On Wed, 2021-11-10 at 15:50 +0800, Yong Wu wrote: On Wed, 2021-11-10 at 07:29 +0200, Dafna Hirschfeld wrote: On 10.11.21 04:20, Yong Wu wrote: On Tue, 2021-11-09 at 14:21 +0200, Dafna Hirschfeld wrote: Hi This patch is needed in order

Re: [PATCH v3 12/33] iommu/mediatek: Always tlb_flush_all when each PM resume

2021-11-09 Thread Dafna Hirschfeld
Hi This patch is needed in order to update the tlb when a device is powered on. Could you send this patch alone without the whole series so it get accepted easier? I can resend the patch on your behalf if you want. Thanks, Dafna On 23.09.21 14:58, Yong Wu wrote: Prepare for 2 HWs that sharing

[PATCH] iommu: log iova range in map/unmap trace events

2021-11-04 Thread Dafna Hirschfeld
In case of an iommu page fault, the faulting iova is logged in trace_io_page_fault. It is therefore convenient to log the iova range in mapping/unmapping trace events so that it is easier to see if the faulting iova was recently in any of those ranges. Signed-off-by: Dafna Hirschfeld

Re: [PATCH v3 12/33] iommu/mediatek: Always tlb_flush_all when each PM resume

2021-11-30 Thread Dafna Hirschfeld
On 30.11.21 09:39, Yong Wu wrote: On Sat, 2021-11-27 at 12:11 +0200, Dafna Hirschfeld wrote: On 10.11.21 09:50, Yong Wu wrote: On Wed, 2021-11-10 at 07:29 +0200, Dafna Hirschfeld wrote: On 10.11.21 04:20, Yong Wu wrote: On Tue, 2021-11-09 at 14:21 +0200, Dafna Hirschfeld wrote: Hi

Re: [PATCH] CHROMIUM: iommu: rockchip: Make sure that page table state is coherent

2021-12-09 Thread Dafna Hirschfeld
On 23.03.15 10:38, Tomasz Figa wrote: Sorry, I had to dig my way out through my backlog. On Tue, Mar 3, 2015 at 10:36 PM, Joerg Roedel wrote: On Mon, Feb 09, 2015 at 08:19:21PM +0900, Tomasz Figa wrote: Even though the code uses the dt_lock spin lock to serialize mapping operation from

Re: [PATCH 1/2] iommu/mediatek: Always tlb_flush_all when each PM resume

2021-12-08 Thread Dafna Hirschfeld
On 08.12.21 11:50, Dafna Hirschfeld wrote: On 07.12.21 10:31, Dafna Hirschfeld wrote: On 27.11.21 04:46, Yong Wu wrote: Hi Dafna, Sorry for reply late. On Mon, 2021-11-22 at 12:43 +0200, Dafna Hirschfeld wrote: From: Yong Wu Prepare for 2 HWs that sharing pgtable in different power

Re: [PATCH 1/2] iommu/mediatek: Always tlb_flush_all when each PM resume

2021-12-08 Thread Dafna Hirschfeld
On 07.12.21 10:31, Dafna Hirschfeld wrote: On 27.11.21 04:46, Yong Wu wrote: Hi Dafna, Sorry for reply late. On Mon, 2021-11-22 at 12:43 +0200, Dafna Hirschfeld wrote: From: Yong Wu Prepare for 2 HWs that sharing pgtable in different power-domains. When there are 2 M4U HWs, it may has

[PATCH v2 3/5] iommu/mediatek: Remove the power status checking in tlb flush all

2021-12-08 Thread Dafna Hirschfeld
write is ignored. Signed-off-by: Yong Wu [refactor commit log] Signed-off-by: Dafna Hirschfeld --- drivers/iommu/mtk_iommu.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index dd2c08c54df4..e30ac68fab48 100644 --- a/drivers

[PATCH v2 2/5] iommu/mediatek: Always check runtime PM status in tlb flush range callback

2021-12-08 Thread Dafna Hirschfeld
nvolved. Signed-off-by: Sebastian Reichel Reviewed-by: Dafna Hirschfeld --- drivers/iommu/mtk_iommu.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 342aa562ab6a..dd2c08c54df4 100644 --- a/drivers/iommu/mtk_i

[PATCH v2 4/5] iommu/mediatek: Add tlb_lock in tlb_flush_all

2021-12-08 Thread Dafna Hirschfeld
From: Yong Wu The tlb_flush_all touches the registers controlling tlb operations. Protect it with the tlb_lock spinlock. This also require the range_sync func to release that spinlock before calling tlb_flush_all. Signed-off-by: Yong Wu [refactor commit log] Signed-off-by: Dafna Hirschfeld

[PATCH v2 0/5] iommu/mediatek: Fix tlb flush logic

2021-12-08 Thread Dafna Hirschfeld
Often devices allocate DMA buffers before they do runtime pm resume. This is the case for example with v4l2 devices where buffers are allocated during 'VIDIOC_REQBUFS` and runtime resume happens later usually during 'VIDIOC_STREAMON'. In such cases the partial tlb flush when allocating will fail

[PATCH v2 5/5] iommu/mediatek: Always tlb_flush_all when each PM resume

2021-12-08 Thread Dafna Hirschfeld
clean. In other case, the iommu's power should be active via device link with smi. Signed-off-by: Yong Wu [move the call to mtk_iommu_tlb_flush_all to the bottom of resume cb, improve doc/log] Signed-off-by: Dafna Hirschfeld --- drivers/iommu/mtk_iommu.c | 7 +++ 1 file changed, 7 insertions

[PATCH v2 1/5] iommu/mediatek: Remove for_each_m4u in tlb_sync_all

2021-12-08 Thread Dafna Hirschfeld
in this tlb_sync_all. Remove it. Signed-off-by: Yong Wu Reviewed-by: Dafna Hirschfeld --- drivers/iommu/mtk_iommu.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 507123ae7485..342aa562ab6a 100644 --- a/drivers/iommu

Re: [PATCH 1/2] iommu/mediatek: Always tlb_flush_all when each PM resume

2021-12-07 Thread Dafna Hirschfeld
On 27.11.21 04:46, Yong Wu wrote: Hi Dafna, Sorry for reply late. On Mon, 2021-11-22 at 12:43 +0200, Dafna Hirschfeld wrote: From: Yong Wu Prepare for 2 HWs that sharing pgtable in different power-domains. When there are 2 M4U HWs, it may has problem in the flush_range in which we get

Re: [PATCH v6 05/11] media: mtk-mdp: Get rid of mtk_smi_larb_get/put

2021-07-14 Thread Dafna Hirschfeld
-by: Yong Wu Reviewed-by: Evan Green Reviewed-by: Houlong Wei Reviewed-by: Dafna Hirschfeld --- drivers/media/platform/mtk-mdp/mtk_mdp_comp.c | 46 +-- drivers/media/platform/mtk-mdp/mtk_mdp_comp.h | 2 - drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 1 - 3 files changed, 1

Re: [PATCH v6 04/11] media: mtk-jpeg: Get rid of mtk_smi_larb_get/put

2021-07-14 Thread Dafna Hirschfeld
, then mtk_jpeg_clk_init is also unnecessary. Remove it too. CC: Rick Chang CC: Xia Jiang Signed-off-by: Yong Wu Reviewed-by: Evan Green Acked-by: Rick Chang Reviewed-by: Dafna Hirschfeld --- .../media/platform/mtk-jpeg/mtk_jpeg_core.c | 45 +-- .../media/platform/mtk-jpeg

Re: [PATCH v6 09/11] memory: mtk-smi: Get rid of mtk_smi_larb_get/put

2021-07-14 Thread Dafna Hirschfeld
Acked-by: Krzysztof Kozlowski Acked-by: Matthias Brugger Reviewed-by: Dafna Hirschfeld --- drivers/memory/mtk-smi.c | 14 -- include/soc/mediatek/smi.h | 20 2 files changed, 34 deletions(-) diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk

Re: [PATCH v6 00/11] Clean up "mediatek,larb"

2021-07-14 Thread Dafna Hirschfeld
always passes so I added tested-by: Tested-by: Dafna Hirschfeld Thanks, Dafna On 14.07.21 04:56, Yong Wu wrote: MediaTek IOMMU block diagram always like below: M4U | smi-common | - | | ... | | larb1 larb2

Re: [PATCH v6 03/11] iommu/mediatek: Add device_link between the consumer and the larb devices

2021-07-14 Thread Dafna Hirschfeld
On 14.07.21 04:56, Yong Wu wrote: 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 v6 06/11] drm/mediatek: Add pm runtime support for ovl and rdma

2021-07-14 Thread Dafna Hirschfeld
On 14.07.21 04:56, Yong Wu wrote: 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

Re: [PATCH v6 07/11] drm/mediatek: Get rid of mtk_smi_larb_get/put

2021-07-14 Thread Dafna Hirschfeld
Reviewed-by: Evan Green Acked-by: Chun-Kuang Hu Reviewed-by: Dafna Hirschfeld --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 9 -- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 36 ++--- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 1 - drivers/gpu/drm/mediatek

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

2021-07-14 Thread Dafna Hirschfeld
Hi, thanks for the patch On 14.07.21 04:56, Yong Wu wrote: 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 the

Re: [PATCH v6 08/11] media: mtk-vcodec: Get rid of mtk_smi_larb_get/put

2021-07-14 Thread Dafna Hirschfeld
Wu Reviewed-by: Evan Green Acked-by: Tiffany Lin Reviewed-by: Dafna Hirschfeld --- .../platform/mtk-vcodec/mtk_vcodec_dec_pm.c | 37 +++- .../platform/mtk-vcodec/mtk_vcodec_drv.h | 3 -- .../platform/mtk-vcodec/mtk_vcodec_enc.c | 1 - .../platform/mtk-vcodec

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

2021-07-14 Thread Dafna Hirschfeld
On 14.07.21 10:13, Dafna Hirschfeld wrote: Hi, thanks for the patch On 14.07.21 04:56, Yong Wu wrote: 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