Re: [Freedreno] [PATCH v2 1/6] iommu/arm-smmu: Add auxiliary domain support for arm-smmuv2

2020-07-13 Thread Jordan Crouse
On Tue, Jul 07, 2020 at 08:09:41AM -0700, Rob Clark wrote: > On Tue, Jul 7, 2020 at 5:34 AM Robin Murphy wrote: > > > > On 2020-06-26 21:04, Jordan Crouse wrote: > > > Support auxiliary domains for arm-smmu-v2 to initialize and support > > > multiple pagetabl

Re: [Freedreno] [PATCH v9 4/7] iommu/arm-smmu: Add a pointer to the attached device to smmu_domain

2020-07-13 Thread Jordan Crouse
On Mon, Jul 13, 2020 at 04:09:02PM +0100, Will Deacon wrote: > On Fri, Jun 26, 2020 at 02:00:38PM -0600, Jordan Crouse wrote: > > Add a link to the pointer to the struct device that is attached to a > > domain. This makes it easy to get the pointer if it is needed in the >

Re: [PATCH] iommu/arm-smmu: Add a init_context_bank implementation hook

2020-07-13 Thread Jordan Crouse
On Mon, Jul 13, 2020 at 04:11:23PM +0100, Will Deacon wrote: > On Thu, Jun 11, 2020 at 04:36:56PM -0600, Jordan Crouse wrote: > > Add a new implementation hook to allow the implementation specific code > > to tweek the context bank configuration just before it gets written. >

Re: [PATCHv3 7/7] drm/msm/a6xx: Add support for using system cache(LLC)

2020-07-09 Thread Jordan Crouse
On Fri, Jul 03, 2020 at 09:04:49AM -0700, Rob Clark wrote: > On Fri, Jul 3, 2020 at 7:53 AM Sai Prakash Ranjan > wrote: > > > > Hi Will, > > > > On 2020-07-03 19:07, Will Deacon wrote: > > > On Mon, Jun 29, 2020 at 09:22:50PM +0530, Sai Prakash Ranjan wrote: > > >> diff --git

Re: [PATCH v2 4/6] drm/msm: Add support to create a local pagetable

2020-07-08 Thread Jordan Crouse
On Tue, Jul 07, 2020 at 12:36:42PM +0100, Robin Murphy wrote: > On 2020-06-26 21:04, Jordan Crouse wrote: > >Add support to create a io-pgtable for use by targets that support > >per-instance pagetables. In order to support per-instance pagetables the > >GPU SMMU device n

Re: [Freedreno] [PATCH v2 2/6] iommu/io-pgtable: Allow a pgtable implementation to skip TLB operations

2020-07-08 Thread Jordan Crouse
On Tue, Jul 07, 2020 at 07:58:18AM -0700, Rob Clark wrote: > On Tue, Jul 7, 2020 at 7:25 AM Rob Clark wrote: > > > > On Tue, Jul 7, 2020 at 4:34 AM Robin Murphy wrote: > > > > > > On 2020-06-26 21:04, Jordan Crouse wrote: > > > > Allow a io-

Re: [Freedreno] [PATCH v2 6/6] drm/msm/a6xx: Add support for per-instance pagetables

2020-06-29 Thread Jordan Crouse
On Sat, Jun 27, 2020 at 01:11:14PM -0700, Rob Clark wrote: > On Sat, Jun 27, 2020 at 12:56 PM Rob Clark wrote: > > > > On Fri, Jun 26, 2020 at 1:04 PM Jordan Crouse > > wrote: > > > > > > Add support for using per-instance pagetables if a

Re: [Freedreno] [PATCH v9 6/7] drm/msm: Set the global virtual address range from the IOMMU domain

2020-06-29 Thread Jordan Crouse
On Sat, Jun 27, 2020 at 10:10:14AM -0700, Rob Clark wrote: > On Fri, Jun 26, 2020 at 1:01 PM Jordan Crouse wrote: > > > > Use the aperture settings from the IOMMU domain to set up the virtual > > address range for the GPU. This allows us to transparently deal with > >

[PATCH v2 1/6] iommu/arm-smmu: Add auxiliary domain support for arm-smmuv2

2020-06-26 Thread Jordan Crouse
addresses in the pagetable. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu.c | 219 --- drivers/iommu/arm-smmu.h | 1 + 2 files changed, 204 insertions(+), 16 deletions(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 060139452c54

[PATCH v2 0/6] iommu-arm-smmu: Add auxiliary domains and per-instance pagetables

2020-06-26 Thread Jordan Crouse
://patchwork.kernel.org/patch/11628543/ v2: Remove unneeded cruft in the a6xx page switch sequence Jordan Crouse (6): iommu/arm-smmu: Add auxiliary domain support for arm-smmuv2 iommu/io-pgtable: Allow a pgtable implementation to skip TLB operations iommu/arm-smmu: Add a domain attribute to pass

[PATCH v2 5/6] drm/msm: Add support for address space instances

2020-06-26 Thread Jordan Crouse
Add support for allocating an address space instance. Targets that support per-instance pagetables should implement their own function to allocate a new instance. The default will return the existing generic address space. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_drv.c | 15

[PATCH v2 4/6] drm/msm: Add support to create a local pagetable

2020-06-26 Thread Jordan Crouse
-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_gpummu.c | 2 +- drivers/gpu/drm/msm/msm_iommu.c | 180 ++- drivers/gpu/drm/msm/msm_mmu.h| 16 ++- 3 files changed, 195 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gpummu.c b/drivers/gpu/drm

[PATCH v2 6/6] drm/msm/a6xx: Add support for per-instance pagetables

2020-06-26 Thread Jordan Crouse
Add support for using per-instance pagetables if all the dependencies are available. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 43 +++ drivers/gpu/drm/msm/msm_ringbuffer.h | 1 + 2 files changed, 44 insertions(+) diff --git a/drivers

[PATCH v2 3/6] iommu/arm-smmu: Add a domain attribute to pass the pagetable config

2020-06-26 Thread Jordan Crouse
The Adreno GPU has the capacity to manage its own pagetables and switch them dynamically from the hardware. Add a domain attribute for arm-smmu-v2 to get the default pagetable configuration so that the GPU driver can match the format for its own pagetables. Signed-off-by: Jordan Crouse

[PATCH v2 2/6] iommu/io-pgtable: Allow a pgtable implementation to skip TLB operations

2020-06-26 Thread Jordan Crouse
Allow a io-pgtable implementation to skip TLB operations by checking for NULL pointers in the helper functions. It will be up to to the owner of the io-pgtable instance to make sure that they independently handle the TLB correctly. Signed-off-by: Jordan Crouse --- include/linux/io-pgtable.h

[PATCH v9 6/7] drm/msm: Set the global virtual address range from the IOMMU domain

2020-06-26 Thread Jordan Crouse
Use the aperture settings from the IOMMU domain to set up the virtual address range for the GPU. This allows us to transparently deal with IOMMU side features (like split pagetables). Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 13 +++-- drivers/gpu/drm

[PATCH v9 4/7] iommu/arm-smmu: Add a pointer to the attached device to smmu_domain

2020-06-26 Thread Jordan Crouse
Add a link to the pointer to the struct device that is attached to a domain. This makes it easy to get the pointer if it is needed in the implementation specific code. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu.c | 6 -- drivers/iommu/arm-smmu.h | 1 + 2 files changed, 5

[PATCH v9 3/7] dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU

2020-06-26 Thread Jordan Crouse
. Reviewed-by: Rob Herring Signed-off-by: Jordan Crouse --- Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml index d7ceb4c34423

[PATCH v9 5/7] iommu/arm-smmu: Add implementation for the adreno GPU SMMU

2020-06-26 Thread Jordan Crouse
Add a special implementation for the SMMU attached to most Adreno GPU target triggered from the qcom,adreno-gpu-smmu compatible string. When selected the driver will attempt to enable split pagetables. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu-impl.c | 3 +++ drivers/iommu/arm

[PATCH v9 2/7] iommu/arm-smmu: Add support for split pagetables

2020-06-26 Thread Jordan Crouse
Enable TTBR1 for a context bank if IO_PGTABLE_QUIRK_ARM_TTBR1 is selected by the io-pgtable configuration. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu.c | 21 - drivers/iommu/arm-smmu.h | 25 +++-- 2 files changed, 35 insertions(+), 11

[PATCH v9 0/7] iommu/arm-smmu: Enable split pagetable support

2020-06-26 Thread Jordan Crouse
/ Jordan Crouse (7): iommu/arm-smmu: Pass io-pgtable config to implementation specific function iommu/arm-smmu: Add support for split pagetables dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU iommu/arm-smmu: Add a pointer to the attached device to smmu_domain iommu/arm-smmu

[PATCH v9 7/7] arm: dts: qcom: sm845: Set the compatible string for the GPU SMMU

2020-06-26 Thread Jordan Crouse
Set the qcom,adreno-smmu compatible string for the GPU SMMU to enable split pagetables. Signed-off-by: Jordan Crouse --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom

[PATCH v9 1/7] iommu/arm-smmu: Pass io-pgtable config to implementation specific function

2020-06-26 Thread Jordan Crouse
Construct the io-pgtable config before calling the implementation specific init_context function and pass it so the implementation specific function can get a chance to change it before the io-pgtable is created. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu-impl.c | 3 ++- drivers

Re: [PATCH v2] iommu/arm-smmu: Mark qcom_smmu_client_of_match as possibly unused

2020-06-26 Thread Jordan Crouse
On Mon, Jun 08, 2020 at 04:13:08PM +0100, Will Deacon wrote: > On Thu, Jun 04, 2020 at 02:39:04PM -0600, Jordan Crouse wrote: > > When CONFIG_OF=n of_match_device() gets pre-processed out of existence > > leaving qcom-smmu_client_of_match unused. Mark it as possibly unused to > &

Re: [PATCH 6/6] drm/msm/a6xx: Add support for per-instance pagetables

2020-06-12 Thread Jordan Crouse
On Thu, Jun 11, 2020 at 08:22:29PM -0700, Rob Clark wrote: > On Thu, Jun 11, 2020 at 3:29 PM Jordan Crouse wrote: > > > > Add support for using per-instance pagetables if all the dependencies are > > available. > > > > Signed-off-by: Jordan Crouse > >

[PATCH] iommu/arm-smmu: Add a init_context_bank implementation hook

2020-06-11 Thread Jordan Crouse
could hang the GPU if one of the terminated transactions is a CP read. This depends on the arm-smmu adreno SMMU implementation [1]. [1] https://patchwork.kernel.org/patch/11600943/ Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu-qcom.c | 13 + drivers/iommu/arm-smmu.c

[PATCH 3/6] iommu/arm-smmu: Add a domain attribute to pass the pagetable config

2020-06-11 Thread Jordan Crouse
The Adreno GPU has the capacity to manage its own pagetables and switch them dynamically from the hardware. Add a domain attribute for arm-smmu-v2 to get the default pagetable configuration so that the GPU driver can match the format for its own pagetables. Signed-off-by: Jordan Crouse

[PATCH 6/6] drm/msm/a6xx: Add support for per-instance pagetables

2020-06-11 Thread Jordan Crouse
Add support for using per-instance pagetables if all the dependencies are available. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 69 ++- drivers/gpu/drm/msm/msm_ringbuffer.h | 1 + 2 files changed, 69 insertions(+), 1 deletion(-) diff

[PATCH 1/6] iommu/arm-smmu: Add auxiliary domain support for arm-smmuv2

2020-06-11 Thread Jordan Crouse
addresses in the pagetable. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu.c | 216 --- drivers/iommu/arm-smmu.h | 1 + 2 files changed, 201 insertions(+), 16 deletions(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 743d75b9ff3f

[PATCH 4/6] drm/msm: Add support to create a local pagetable

2020-06-11 Thread Jordan Crouse
-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_gpummu.c | 2 +- drivers/gpu/drm/msm/msm_iommu.c | 180 ++- drivers/gpu/drm/msm/msm_mmu.h| 16 ++- 3 files changed, 195 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gpummu.c b/drivers/gpu/drm

[PATCH 5/6] drm/msm: Add support for address space instances

2020-06-11 Thread Jordan Crouse
Add support for allocating an address space instance. Targets that support per-instance pagetables should implement their own function to allocate a new instance. The default will return the existing generic address space. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_drv.c | 15

[PATCH 0/6] iommu-arm-smmu: Add auxiliary domains and per-instance pagetables

2020-06-11 Thread Jordan Crouse
://patchwork.kernel.org/patch/11600949/ Jordan Crouse (6): iommu/arm-smmu: Add auxiliary domain support for arm-smmuv2 iommu/io-pgtable: Allow a pgtable implementation to skip TLB operations iommu/arm-smmu: Add a domain attribute to pass the pagetable config drm/msm: Add support to create a local

[PATCH 2/6] iommu/io-pgtable: Allow a pgtable implementation to skip TLB operations

2020-06-11 Thread Jordan Crouse
Allow a io-pgtable implementation to skip TLB operations by checking for NULL pointers in the helper functions. It will be up to to the owner of the io-pgtable instance to make sure that they independently handle the TLB correctly. Signed-off-by: Jordan Crouse --- include/linux/io-pgtable.h

[PATCH v8 5/7] iommu/arm-smmu: Add implementation for the adreno GPU SMMU

2020-06-11 Thread Jordan Crouse
Add a special implementation for the SMMU attached to most Adreno GPU target triggered from the qcom,adreno-gpu-smmu compatible string. When selected the driver will attempt to enable split pagetables. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu-impl.c | 3 +++ drivers/iommu/arm

[PATCH v8 3/7] dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU

2020-06-11 Thread Jordan Crouse
. Signed-off-by: Jordan Crouse --- Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml index d7ceb4c34423..e52a1b146c97 100644

[PATCH v8 2/7] iommu/arm-smmu: Add support for split pagetables

2020-06-11 Thread Jordan Crouse
Enable TTBR1 for a context bank if IO_PGTABLE_QUIRK_ARM_TTBR1 is selected by the io-pgtable configuration. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu.c | 21 - drivers/iommu/arm-smmu.h | 25 +++-- 2 files changed, 35 insertions(+), 11

[PATCH v8 1/7] iommu/arm-smmu: Pass io-pgtable config to implementation specific function

2020-06-11 Thread Jordan Crouse
Construct the io-pgtable config before calling the implementation specific init_context function and pass it so the implementation specific function can get a chance to change it before the io-pgtable is created. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu-impl.c | 3 ++- drivers

[PATCH v8 7/7] arm: dts: qcom: sm845: Set the compatible string for the GPU SMMU

2020-06-11 Thread Jordan Crouse
Set the qcom,adreno-smmu compatible string for the GPU SMMU to enable split pagetables. Signed-off-by: Jordan Crouse --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom

[PATCH v8 4/7] iommu/arm-smmu: Add a pointer to the attached device to smmu_domain

2020-06-11 Thread Jordan Crouse
Add a link to the pointer to the struct device that is attached to a domain. This makes it easy to get the pointer if it is needed in the implementation specific code. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu.c | 1 + drivers/iommu/arm-smmu.h | 1 + 2 files changed, 2 insertions

[PATCH v8 0/7] iommu/arm-smmu: Enable split pagetable support

2020-06-11 Thread Jordan Crouse
the hardware would be less confusing when debugging a hang. v8: Pass the attached device in the smmu_domain to the implementation specific functions [1] https://lists.linuxfoundation.org/pipermail/iommu/2020-May/044537.html [2] https://patchwork.kernel.org/patch/11482591/ Jordan Crouse (7): iommu/arm

[PATCH v8 6/7] drm/msm: Set the global virtual address range from the IOMMU domain

2020-06-11 Thread Jordan Crouse
Use the aperture settings from the IOMMU domain to set up the virtual address range for the GPU. This allows us to transparently deal with IOMMU side features (like split pagetables). Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 13 +++-- drivers/gpu/drm

[PATCH] iommu/arm-smmu: Don't bypass pinned stream mappings

2020-06-09 Thread Jordan Crouse
bootloader") [1] that identifies streams that are already configured and marked them as pinned. This patch extends that to not re-write pinned stream mappings for ARM_SMMU_DOMAIN_BYPASS domains. [1] https://lore.kernel.org/r/20191226221709.3844244-4-bjorn.anders...@linaro.org Signed-o

[PATCH v7 3/6] dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU

2020-06-04 Thread Jordan Crouse
. Signed-off-by: Jordan Crouse --- Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml index d7ceb4c34423..e52a1b146c97 100644

[PATCH v7 4/6] iommu/arm-smmu: Add implementation for the adreno GPU SMMU

2020-06-04 Thread Jordan Crouse
Add a special implementation for the SMMU attached to most Adreno GPU target triggered from the qcom,adreno-gpu-smmu compatible string. When selected the driver will attempt to enable split pagetables. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu-impl.c | 5 - drivers/iommu/arm

[PATCH v7 2/6] iommu/arm-smmu: Add support for split pagetables

2020-06-04 Thread Jordan Crouse
Enable TTBR1 for a context bank if IO_PGTABLE_QUIRK_ARM_TTBR1 is selected by the io-pgtable configuration. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu.c | 21 - drivers/iommu/arm-smmu.h | 25 +++-- 2 files changed, 35 insertions(+), 11

[PATCH v7 1/6] iommu/arm-smmu: Pass io-pgtable config to implementation specific function

2020-06-04 Thread Jordan Crouse
Construct the io-pgtable config before calling the implementation specific init_context function and pass it so the implementation specific function can get a chance to change it before the io-pgtable is created. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu-impl.c | 3 ++- drivers

[PATCH v7 0/6] iommu/arm-smmu: Enable split pagetable support

2020-06-04 Thread Jordan Crouse
would be less confusing when debugging a hang. [1] https://lists.linuxfoundation.org/pipermail/iommu/2020-May/044537.html [2] https://patchwork.kernel.org/patch/11482591/ Jordan Crouse (6): iommu/arm-smmu: Pass io-pgtable config to implementation specific function iommu/arm-smmu: Add

[PATCH v2] iommu/arm-smmu: Mark qcom_smmu_client_of_match as possibly unused

2020-06-04 Thread Jordan Crouse
by: kbuild test robot Acked-by: Will Deacon Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm-smmu-qcom.c b/drivers/iommu/arm-smmu-qcom.c index cf01d0215a39..be4318044f96 100644 --- a/drivers/iomm

[PATCH] iommu/arm-smmu: Mark qcom_smmu_client_of_match as possibly unused

2020-06-03 Thread Jordan Crouse
by: kbuild test robot Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm-smmu-qcom.c b/drivers/iommu/arm-smmu-qcom.c index cf01d0215a39..063b4388b0ff 100644 --- a/drivers/iommu/arm-smmu-qcom.c +++

Re: [PATCH v1 2/6] arm/smmu: Add auxiliary domain support for arm-smmuv2

2020-05-20 Thread Jordan Crouse
On Wed, May 20, 2020 at 01:57:01PM +0100, Will Deacon wrote: > On Mon, May 18, 2020 at 08:50:27AM -0700, Rob Clark wrote: > > On Mon, May 18, 2020 at 8:18 AM Will Deacon wrote: > > > On Wed, Mar 18, 2020 at 04:43:07PM -0700, Rob Clark wrote: > > > > We do in fact need live domain switching, that

Re: [PATCH v6 2/5] iommu/arm-smmu: Add support for TTBR1

2020-05-19 Thread Jordan Crouse
On Mon, May 18, 2020 at 03:59:59PM +0100, Will Deacon wrote: > On Thu, Apr 09, 2020 at 05:33:47PM -0600, Jordan Crouse wrote: > > Add support to enable TTBR1 if the domain requests it via the > > DOMAIN_ATTR_SPLIT_TABLES attribute. If enabled by the hardware > > and pa

Re: [PATCH] iomm/arm-smmu: Add stall implementation hook

2020-05-11 Thread Jordan Crouse
On Fri, May 08, 2020 at 08:40:40AM -0700, Rob Clark wrote: > On Fri, May 8, 2020 at 8:32 AM Rob Clark wrote: > > > > On Thu, May 7, 2020 at 5:54 AM Will Deacon wrote: > > > > > > On Thu, May 07, 2020 at 11:55:54AM +0100, Robin Murphy wrote: > > > > On 2020-05-07 11:14 am, Sai Prakash Ranjan

Re: [PATCH 0/2] iommu/arm-smmu: Allow client devices to select direct mapping

2020-04-13 Thread Jordan Crouse
t identity > > > mapping using iommu_request_dm_for_dev(). First patch is > > > a cleanup to support other SoCs to call into QCOM specific > > > implementation and preparation for second patch. > > > Second patch sets the default identity domain for drm devices. &g

[PATCH v6 3/5] drm/msm: Attach the IOMMU device during initialization

2020-04-09 Thread Jordan Crouse
aggressive cleanups that follow. Reviewed-by: Rob Clark Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 8 drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 4 drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 7 --- drivers/gpu/drm/msm/msm_gem_vma.c

[PATCH v6 2/5] iommu/arm-smmu: Add support for TTBR1

2020-04-09 Thread Jordan Crouse
the value of he domain attribute can be queried to see if the split pagetables were successfully programmed. The domain geometry will be updated as well so that the caller can determine the active region for the pagetable that was programmed. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu.c

[PATCH v6 0/5] iommu/arm-smmu: Split pagetable support for arm-smmu-v2

2020-04-09 Thread Jordan Crouse
will be enabled later when an auxiliary domain is attached v3: Remove the implementation specific and make split pagetable support part of the generic configuration [1] https://lists.linuxfoundation.org/pipermail/iommu/2020-January/041373.html Jordan Crouse (5): iommu: Add

[PATCH v6 5/5] drm/msm/a6xx: Support split pagetables

2020-04-09 Thread Jordan Crouse
to start swapping TTBR0 for context-specific pagetables. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 52 ++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno

[PATCH v6 1/5] iommu: Add DOMAIN_ATTR_SPLIT_TABLES

2020-04-09 Thread Jordan Crouse
Add a new attribute to enable and query the state of split pagetables for the domain. Acked-by: Will Deacon Signed-off-by: Jordan Crouse --- include/linux/iommu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 7ef8b0bda695

[PATCH v6 4/5] drm/msm: Refactor address space initialization

2020-04-09 Thread Jordan Crouse
functions to create the address space so a2xx can do its own thing in its own space. For all the other targets use a generic helper to initialize IOMMU but leave the door open for newer targets to use customization if they need it. Reviewed-by: Rob Clark Signed-off-by: Jordan Crouse --- drivers/gpu

Re: [PATCH v1 2/6] arm/smmu: Add auxiliary domain support for arm-smmuv2

2020-03-19 Thread Jordan Crouse
On Wed, Mar 18, 2020 at 04:43:07PM -0700, Rob Clark wrote: > On Wed, Mar 18, 2020 at 3:48 PM Will Deacon wrote: > > > > On Tue, Jan 28, 2020 at 03:16:06PM -0700, Jordan Crouse wrote: > > > Support auxiliary domains for arm-smmu-v2 to initialize and support > > >

Re: [Freedreno] [PATCH v5 0/5] iommu/arm-smmu: Split pagetable support for arm-smmu-v2

2020-02-27 Thread Jordan Crouse
On Tue, Jan 28, 2020 at 03:00:14PM -0700, Jordan Crouse wrote: > This is another iteration for the split pagetable support based on the > suggestions from Robin and Will [1]. > > Background: In order to support per-context pagetables the GPU needs to enable > split tables so th

Re: [RFC PATCH v1] iommu/arm-smmu: Allow domains to choose a context bank

2020-02-18 Thread Jordan Crouse
On Tue, Feb 18, 2020 at 10:19:53AM -0800, Rob Clark wrote: > On Tue, Jan 28, 2020 at 2:34 PM Jordan Crouse wrote: > > > > Domains which are being set up for split pagetables usually want to be > > on a specific context bank for hardware reasons. Force the context

[RFC PATCH v1] iommu/arm-smmu: Allow domains to choose a context bank

2020-01-28 Thread Jordan Crouse
Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu.c | 63 +--- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 85a6773..799a254 100644 --- a/drivers/iommu/arm-smmu.c +++ b

[PATCH v1 4/6] drm/msm: Add support to create target specific address spaces

2020-01-28 Thread Jordan Crouse
Add support to create a GPU target specific address space for a context. For those targets that support per-instance pagetables they will return a new address space set up for the instance if possible otherwise just use the global device pagetable. Signed-off-by: Jordan Crouse --- drivers/gpu

[PATCH v1 1/6] iommu: Add DOMAIN_ATTR_PTBASE

2020-01-28 Thread Jordan Crouse
Add an attribute to return the base address of the pagetable. This is used by auxiliary domains from arm-smmu to return the address of the pagetable to the domain so that it can set the appropriate pagetable through it's own means. Signed-off-by: Jordan Crouse --- include/linux/iommu.h | 2

[PATCH v1 5/6] drm/msm/gpu: Add ttbr0 to the memptrs

2020-01-28 Thread Jordan Crouse
Targets that support per-instance pagetable switching will have to keep track of which pagetable belongs to each instance to be able to recover for preemption. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_ringbuffer.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu

[PATCH v1 6/6] drm/msm/a6xx: Support per-instance pagetables

2020-01-28 Thread Jordan Crouse
Add support for per-instance pagetables for a6xx targets. Add support to handle split pagetables and create a new instance if the needed IOMMU support exists and insert the necessary PM4 commands to trigger a pagetable switch at the beginning of a user command. Signed-off-by: Jordan Crouse

[PATCH v1 2/6] arm/smmu: Add auxiliary domain support for arm-smmuv2

2020-01-28 Thread Jordan Crouse
addresses in the pagetable. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu.c | 230 +++ drivers/iommu/arm-smmu.h | 3 + 2 files changed, 217 insertions(+), 16 deletions(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index

[PATCH v1 0/6] iommu/arm-smmu: Auxiliary domain and per instance pagetables

2020-01-28 Thread Jordan Crouse
[2] https://patchwork.freedesktop.org/series/57441/ Jordan Crouse (6): iommu: Add DOMAIN_ATTR_PTBASE arm/smmu: Add auxiliary domain support for arm-smmuv2 drm/msm/adreno: ADd support for IOMMU auxiliary domains drm/msm: Add support to create target specific address spaces drm/msm/gpu: Add ttbr0 to the memptrs

[PATCH v5 4/5] drm/msm: Refactor address space initialization

2020-01-28 Thread Jordan Crouse
functions to create the address space so a2xx can do its own thing in its own space. For all the other targets use a generic helper to initialize IOMMU but leave the door open for newer targets to use customization if they need it. Reviewed-by: Rob Clark Signed-off-by: Jordan Crouse --- drivers/gpu

[PATCH v5 3/5] drm/msm: Attach the IOMMU device during initialization

2020-01-28 Thread Jordan Crouse
aggressive cleanups that follow. Reviewed-by: Rob Clark Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 8 drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 4 drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 7 --- drivers/gpu/drm/msm/msm_gem_vma.c

[PATCH v5 0/5] iommu/arm-smmu: Split pagetable support for arm-smmu-v2

2020-01-28 Thread Jordan Crouse
v3: Remove the implementation specific and make split pagetable support part of the generic configuration [1] https://lists.linuxfoundation.org/pipermail/iommu/2020-January/041373.html Jordan Crouse (5): iommu: Add DOMAIN_ATTR_SPLIT_TABLES iommu/arm-smmu: Add support for TTBR1 drm/msm: Attach

[PATCH v5 1/5] iommu: Add DOMAIN_ATTR_SPLIT_TABLES

2020-01-28 Thread Jordan Crouse
Add a new attribute to enable and query the state of split pagetables for the domain. Acked-by: Will Deacon Signed-off-by: Jordan Crouse --- include/linux/iommu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index d1b5f4d..b14398b 100644

Re: [PATCH v3 2/5] iommu/arm-smmu: Add support for split pagetables

2020-01-21 Thread Jordan Crouse
On Tue, Jan 21, 2020 at 02:36:19PM +, Robin Murphy wrote: > On 16/12/2019 4:37 pm, Jordan Crouse wrote: > >Add support to enable split pagetables (TTBR1) if the supporting driver > >requests it via the DOMAIN_ATTR_SPLIT_TABLES flag. When enabled, the driver > >will set u

Re: [PATCH v3 2/5] iommu/arm-smmu: Add support for split pagetables

2020-01-09 Thread Jordan Crouse
On Thu, Jan 09, 2020 at 02:33:34PM +, Will Deacon wrote: > On Mon, Dec 16, 2019 at 09:37:48AM -0700, Jordan Crouse wrote: > > Add support to enable split pagetables (TTBR1) if the supporting driver > > requests it via the DOMAIN_ATTR_SPLIT_TABLES flag. When enabled, the driver

Re: [Freedreno] [PATCH v3 4/5] drm/msm: Refactor address space initialization

2020-01-06 Thread Jordan Crouse
On Mon, Dec 16, 2019 at 09:37:50AM -0700, Jordan Crouse wrote: > Refactor how address space initialization works. Instead of having the > address space function create the MMU object (and thus require separate but > equal functions for gpummu and iommu) use a single function and pass

Re: [PATCH v3 5/5] drm/msm/a6xx: Support split pagetables

2020-01-06 Thread Jordan Crouse
On Tue, Dec 24, 2019 at 08:27:28AM +0530, smase...@codeaurora.org wrote: > On 2019-12-16 22:07, Jordan Crouse wrote: > >Attempt to enable split pagetables if the arm-smmu driver supports it. > >This will move the default address space from the default region to > >the a

Re: [Freedreno] [PATCH 5/5] drm/msm/a6xx: Add support for using system cache(LLC)

2019-12-20 Thread Jordan Crouse
On Fri, Dec 20, 2019 at 03:40:59PM +0530, smase...@codeaurora.org wrote: > On 2019-12-20 01:28, Jordan Crouse wrote: > >On Thu, Dec 19, 2019 at 06:44:46PM +0530, Sharat Masetty wrote: > >>The last level system cache can be partitioned to 32 different slices > >>

Re: [PATCH 5/5] drm/msm/a6xx: Add support for using system cache(LLC)

2019-12-19 Thread Jordan Crouse
On Thu, Dec 19, 2019 at 12:58:15PM -0700, Jordan Crouse wrote: > On Thu, Dec 19, 2019 at 06:44:46PM +0530, Sharat Masetty wrote: > > + > > + /* > > +* CNTL1 is used to specify SCID for (CP, TP, VFD, CCU and UBWC > > +* FLAG cache) GPU blocks. This

Re: [PATCH 5/5] drm/msm/a6xx: Add support for using system cache(LLC)

2019-12-19 Thread Jordan Crouse
On Thu, Dec 19, 2019 at 06:44:46PM +0530, Sharat Masetty wrote: > The last level system cache can be partitioned to 32 different slices > of which GPU has two slices preallocated. One slice is used for caching GPU > buffers and the other slice is used for caching the GPU SMMU pagetables. > This

Re: [PATCH 4/5] drm/msm: Pass mmu features to generic layers

2019-12-19 Thread Jordan Crouse
On Thu, Dec 19, 2019 at 06:44:45PM +0530, Sharat Masetty wrote: > Allow different Adreno targets the ability to pass > specific mmu features to the generic layers. This will > help conditionally configure certain iommu features for > certain Adreno targets. > > Also Add a few simple support

[PATCH v3 5/5] drm/msm/a6xx: Support split pagetables

2019-12-16 Thread Jordan Crouse
to start swapping TTBR0 for context-specific pagetables. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 52 ++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno

[PATCH v3 4/5] drm/msm: Refactor address space initialization

2019-12-16 Thread Jordan Crouse
to create the address space so a2xx can do its own thing in its own space. For all the other targets use a generic helper to initialize IOMMU but leave the door open for newer targets to use customization if they need it. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a2xx_gpu.c

[PATCH v3 2/5] iommu/arm-smmu: Add support for split pagetables

2019-12-16 Thread Jordan Crouse
attribute can be queried to see if the split pagetables were successfully programmed. Furthermore the domain geometry will be updated so that the caller can determine the active region for the pagetable that was programmed. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu.c | 40

[PATCH v3 3/5] drm/msm: Attach the IOMMU device during initialization

2019-12-16 Thread Jordan Crouse
aggressive cleanups that follow. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 8 drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 4 drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 7 --- drivers/gpu/drm/msm/msm_gem_vma.c| 23

[PATCH v3 1/5] iommu: Add DOMAIN_ATTR_SPLIT_TABLES

2019-12-16 Thread Jordan Crouse
Add a new attribute to enable and query the state of split pagetables for the domain. Signed-off-by: Jordan Crouse --- include/linux/iommu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index f2223cb..18c861e 100644 --- a/include/linux

[PATCH v3 0/5] iommu/arm-smmu: Split pagetable support for arm-smmu-v2

2019-12-16 Thread Jordan Crouse
/pipermail/iommu/2019-October/039718.html [2] https://lists.linuxfoundation.org/pipermail/iommu/2019-October/039719.html [3] https://lists.linuxfoundation.org/pipermail/iommu/2019-October/039720.html Jordan Crouse (5): iommu: Add DOMAIN_ATTR_SPLIT_TABLES iommu/arm-smmu: Add support for split

Re: [PATCH v2 4/8] iommu/arm-smmu: Add split pagetables for Adreno IOMMU implementations

2019-12-05 Thread Jordan Crouse
On Wed, Dec 04, 2019 at 04:44:59PM +, Robin Murphy wrote: > On 22/11/2019 11:31 pm, Jordan Crouse wrote: > >Add implementation specific support to enable split pagetables for > >SMMU implementations attached to Adreno GPUs on Qualcomm targets. > > > >To enable

[PATCH v2 7/8] drm/msm/a6xx: Support split pagetables

2019-11-22 Thread Jordan Crouse
to start swapping TTBR0 for context-specific pagetables. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 46 ++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno

[PATCH v2 6/8] drm/msm: Refactor address space initialization

2019-11-22 Thread Jordan Crouse
functions to create the address space so a2xx can do its own thing in its own space. For all the other targets use a generic helper to initialize IOMMU but leave the door open for newer targets to use customization if they need it. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a2xx_gpu.c

[PATCH v2 8/8] arm64: dts: qcom: sdm845: Update Adreno GPU SMMU compatible string

2019-11-22 Thread Jordan Crouse
Add "qcom,adreno-smmu-v2" compatible string for the Adreno GPU SMMU node to enable split pagetable support. Signed-off-by: Jordan Crouse --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dt

[PATCH v2 4/8] iommu/arm-smmu: Add split pagetables for Adreno IOMMU implementations

2019-11-22 Thread Jordan Crouse
successfully programmed. The domain geometry will be updated so that the caller can determine the start of the region to generate correct virtual addresses. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu-impl.c | 3 ++ drivers/iommu/arm-smmu-qcom.c | 96

[PATCH v2 0/8] iommu/arm-smmu: Split pagetable support for Adreno GPUs

2019-11-22 Thread Jordan Crouse
/iommu/2019-October/039720.html Jordan Crouse (8): dt-bindings: arm-smmu: Add Adreno GPU variant iommu: Add DOMAIN_ATTR_SPLIT_TABLES iommu/arm-smmu: Pass io_pgtable_cfg to impl specific init_context iommu/arm-smmu: Add split pagetables for Adreno IOMMU implementations drm/msm: Attach

[PATCH v2 5/8] drm/msm: Attach the IOMMU device during initialization

2019-11-22 Thread Jordan Crouse
aggressive cleanups that follow. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 8 drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 4 drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 7 --- drivers/gpu/drm/msm/msm_gem_vma.c| 23

[PATCH v2 3/8] iommu/arm-smmu: Pass io_pgtable_cfg to impl specific init_context

2019-11-22 Thread Jordan Crouse
Pass the propposed io_pgtable_cfg to the implementation specific init_context() function to give the implementation an opportunity to to modify it before it gets passed to io-pgtable. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu-impl.c | 3 ++- drivers/iommu/arm-smmu.c | 11

[PATCH v2 1/8] dt-bindings: arm-smmu: Add Adreno GPU variant

2019-11-22 Thread Jordan Crouse
Add a compatible string to identify SMMUs that are attached to Adreno GPU devices that wish to support split pagetables. Signed-off-by: Jordan Crouse --- Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree

[PATCH v2 2/8] iommu: Add DOMAIN_ATTR_SPLIT_TABLES

2019-11-22 Thread Jordan Crouse
Add a new attribute to enable and query the state of split pagetables for the domain. Signed-off-by: Jordan Crouse --- include/linux/iommu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index f2223cb..18c861e 100644 --- a/include/linux

Re: [PATCH v2 08/10] iommu/io-pgtable-arm: Rationalise TTBRn handling

2019-11-22 Thread Jordan Crouse
gt; representing the allocated table. This paves the way for future users to > support split address spaces by simply allocating a table and dealing > with the detailed TTBRn logistics themselves. Tested-by: Jordan Crouse > Signed-off-by: Robin Murphy > --- > drivers/iommu/arm-

Re: [PATCH v2 09/10] iommu/io-pgtable-arm: Rationalise TCR handling

2019-11-22 Thread Jordan Crouse
walk attributes. Tested-by: Jordan Crouse > Signed-off-by: Robin Murphy > --- > drivers/iommu/arm-smmu-v3.c| 41 +++-- > drivers/iommu/arm-smmu.c | 7 ++- > drivers/iommu/arm-smmu.h | 27 > drivers/iommu/io-pgtable-arm-v7s.c

Re: [PATCH v2 10/10] iommu/io-pgtable-arm: Prepare for TTBR1 usage

2019-11-22 Thread Jordan Crouse
the awkward TCR translation granule format. Add a quirk so that we > can do the right thing at those points. Tested-by: Jordan Crouse > Signed-off-by: Robin Murphy > --- > drivers/iommu/io-pgtable-arm.c | 25 +++-- > include/linux/io-pgtable.h | 4

<    1   2   3   4   >