Re: [PATCH 13/23] drm/rockchip: Make use of the helper component_compare_dev

2022-02-14 Thread Heiko Stübner
Am Montag, 14. Februar 2022, 07:08:09 CET schrieb Yong Wu: > Use the common compare helper from component. > > Cc: Sandy Huang > Cc: "Heiko St¨¹bner" > Cc: linux-rockc...@lists.infradead.org > Signed-off-by: Yong Wu Acked-by: Heiko Stuebner > --- > drivers/gpu/drm/rockchip/rockchip_drm_drv.

Re: [PATCH] iommu/rockchip: Fix PAGE_DESC_HI_MASKs for RK3568

2021-11-24 Thread Heiko Stübner
Am Mittwoch, 24. November 2021, 03:13:25 CET schrieb Alex Bee: > With the submission of iommu driver for RK3568 a subtle bug was > introduced: PAGE_DESC_HI_MASK1 and PAGE_DESC_HI_MASK2 have to be > the other way arround - that leads to random errors, especially when > addresses beyond 32 bit are us

Re: [PATCH v3 08/25] iommu/rockchip: Drop IOVA cookie management

2021-08-04 Thread Heiko Stübner
Am Mittwoch, 4. August 2021, 19:15:36 CEST schrieb Robin Murphy: > The core code bakes its own cookies now. > > CC: Heiko Stuebner > Signed-off-by: Robin Murphy On a Rockchip rk3288 (arm32), rk3399 (arm64) and px30 (arm64) with the graphics pipeline using the iommu Tested-by: Heiko Stuebner

Re: [PATCH v3 01/25] iommu: Pull IOVA cookie management into the core

2021-08-04 Thread Heiko Stübner
Am Mittwoch, 4. August 2021, 19:15:29 CEST schrieb Robin Murphy: > Now that everyone has converged on iommu-dma for IOMMU_DOMAIN_DMA > support, we can abandon the notion of drivers being responsible for the > cookie type, and consolidate all the management into the core code. > > CC: Marek Szyprow

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

2021-07-29 Thread Heiko Stübner
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 = 0; i < iommu->num_mmu; i++) { > > rk_iommu_write(iommu->bases

Re: [PATCH v2 00/24] iommu: Refactor DMA domain strictness

2021-07-29 Thread Heiko Stübner
Am Donnerstag, 29. Juli 2021, 17:43:07 CEST schrieb Robin Murphy: > On 2021-07-29 16:04, Heiko Stübner wrote: > > Hi Robin, > > > > Am Mittwoch, 28. Juli 2021, 17:58:21 CEST schrieb Robin Murphy: > >> Hi all, > >> > >> Here's v2 where th

Re: [PATCH v2 00/24] iommu: Refactor DMA domain strictness

2021-07-29 Thread Heiko Stübner
Hi Robin, Am Mittwoch, 28. Juli 2021, 17:58:21 CEST schrieb Robin Murphy: > Hi all, > > Here's v2 where things start to look more realistic, hence the expanded > CC list. The patches are now based on the current iommu/core branch to > take John's iommu_set_dma_strict() cleanup into account. > >

Re: [PATCH 2/2] iommu: Drop unnecessary of_iommu.h includes

2021-05-28 Thread Heiko Stübner
Am Donnerstag, 27. Mai 2021, 21:37:10 CEST schrieb Rob Herring: > The only place of_iommu.h is needed is in drivers/of/device.c. Remove it > from everywhere else. > > Cc: Will Deacon > Cc: Robin Murphy > Cc: Joerg Roedel > Cc: Rob Clark > Cc: Marek Szyprowski > Cc: Krzysztof Kozlowski > Cc:

Re: [PATCH v5 1/4] dt-bindings: iommu: rockchip: Convert IOMMU to DT schema

2021-05-21 Thread Heiko Stübner
Am Freitag, 21. Mai 2021, 10:36:34 CEST schrieb Benjamin Gaignard: > Convert Rockchip IOMMU to DT schema > > Signed-off-by: Benjamin Gaignard > Reviewed-by: Rob Herring Reviewed-by: Heiko Stuebner ___ iommu mailing list iommu@lists.linux-foundatio

Re: [PATCH v5 2/4] dt-bindings: iommu: rockchip: Add compatible for v2

2021-05-21 Thread Heiko Stübner
Am Freitag, 21. Mai 2021, 10:36:35 CEST schrieb Benjamin Gaignard: > Add compatible for the second version of IOMMU hardware block. > RK356x IOMMU can also be link to a power domain. > > Signed-off-by: Benjamin Gaignard > Reviewed-by: Rob Herring Reviewed-by: Heiko Stuebner > --- > .../devic

Re: [PATCH v5 4/4] iommu: rockchip: Add support for iommu v2

2021-05-21 Thread Heiko Stübner
Am Freitag, 21. Mai 2021, 10:36:37 CEST schrieb Benjamin Gaignard: > This second version of the hardware block has a different bits > mapping for page table entries. > Add the ops matching to this new mapping. > Define a new compatible to distinguish it from the first version. > > Signed-off-by: B

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

2021-05-21 Thread Heiko Stübner
Am Freitag, 21. Mai 2021, 10:36:36 CEST schrieb Benjamin Gaignard: > 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 do

Re: [PATCH v4 6/6] iommu: rockchip: Add support iommu v2

2021-05-17 Thread Heiko Stübner
Hi Benjamin, Am Freitag, 7. Mai 2021, 11:02:32 CEST schrieb Benjamin Gaignard: > From: Simon Xue > > RK356x SoC got new IOMMU hardware block (version 2). > Add a compatible to distinguish it from the first version. > > Signed-off-by: Simon Xue > [Benjamin] > - port driver from kernel 4.19 to 5

Re: [PATCH] iommu/rockchip: Don't loop until failure to count interrupts

2019-10-08 Thread Heiko Stübner
Hi Enric, Am Dienstag, 8. Oktober 2019, 15:58:43 CEST schrieb Enric Balletbo i Serra: > As platform_get_irq() now prints an error when the interrupt does not > exist, counting interrupts by looping until failure causes the printing > of scary messages like: > > rk_iommu ff924000.iommu: IRQ index

Re: [PATCH 09/10] iommu/rockchip: convert to SPDX license tags

2019-06-13 Thread Heiko Stübner
Am Donnerstag, 13. Juni 2019, 18:27:02 CEST schrieb Yangtao Li: > Updates license to use SPDX-License-Identifier. > > Signed-off-by: Yangtao Li Acked-by: Heiko Stuebner

Re: [PATCH 1/9] mm: Introduce new vm_insert_range API

2018-11-28 Thread Heiko Stübner
Am Donnerstag, 15. November 2018, 16:45:30 CET schrieb Souptick Joarder: > Previouly drivers have their own way of mapping range of > kernel pages/memory into user vma and this was done by > invoking vm_insert_page() within a loop. > > As this pattern is common across different drivers, it can > b

[PATCH] drm/rockchip: vop: fix irq disabled after vop driver probed

2018-05-24 Thread Heiko Stübner
From: Sandy Huang The vop irq is shared between vop and iommu and irq probing in the iommu driver moved to the probe function recently. This can in some cases lead to a stall if the irq is triggered while the vop driver still has it disabled. But there is no real need to disable the irq, as the

Re: [PATCH V3 1/4] ARM64: dts: rockchip: rk3328 add iommu nodes

2017-07-27 Thread Heiko Stübner
Hi Joerg, Am Donnerstag, 27. Juli 2017, 14:15:18 CEST schrieb Joerg Roedel: > Hey Heiko, > > On Wed, Jul 26, 2017 at 03:53:06PM +0200, Heiko Stübner wrote: > > Having code and dts changes go through different trees is no problem, as > > they don't have a compile-time

Re: [PATCH V3 1/4] ARM64: dts: rockchip: rk3328 add iommu nodes

2017-07-26 Thread Heiko Stübner
Hi Joerg, Am Mittwoch, 26. Juli 2017, 14:27:53 CEST schrieb Joerg Roedel: > On Wed, Jul 26, 2017 at 01:44:02PM +0200, Heiko Stübner wrote: > > I really would prefer iommu dt-nodes going through my tree :-) > > > > Especially as parts of these conflict with alread

Re: [PATCH V3 1/4] ARM64: dts: rockchip: rk3328 add iommu nodes

2017-07-26 Thread Heiko Stübner
Hi Joerg, Am Mittwoch, 26. Juli 2017, 12:58:19 CEST schrieb Joerg Roedel: > On Mon, Jul 24, 2017 at 10:32:07AM +0800, Simon Xue wrote: > > Add H265e/VEPU/VPU/VDEC/VOP iommu nodes > > > > Signed-off-by: Simon Xue > > --- > > > > changes since V2: > > - none > > > > arch/arm64/boot/dts/rockch

Re: [PATCH] iommu/rockchip: Remove build dependency on ARM

2017-05-10 Thread Heiko Stübner
Hi Jeffy, Am Mittwoch, 10. Mai 2017, 18:28:12 CEST schrieb Jeffy Chen: > This patch removes the build dependency on ARM, so we can build on arm64 > as well. > > Signed-off-by: Jeffy Chen > --- > > drivers/iommu/Kconfig | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/iommu/Kcon

Re: [PATCH] iommu/rockchip: Make use of 'struct iommu_device'

2017-04-03 Thread Heiko Stübner
Am Montag, 3. April 2017, 13:07:58 CEST schrieb Joerg Roedel: > Hey Heiko, > > On Mon, Apr 03, 2017 at 11:56:59AM +0200, Heiko Stübner wrote: > > In general works, and I still keep a working iommu-based display :-) > > I can also see my two vop iommus under /sys/class/

Re: [PATCH] iommu/rockchip: Make use of 'struct iommu_device'

2017-04-03 Thread Heiko Stübner
Hi Joerg, Am Freitag, 31. März 2017, 16:30:24 CEST schrieb Joerg Roedel: > From: Joerg Roedel > > Register hardware IOMMUs seperatly with the iommu-core code > and add a sysfs representation of the iommu topology. > > Signed-off-by: Joerg Roedel In general works, and I still keep a working io

Re: [PATCH v5 8/8] iommu/rockchip: Enable Rockchip IOMMU on ARM64

2016-11-29 Thread Heiko Stübner
Am Montag, 28. November 2016, 16:42:27 schrieb Brian Norris: > Hi, > > On Fri, Jun 24, 2016 at 10:13:33AM +0800, Shunqian Zheng wrote: > > From: Simon Xue > > > > This patch makes it possible to compile the rockchip-iommu driver on > > ARM64, so that it can be used with 64-bit SoCs equipped with

Re: [PATCH v4 0/8] iommu/rockchip: Fix bugs and enable on ARM64

2016-06-21 Thread Heiko Stübner
Am Dienstag, 21. Juni 2016, 14:54:35 schrieb Joerg Roedel: > Hi Tomasz, > > On Tue, Jun 21, 2016 at 09:42:16PM +0900, Tomasz Figa wrote: > > In simple words, DRM patches depend on IOMMU patches. > > > > More precisely: The IOMMU patches alone are supposed to not break > > anything. Same goes for

Re: [RESEND PATCH] iommu/rockchip: fix zap cache during device attach

2016-06-08 Thread Heiko Stübner
Hi Joerg, Am Mittwoch, 1. Juni 2016, 16:46:10 schrieb John Keeping: > rk_iommu_command() takes a struct rk_iommu and iterates over the slave > MMUs, so this is doubly wrong in that we're passing in the wrong pointer > and talking to MMUs that we shouldn't be. > > Fixes: cd6438c5f844 ("iommu/rockc

Re: [PATCH 00/18] Clean up exposure of arch-internal code

2015-07-27 Thread Heiko Stübner
Am Montag, 27. Juli 2015, 15:13:13 schrieb Joerg Roedel: > [+ Heiko for comment on Rockchip IOMMU] adding also Daniel Kurtz and Tomasz Figa who did most of the iommu stuff if I remember correctly. While I'm not this versed in the iommu world I see the issue Russell pointed out, as especially t

Re: [PATCH 03/22] iommu: Propagate error in add_iommu_group

2015-06-29 Thread Heiko Stübner
Hi Joerg, Am Montag, 29. Juni 2015, 16:06:37 schrieb Joerg Roedel: > On Mon, Jun 29, 2015 at 11:28:40AM +0200, Heiko Stübner wrote: > > The Rockchip iommu uses bus_set_ops to set its iommu-ops for the platform > > bus and currently returns -ENODEV if it encounters a platform_device

Re: [PATCH 03/22] iommu: Propagate error in add_iommu_group

2015-06-29 Thread Heiko Stübner
Hi Joerg, Am Donnerstag, 28. Mai 2015, 18:41:26 schrieb Joerg Roedel: > From: Joerg Roedel > > Make sure any errors reported from the IOMMU drivers get > progapated back to the IOMMU core. > > Signed-off-by: Joerg Roedel sorry that this series slipped through my inbox without testing somehow

Re: [PATCH] iommu: rockchip: fix build without CONFIG_OF

2015-04-17 Thread Heiko Stübner
Am Freitag, 10. April 2015, 23:58:24 schrieb Arnd Bergmann: > The rockchip iommu driver references its of_device_id table > from the init function, which fails to build when the table > is undefined: > > iommu/rockchip-iommu.c: In function 'rk_iommu_init': > iommu/rockchip-iommu.c:1029:35: error:

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

2015-02-10 Thread Heiko Stübner
Am Montag, 9. Februar 2015, 20:19:21 schrieb Tomasz Figa: > Even though the code uses the dt_lock spin lock to serialize mapping > operation from different threads, it does not protect from IOMMU > accesses that might be already taking place and thus altering state > of the IOTLB. This means that c

Re: [PATCH 3/4] iommu/rockchip: Play nice in multi-platform builds

2015-02-05 Thread Heiko Stübner
Hi Thierry, Am Mittwoch, 4. Februar 2015, 08:58:09 schrieb Thierry Reding: > From: Thierry Reding > > The Rockchip IOMMU driver unconditionally executes code and registers a > struct iommu_ops with the platform bus irrespective of whether it runs > on a Rockchip SoC or not. This causes problems

Re: [PATCH URGENT] arm: dma-mapping: Set DMA IOMMU ops in arm_iommu_attach_device()

2015-01-27 Thread Heiko Stübner
Hi Arnd, Olof, Am Freitag, 23. Januar 2015, 16:21:49 schrieb Laurent Pinchart: > Commit 4bb25789ed28228a ("arm: dma-mapping: plumb our iommu mapping ops > into arch_setup_dma_ops") moved the setting of the DMA operations from > arm_iommu_attach_device() to arch_setup_dma_ops() where the DMA > oper

Re: [PATCH URGENT] arm: dma-mapping: Set DMA IOMMU ops in arm_iommu_attach_device()

2015-01-25 Thread Heiko Stübner
Am Freitag, 23. Januar 2015, 16:21:49 schrieb Laurent Pinchart: > Commit 4bb25789ed28228a ("arm: dma-mapping: plumb our iommu mapping ops > into arch_setup_dma_ops") moved the setting of the DMA operations from > arm_iommu_attach_device() to arch_setup_dma_ops() where the DMA > operations to be use

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-14 Thread Heiko Stübner
Hi Will, Alexandre, Daniel, Am Mittwoch, 14. Januar 2015, 10:46:10 schrieb Will Deacon: > Hi Alex, > > On Wed, Jan 14, 2015 at 09:00:24AM +, Alexandre Courbot wrote: > > On 12/02/2014 01:57 AM, Will Deacon wrote: > > > This patch plumbs the existing ARM IOMMU DMA infrastructure (which isn't >

[PATCH] iommu: Improve error handling when setting bus iommu

2014-10-28 Thread Heiko Stübner
When some part of bus_set_iommu fails it should undo any made changes and not simply leave everything as is. This includes unregistering the bus notifier in iommu_bus_init when add_iommu_group fails and also setting the bus->iommu_ops back to NULL. Signed-off-by: Heiko Stuebner --- drivers/iomm

Re: [PATCH v6 1/3] iommu/rockchip: rk3288 iommu driver

2014-10-28 Thread Heiko Stübner
Am Mittwoch, 29. Oktober 2014, 02:50:06 schrieb Daniel Kurtz: > Heiko, > > Does this version work for you on 3.18-rc1? the iommu and drm driver using it did probe sucessfully, so Tested-by: Heiko Stuebner > > On Oct 27, 2014 8:44 PM, "Daniel Kurtz" wrote: > > The rk3288 has several iommus.

Re: [PATCH v5 1/3] iommu/rockchip: rk3288 iommu driver

2014-10-26 Thread Heiko Stübner
Hi Daniel, Am Freitag, 24. Oktober 2014, 15:33:47 schrieb Daniel Kurtz: [...] > +static int rk_iommu_attach_device(struct iommu_domain *domain, > + struct device *dev) > +{ > + struct rk_iommu *iommu = dev_get_drvdata(dev->archdata.iommu); Here I get a null-ptr

Re: [PATCH 0/3] Rockchip IOMMU driver and devicetree bindings

2014-10-23 Thread Heiko Stübner
Am Freitag, 24. Oktober 2014, 00:11:06 schrieb Daniel Kurtz: > On Wed, Oct 22, 2014 at 11:20 PM, Joerg Roedel wrote: > > On Wed, Oct 01, 2014 at 06:20:40PM +0800, Daniel Kurtz wrote: > > > Add a driver and devicetree bindings for the IOMMU found in Rockchip > > > > RK3288 > > > > > SoCs. > > >