iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v12 00/13] iommu/arm-smmu: Add Adreno SMMU specific implementation
@ 2020-08-10 22:26 Jordan Crouse
  2020-08-10 22:26 ` [PATCH v12 01/13] iommu/arm-smmu: Pass io-pgtable config to implementation specific function Jordan Crouse
                   ` (33 more replies)
  0 siblings, 34 replies; 73+ messages in thread
From: Jordan Crouse @ 2020-08-10 22:26 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: devicetree, David Airlie, Hanna Hawa, Akhil P Oommen, dri-devel,
	Eric Anholt, Thierry Reding, Vivek Gautam,
	AngeloGioacchino Del Regno, Will Deacon, Emil Velikov,
	Jonathan Marek, Sam Ravnborg, Jon Hunter, Andy Gross,
	Sibi Sankar, Thierry Reding, Brian Masney, Wambui Karuga,
	Sharat Masetty, Robin Murphy, Pritesh Raithatha, Rob Herring,
	Stephen Boyd, Sean Paul, Ben Dooks, linux-arm-kernel,
	Greg Kroah-Hartman, Douglas Anderson, linux-kernel, iommu,
	Daniel Vetter, Shawn Guo, freedreno

This series adds an Adreno SMMU implementation to arm-smmu to allow GPU hardware
pagetable switching.

The Adreno GPU has built in capabilities to switch the TTBR0 pagetable during
runtime to allow each individual instance or application to have its own
pagetable.  In order to take advantage of the HW capabilities there are certain
requirements needed of the SMMU hardware.

This series adds support for an Adreno specific arm-smmu implementation. The new
implementation 1) ensures that the GPU domain is always assigned context bank 0,
2) enables split pagetable support (TTBR1) so that the instance specific
pagetable can be swapped while the global memory remains in place and 3) shares
the current pagetable configuration with the GPU driver to allow it to create
its own io-pgtable instances.

The series then adds the drm/msm code to enable these features. For targets that
support it allocate new pagetables using the io-pgtable configuration shared by
the arm-smmu driver and swap them in during runtime.

This version of the series merges the previous patchset(s) [1] and [2]
with the following improvements:

v12:
  - Nitpick cleanups in gpu/drm/msm/msm_iommu.c (Rob Clark)
  - Reorg in gpu/drm/msm/msm_gpu.c (Rob Clark)
  - Use the default asid for the context bank so that iommu_tlb_flush_all works
  - Flush the UCHE after a page switch
  - Add the SCTLR.HUPCF patch at the end of the series
v11:
  - Add implementation specific get_attr/set_attr functions (per Rob Clark)
  - Fix context bank allocation (per Bjorn Andersson)
v10:
  - arm-smmu: add implementation hook to allocate context banks
  - arm-smmu: Match the GPU domain by stream ID instead of compatible string
  - arm-smmu: Make DOMAIN_ATTR_PGTABLE_CFG bi-directional. The leaf driver
    queries the configuration to create a pagetable and then sends the newly
    created configuration back to the smmu-driver to enable TTBR0
  - drm/msm: Add context reference counting for submissions
  - drm/msm: Use dummy functions to skip TLB operations on per-instance
    pagetables

[1] https://lists.linuxfoundation.org/pipermail/iommu/2020-June/045653.html
[2] https://lists.linuxfoundation.org/pipermail/iommu/2020-June/045659.html


Jordan Crouse (13):
  iommu/arm-smmu: Pass io-pgtable config to implementation specific
    function
  iommu/arm-smmu: Add support for split pagetables
  iommu/arm-smmu: Prepare for the adreno-smmu implementation
  iommu: Add a domain attribute to get/set a pagetable configuration
  iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU
  dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU
  drm/msm: Add a context pointer to the submitqueue
  drm/msm: Set the global virtual address range from the IOMMU domain
  drm/msm: Add support to create a local pagetable
  drm/msm: Add support for private address space instances
  drm/msm/a6xx: Add support for per-instance pagetables
  arm: dts: qcom: sm845: Set the compatible string for the GPU SMMU
  iommu/arm-smmu: Add a init_context_bank implementation hook

 .../devicetree/bindings/iommu/arm,smmu.yaml   |   4 +
 arch/arm64/boot/dts/qcom/sdm845.dtsi          |   2 +-
 drivers/gpu/drm/msm/adreno/a5xx_gpu.c         |  12 +-
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c         |  75 ++++++-
 drivers/gpu/drm/msm/adreno/a6xx_gpu.h         |   1 +
 drivers/gpu/drm/msm/adreno/adreno_gpu.c       |  18 +-
 drivers/gpu/drm/msm/adreno/adreno_gpu.h       |   3 +-
 drivers/gpu/drm/msm/msm_drv.c                 |  16 +-
 drivers/gpu/drm/msm/msm_drv.h                 |  13 ++
 drivers/gpu/drm/msm/msm_gem.h                 |   1 +
 drivers/gpu/drm/msm/msm_gem_submit.c          |   8 +-
 drivers/gpu/drm/msm/msm_gem_vma.c             |   9 +
 drivers/gpu/drm/msm/msm_gpu.c                 |  31 ++-
 drivers/gpu/drm/msm/msm_gpu.h                 |  12 +-
 drivers/gpu/drm/msm/msm_gpummu.c              |   2 +-
 drivers/gpu/drm/msm/msm_iommu.c               | 197 +++++++++++++++++-
 drivers/gpu/drm/msm/msm_mmu.h                 |  16 +-
 drivers/gpu/drm/msm/msm_ringbuffer.h          |   1 +
 drivers/gpu/drm/msm/msm_submitqueue.c         |   8 +-
 drivers/iommu/arm/arm-smmu/arm-smmu-impl.c    |   6 +-
 drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c    | 172 ++++++++++++++-
 drivers/iommu/arm/arm-smmu/arm-smmu.c         | 134 ++++++------
 drivers/iommu/arm/arm-smmu/arm-smmu.h         |  87 +++++++-
 include/linux/iommu.h                         |   1 +
 24 files changed, 708 insertions(+), 121 deletions(-)

-- 
2.25.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 73+ messages in thread

end of thread, other threads:[~2020-09-01 15:53 UTC | newest]

Thread overview: 73+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-10 22:26 [PATCH v12 00/13] iommu/arm-smmu: Add Adreno SMMU specific implementation Jordan Crouse
2020-08-10 22:26 ` [PATCH v12 01/13] iommu/arm-smmu: Pass io-pgtable config to implementation specific function Jordan Crouse
2020-08-10 22:26 ` [PATCH v12 02/13] iommu/arm-smmu: Add support for split pagetables Jordan Crouse
2020-08-10 22:26 ` [PATCH v12 03/13] iommu/arm-smmu: Prepare for the adreno-smmu implementation Jordan Crouse
2020-08-10 22:26 ` [PATCH v12 04/13] iommu: Add a domain attribute to get/set a pagetable configuration Jordan Crouse
2020-08-13 13:14   ` Will Deacon
2020-08-13 15:11     ` [Freedreno] " Rob Clark
2020-08-13 15:19       ` Will Deacon
2020-08-13 16:28         ` Rob Clark
2020-08-10 22:26 ` [PATCH v12 05/13] iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU Jordan Crouse
2020-08-13 13:23   ` Will Deacon
2020-08-10 22:26 ` [PATCH v12 06/13] dt-bindings: arm-smmu: Add compatible string for Adreno " Jordan Crouse
2020-08-10 22:26 ` [PATCH v12 07/13] drm/msm: Add a context pointer to the submitqueue Jordan Crouse
2020-08-13 16:17   ` [Freedreno] " Rob Clark
2020-08-13 17:04   ` Rob Clark
2020-08-10 22:26 ` [PATCH v12 08/13] drm/msm: Set the global virtual address range from the IOMMU domain Jordan Crouse
2020-08-10 22:26 ` [PATCH v12 09/13] drm/msm: Add support to create a local pagetable Jordan Crouse
2020-08-23 23:05   ` Guenter Roeck
2020-08-10 22:26 ` [PATCH v12 10/13] drm/msm: Add support for private address space instances Jordan Crouse
2020-08-10 22:26 ` [PATCH v12 11/13] drm/msm/a6xx: Add support for per-instance pagetables Jordan Crouse
2020-08-10 22:26 ` [PATCH v12 12/13] arm: dts: qcom: sm845: Set the compatible string for the GPU SMMU Jordan Crouse
2020-08-10 22:26 ` [RFC v12 13/13] iommu/arm-smmu: Add a init_context_bank implementation hook Jordan Crouse
2020-08-13 13:03   ` Will Deacon
2020-08-13 13:19 ` [PATCH v12 00/13] iommu/arm-smmu: Add Adreno SMMU specific implementation Will Deacon
2020-08-14  2:40 ` [PATCH 00/19] iommu/arm-smmu + drm/msm: per-process GPU pgtables Rob Clark
2020-08-17 16:51   ` Jordan Crouse
2020-08-14  2:40 ` [PATCH 01/19] drm/msm: remove dangling submitqueue references Rob Clark
2020-08-17 16:51   ` Jordan Crouse
2020-09-01  2:35   ` Bjorn Andersson
2020-09-01  3:42     ` Rob Clark
2020-09-01  5:42       ` Bjorn Andersson
2020-09-01  5:42   ` Bjorn Andersson
2020-08-14  2:40 ` [PATCH 02/19] iommu/arm-smmu: Pass io-pgtable config to implementation specific function Rob Clark
2020-09-01  3:36   ` Bjorn Andersson
2020-08-14  2:40 ` [PATCH 03/19] iommu/arm-smmu: Add support for split pagetables Rob Clark
2020-09-01  3:41   ` Bjorn Andersson
2020-08-14  2:40 ` [PATCH 04/19] iommu/arm-smmu: Prepare for the adreno-smmu implementation Rob Clark
2020-08-14  2:41 ` [PATCH 05/19] iommu: add private interface for adreno-smmu Rob Clark
2020-08-17 16:52   ` [Freedreno] " Jordan Crouse
2020-09-01  3:52   ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 06/19] drm/msm/gpu: add dev_to_gpu() helper Rob Clark
2020-08-17 16:53   ` [Freedreno] " Jordan Crouse
2020-09-01  4:32   ` Bjorn Andersson
2020-09-01 15:53     ` Rob Clark
2020-08-14  2:41 ` [PATCH 07/19] drm/msm: set adreno_smmu as gpu's drvdata Rob Clark
2020-08-17 16:55   ` Jordan Crouse
2020-09-01  4:58   ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 08/19] iommu/arm-smmu: constify some helpers Rob Clark
2020-09-01  4:56   ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 09/19] iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU Rob Clark
2020-09-01  5:00   ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 10/19] dt-bindings: arm-smmu: Add compatible string for Adreno " Rob Clark
2020-09-01  5:00   ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 11/19] drm/msm: Add a context pointer to the submitqueue Rob Clark
2020-09-01  5:05   ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 12/19] drm/msm: Drop context arg to gpu->submit() Rob Clark
2020-09-01  5:06   ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 13/19] drm/msm: Set the global virtual address range from the IOMMU domain Rob Clark
2020-09-01  5:23   ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 14/19] drm/msm: Add support to create a local pagetable Rob Clark
2020-09-01  5:28   ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 15/19] drm/msm: Add support for private address space instances Rob Clark
2020-09-01  5:30   ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 16/19] drm/msm/a6xx: Add support for per-instance pagetables Rob Clark
2020-08-17 15:40   ` Akhil P Oommen
2020-08-17 15:51     ` Rob Clark
2020-08-17 16:47     ` Jordan Crouse
2020-08-14  2:41 ` [PATCH 17/19] arm: dts: qcom: sm845: Set the compatible string for the GPU SMMU Rob Clark
2020-08-14  2:41 ` [PATCH 18/19] iommu/arm-smmu: add a way for implementations to influence SCTLR Rob Clark
2020-09-01  5:31   ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 19/19] drm/msm: show process names in gem_describe Rob Clark
2020-08-17 17:14   ` [Freedreno] " Jordan Crouse
2020-09-01  5:35   ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).