[RFC PATCH 1/2] dt-bindings: iommu: add bindings for sprd iommu

2020-12-23 Thread Chunyan Zhang
From: Chunyan Zhang This patch only adds bindings to support display iommu, support for others would be added once finished tests with those devices, such as Image codec(jpeg) processor, a few signal processors, including VSP(video), GSP(graphic), ISP(image), and camera CPP, etc. Signed-off

[RFC PATCH V2 2/2] iommu: add Unisoc iommu basic driver

2021-01-08 Thread Chunyan Zhang
From: Chunyan Zhang This patch only adds display iommu support, the driver was tested with sprd dpu. The iommu support for others would be added once finished tests with those devices, such as Image codec(jpeg) processor, a few signal processors, including VSP(video), GSP(graphic), ISP(image

[RFC PATCH V2 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-01-08 Thread Chunyan Zhang
From: Chunyan Zhang This patch only adds bindings to support display iommu. The iommu support for others would be added once finished tests with those devices, such as Image codec(jpeg) processor, a few signal processors, including VSP(video), GSP(graphic), ISP(image), and camera CPP, etc

[RFC PATCH V2 0/2] Add Unisoc iommu basic driver

2021-01-08 Thread Chunyan Zhang
From: Chunyan Zhang Changes since RFC v1: * Rebased on v5.11-rc1; * Changed sprd-iommu to tristate; * Removed check for args_count of iommu OF node, since there's no args for sprd-iommu device node; * Added another IP version (i.e. vau); * Removed unnecessary configs selection from

Re: [RFC PATCH 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-01-08 Thread Chunyan Zhang
On Fri, 8 Jan 2021 at 10:25, Rob Herring wrote: > > On Wed, Dec 23, 2020 at 07:16:32PM +0800, Chunyan Zhang wrote: > > From: Chunyan Zhang > > > > This patch only adds bindings to support display iommu, support for others > > would be added once finished tests wit

Re: [RFC PATCH V2 2/2] iommu: add Unisoc iommu basic driver

2021-01-20 Thread Chunyan Zhang
On Wed, 20 Jan 2021 at 20:29, Robin Murphy wrote: > > On 2021-01-20 11:40, Chunyan Zhang wrote: > [...] > >>> + pgt_base_iova = dom->pgt_va + > >>> + ((iova - mdata->iova_start) >> SPRD_IOMMU_PAGE_SHIFT); > >>> + > >

Re: [RFC PATCH 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-01-20 Thread Chunyan Zhang
On Wed, 13 Jan 2021 at 21:47, Rob Herring wrote: > > On Fri, Jan 8, 2021 at 5:34 AM Chunyan Zhang wrote: > > > > On Fri, 8 Jan 2021 at 10:25, Rob Herring wrote: > > > > > > On Wed, Dec 23, 2020 at 07:16:32PM +0800, Chunyan Zhang wrote: > > > >

[PATCH v1 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-01-21 Thread Chunyan Zhang
From: Chunyan Zhang This patch adds bindings to support display and Image codec(jpeg) iommu instance. The iommu support for others would be added once finished tests with those devices, such as a few signal processors, including VSP(video), GSP(graphic), ISP(image), and camera CPP, etc. Signed

[PATCH v1 2/2] iommu: add Unisoc iommu basic driver

2021-01-21 Thread Chunyan Zhang
From: Chunyan Zhang This patch only adds display iommu support, the driver was tested with sprd dpu and image codec processor. The iommu support for others would be added once finished tests with those devices, such as a few signal processors, including VSP(video), GSP(graphic), ISP(image

[PATCH v1 0/2] Add Unisoc iommu basic driver

2021-01-21 Thread Chunyan Zhang
From: Chunyan Zhang Changes since RFC v2: * Addressed Robin's comments: - Add COMPILE_TEST support; - Use DMA allocator for PTE; - Revised to avoid resource leak issue; - Added ->iotlb_sync implemented; - Moved iommu group allocation to probe; - Changed some function names to make them s

Re: [RFC PATCH V2 2/2] iommu: add Unisoc iommu basic driver

2021-01-20 Thread Chunyan Zhang
Hi Robin, On Wed, 13 Jan 2021 at 03:10, Robin Murphy wrote: > > On 2021-01-08 11:38, Chunyan Zhang wrote: > > From: Chunyan Zhang > > > > This patch only adds display iommu support, the driver was tested with sprd > > dpu. > > > > The iommu support for

Re: [PATCH v1 2/2] iommu: add Unisoc iommu basic driver

2021-01-27 Thread Chunyan Zhang
On Fri, 22 Jan 2021 at 05:46, Robin Murphy wrote: > > On 2021-01-21 11:23, Chunyan Zhang wrote: > > From: Chunyan Zhang > > > > This patch only adds display iommu support, the driver was tested with sprd > > dpu and image codec processor. > > > > The io

[PATCH 2/2] iommu: add Unisoc iommu basic driver

2021-02-02 Thread Chunyan Zhang
From: Chunyan Zhang This iommu module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- drivers/iommu/Kconfig

[PATCH v2 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-02-01 Thread Chunyan Zhang
From: Chunyan Zhang This iommu module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- .../devicetree/bindings

[PATCH v2 2/2] iommu: add Unisoc iommu basic driver

2021-02-01 Thread Chunyan Zhang
From: Chunyan Zhang This iommu module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- drivers/iommu/Kconfig

[PATCH v2 0/2] Add Unisoc iommu basic driver

2021-02-01 Thread Chunyan Zhang
From: Chunyan Zhang Changes since v1: * Fixed compile errors reported by kernel test robot . * Changed to use syscon to get mapped registers for iommu and media devices to avoid double map issue. * Addressed Robin's comments: - Added including offset in the returned physical address

Re: [PATCH v3 2/2] iommu: add Unisoc iommu basic driver

2021-02-03 Thread Chunyan Zhang
On Thu, 4 Feb 2021 at 01:44, Randy Dunlap wrote: > > On 2/3/21 1:07 AM, Chunyan Zhang wrote: > > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > > index 192ef8f61310..99e7712f3903 100644 > > --- a/drivers/iommu/Kconfig > > +++ b/drivers/iommu/Kconfig &

[PATCH v4 2/2] iommu: add Unisoc IOMMU basic driver

2021-02-03 Thread Chunyan Zhang
From: Chunyan Zhang This IOMMU module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- drivers/iommu/Kconfig

[PATCH v4 0/2] Add Unisoc IOMMU basic driver

2021-02-03 Thread Chunyan Zhang
From: Chunyan Zhang Changes since v3: * Rebased on iommu/next, and fixed compile error reported by kernel test robot ; * %s/iommu/IOMMU/ properly in the whole patchset. Changes since v2: * Added a WARN and return 0 if an invalid iova was passed to sprd_iommu_iova_to_phys(); * Changed the name

[PATCH v4 1/2] dt-bindings: iommu: add bindings for sprd IOMMU

2021-02-03 Thread Chunyan Zhang
From: Chunyan Zhang This IOMMU module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- .../devicetree/bindings

Re: [PATCH 2/2] iommu: add Unisoc iommu basic driver

2021-02-02 Thread Chunyan Zhang
On Tue, 2 Feb 2021 at 22:14, Joerg Roedel wrote: > > On Tue, Feb 02, 2021 at 06:42:57PM +0800, Chunyan Zhang wrote: > > +static phys_addr_t sprd_iommu_iova_to_phys(struct iommu_domain *domain, > > +dma_addr_t iova) > > +{ > >

Re: [PATCH 2/2] iommu: add Unisoc iommu basic driver

2021-02-02 Thread Chunyan Zhang
On Wed, 3 Feb 2021 at 02:02, Robin Murphy wrote: > > On 2021-02-02 14:41, Joerg Roedel wrote: > > On Tue, Feb 02, 2021 at 02:34:34PM +, Robin Murphy wrote: > >> Nope, I believe if Arm Ltd. had any involvement in this I'd know about it > >> :) > > > > Okay, got confused by thinking of ARM as

[PATCH v3 2/2] iommu: add Unisoc iommu basic driver

2021-02-03 Thread Chunyan Zhang
From: Chunyan Zhang This iommu module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- drivers/iommu/Kconfig

[PATCH v3 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-02-03 Thread Chunyan Zhang
From: Chunyan Zhang This iommu module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- .../devicetree/bindings

[PATCH v3 0/2] Add Unisoc iommu basic driver

2021-02-03 Thread Chunyan Zhang
From: Chunyan Zhang Changes since v2: * Added a WARN and return 0 if an invalid iova was passed to sprd_iommu_iova_to_phys(); * Changed the name of sprd_iommu_write(); * Revised CONFIG_SPRD_IOMMU help graph in Kconfig. * Revised comments for the struct sprd_iommu_device; * Converted to use &quo

Re: [PATCH v3 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-02-04 Thread Chunyan Zhang
Hi Rob, On Fri, 5 Feb 2021 at 07:25, Rob Herring wrote: > > On Wed, Feb 03, 2021 at 05:07:26PM +0800, Chunyan Zhang wrote: > > From: Chunyan Zhang > > > > This iommu module can be used by Unisoc's multimedia devices, such as > > display, Image codec(jpeg) and a fe

[PATCH] iommu: sprd: Fix parameter type warning

2021-03-30 Thread Chunyan Zhang
From: Chunyan Zhang The second parameter of clk_get_optional() is "const char *", so use NULL instead of integer 0 to fix a sparse warning like: ">> drivers/iommu/sprd-iommu.c:456:42: sparse: sparse: Using plain integer as NULL pointer" Also this patch changes t

Re: [PATCH v3 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-02-25 Thread Chunyan Zhang
On Tue, 16 Feb 2021 at 23:10, Robin Murphy wrote: > > On 2021-02-10 19:21, Rob Herring wrote: > > On Fri, Feb 5, 2021 at 1:21 AM Chunyan Zhang wrote: > >> > >> Hi Rob, > >> > >> On Fri, 5 Feb 2021 at 07:25, Rob Herring wrote: > >>> &

Re: [PATCH v3 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-02-25 Thread Chunyan Zhang
On Thu, 11 Feb 2021 at 03:21, Rob Herring wrote: > > On Fri, Feb 5, 2021 at 1:21 AM Chunyan Zhang wrote: > > > > Hi Rob, > > > > On Fri, 5 Feb 2021 at 07:25, Rob Herring wrote: > > > > > > On Wed, Feb 03, 2021 at 05:07:26PM +0800,

Re: [PATCH v3 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-03-04 Thread Chunyan Zhang
Hi Robin, On Tue, 16 Feb 2021 at 23:10, Robin Murphy wrote: > > >>> > >>> On Wed, Feb 03, 2021 at 05:07:26PM +0800, Chunyan Zhang wrote: > >>>> From: Chunyan Zhang > >>>> > >>>> This iommu module can be used by Unisoc's

[PATCH v5 0/2] Add Unisoc IOMMU basic driver

2021-03-05 Thread Chunyan Zhang
From: Chunyan Zhang Changes since v4 (https://lkml.org/lkml/2021/2/4/85): * Rebased on v5.12-rc1; * Dropped using syscon node for mapping registers according to Rob's comments. Changes since v3 (https://lkml.org/lkml/2021/2/3/161): * Rebased on iommu/next, and fixed compile error reported

[PATCH v5 1/2] dt-bindings: iommu: add bindings for sprd IOMMU

2021-03-05 Thread Chunyan Zhang
From: Chunyan Zhang This IOMMU module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- .../devicetree/bindings

[PATCH v5 2/2] iommu: add Unisoc IOMMU basic driver

2021-03-05 Thread Chunyan Zhang
From: Chunyan Zhang This IOMMU module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- drivers/iommu/Kconfig

Re: [PATCH v3 09/25] iommu/sprd: Drop IOVA cookie management

2021-08-05 Thread Chunyan Zhang
On Thu, Aug 5, 2021 at 1:18 AM Robin Murphy wrote: > > The core code bakes its own cookies now. > > CC: Chunyan Zhang > Signed-off-by: Robin Murphy Thank you for the patch! Acked-by: Chunyan Zhang > > --- > > v3: Also remove unneeded include > --- >