All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 00/10] Add NVIDIA Tegra124 IOMMU support
@ 2014-06-26 20:49 ` Thierry Reding
  0 siblings, 0 replies; 133+ messages in thread
From: Thierry Reding @ 2014-06-26 20:49 UTC (permalink / raw)
  To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Stephen Warren, Arnd Bergmann, Will Deacon, Joerg Roedel
  Cc: Olav Haugan, devicetree-u79uwXL29TY76Z2rM5mHXA, Grant Grundler,
	Rhyland Klein, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Marc Zyngier, Allen Martin,
	Paul Walmsley, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Cho KyongHo,
	Dave Martin, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

This series adds support for the IOMMU found on Tegra124 SoCs. The SMMU
groups memory clients into SWGROUPs and each SWGROUP can be assigned to
one I/O virtual address space. Translation of virtual addresses can be
enabled per memory client.

Patch 1 adds an IOMMU device registry. The driver in patch 4 will add
the IOMMU device with this registry, which will in turn be used by the
client drivers to attach to the IOMMU device. Note that the API that is
introduced in this patch may not be sufficient in the long term (f.e.
when multiple master interfaces need to be supported).

Patch 2 is v3 of the generic IOMMU device tree binding that has been
discussed previously. Patch 3 defines the device tree binding for the
NVIDIA Tegra124 memory controller (and references the generic IOMMU
binding).

Patch 4 implements a memory controller driver for NVIDIA Tegra124. It
initializes the latency allowance programming to sensible defaults and
registers an IOMMU device. Note that this is still somewhat work in
progress. The page tables aren't properly cleaned up yet and other
features of the memory controller may be useful to implement
subsequently.

Patches 5 through 8 add the device tree node for the memory controller
and enable IOMMU support in the display and SDMMC controllers as
examples.

Patches 9 and 10 add support for IOMMU to the DRM and SDMMC drivers.
SDMMC uses the DMA mapping API, which will make use of ARM's DMA/IOMMU
integration. DRM has special needs (buffers that are mapped can be
scanned out by either display controller) and not a good fit for the
DMA mapping API, so it uses the IOMMU API directly.

This has been tested using both SDMMC and DRM drivers via the IOMMU. For
DRM when an IOMMU is detected it will use shmem as backing store, which
removes the need for CMA. Importing from gk20a via the Nouveau driver
also works, but buffers occasionally have some kind of offset that I
haven't been able to track down yet.

Thierry

Thierry Reding (10):
  iommu: Add IOMMU device registry
  devicetree: Add generic IOMMU device tree bindings
  of: Add NVIDIA Tegra124 memory controller binding
  memory: Add Tegra124 memory controller support
  ARM: tegra: Add memory controller on Tegra124
  ARM: tegra: tegra124: Enable IOMMU for display controllers
  ARM: tegra: tegra124: Enable IOMMU for SDMMC controllers
  ARM: tegra: Select ARM_DMA_USE_IOMMU
  drm/tegra: Add IOMMU support
  mmc: sdhci-tegra: Add IOMMU support

 Documentation/devicetree/bindings/iommu/iommu.txt  |  156 ++
 .../memory-controllers/nvidia,tegra124-mc.txt      |   12 +
 arch/arm/boot/dts/tegra124.dtsi                    |   18 +
 arch/arm/mach-tegra/Kconfig                        |    1 +
 drivers/gpu/drm/tegra/dc.c                         |   21 +
 drivers/gpu/drm/tegra/drm.c                        |   17 +
 drivers/gpu/drm/tegra/drm.h                        |    3 +
 drivers/gpu/drm/tegra/fb.c                         |   16 +-
 drivers/gpu/drm/tegra/gem.c                        |  236 ++-
 drivers/gpu/drm/tegra/gem.h                        |    4 +
 drivers/iommu/iommu.c                              |   93 +
 drivers/memory/Kconfig                             |    9 +
 drivers/memory/Makefile                            |    1 +
 drivers/memory/tegra124-mc.c                       | 1945 ++++++++++++++++++++
 drivers/mmc/host/sdhci-tegra.c                     |    8 +
 include/dt-bindings/memory/tegra124-mc.h           |   30 +
 include/linux/iommu.h                              |   27 +
 17 files changed, 2573 insertions(+), 24 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/iommu/iommu.txt
 create mode 100644 Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-mc.txt
 create mode 100644 drivers/memory/tegra124-mc.c
 create mode 100644 include/dt-bindings/memory/tegra124-mc.h

-- 
2.0.0

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

end of thread, other threads:[~2014-11-05 10:27 UTC | newest]

Thread overview: 133+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-26 20:49 [RFC 00/10] Add NVIDIA Tegra124 IOMMU support Thierry Reding
2014-06-26 20:49 ` Thierry Reding
2014-06-26 20:49 ` Thierry Reding
     [not found] ` <1403815790-8548-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-06-26 20:49   ` [RFC 01/10] iommu: Add IOMMU device registry Thierry Reding
2014-06-26 20:49     ` Thierry Reding
2014-06-26 20:49     ` Thierry Reding
     [not found]     ` <1403815790-8548-2-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-06-27  6:58       ` Thierry Reding
2014-06-27  6:58         ` Thierry Reding
2014-06-27  6:58         ` Thierry Reding
2014-07-03 10:37         ` Varun Sethi
2014-07-03 10:37           ` Varun Sethi
2014-07-03 10:37           ` Varun Sethi
2014-07-04 11:05       ` Joerg Roedel
2014-07-04 11:05         ` Joerg Roedel
2014-07-04 11:05         ` Joerg Roedel
     [not found]         ` <20140704110529.GF13434-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-07-04 13:47           ` Thierry Reding
2014-07-04 13:47             ` Thierry Reding
2014-07-04 13:47             ` Thierry Reding
2014-07-04 13:49             ` Will Deacon
2014-07-04 13:49               ` Will Deacon
2014-07-04 13:49               ` Will Deacon
     [not found]               ` <20140704134928.GA25714-5wv7dgnIgG8@public.gmane.org>
2014-07-06 18:17                 ` Arnd Bergmann
2014-07-06 18:17                   ` Arnd Bergmann
2014-07-06 18:17                   ` Arnd Bergmann
     [not found]                   ` <201407062017.23049.arnd-r2nGTMty4D4@public.gmane.org>
2014-07-07 11:42                     ` Thierry Reding
2014-07-07 11:42                       ` Thierry Reding
2014-07-07 11:42                       ` Thierry Reding
2014-06-26 20:49   ` [PATCH v3 02/10] devicetree: Add generic IOMMU device tree bindings Thierry Reding
2014-06-26 20:49     ` Thierry Reding
2014-06-26 20:49     ` Thierry Reding
     [not found]     ` <1403815790-8548-3-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-06-27 13:55       ` Will Deacon
2014-06-27 13:55         ` Will Deacon
2014-06-27 13:55         ` Will Deacon
2014-06-30 22:24       ` Stephen Warren
2014-06-30 22:24         ` Stephen Warren
2014-06-30 22:24         ` Stephen Warren
2014-07-04  6:42       ` Varun Sethi
2014-07-04  6:42         ` Varun Sethi
2014-07-04  6:42         ` Varun Sethi
     [not found]         ` <9ffe3c3871ef4b60a955259bfa0bed6c-AZ66ij2kwaacCcN9WK45f+O6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-07-04  9:05           ` Arnd Bergmann
2014-07-04  9:05             ` Arnd Bergmann
2014-07-04  9:05             ` Arnd Bergmann
2014-06-26 20:49   ` [RFC 03/10] of: Add NVIDIA Tegra124 memory controller binding Thierry Reding
2014-06-26 20:49     ` Thierry Reding
2014-06-26 20:49     ` Thierry Reding
2014-06-26 20:49   ` [RFC 04/10] memory: Add Tegra124 memory controller support Thierry Reding
2014-06-26 20:49     ` Thierry Reding
2014-06-26 20:49     ` Thierry Reding
     [not found]     ` <1403815790-8548-5-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-06-27  7:41       ` Joseph Lo
2014-06-27  7:41         ` Joseph Lo
2014-06-27  7:41         ` Joseph Lo
     [not found]         ` <53AD2020.1050802-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-06-27  8:17           ` Thierry Reding
2014-06-27  8:17             ` Thierry Reding
2014-06-27  8:17             ` Thierry Reding
2014-06-27  8:24             ` Hiroshi Doyu
2014-06-27  8:24               ` Hiroshi Doyu
2014-06-27  9:46       ` Hiroshi DOyu
2014-06-27  9:46         ` Hiroshi DOyu
2014-06-27  9:46         ` Hiroshi DOyu
     [not found]         ` <20140627124638.7ec150cca163c89727b8953f-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-06-27 11:08           ` Thierry Reding
2014-06-27 11:08             ` Thierry Reding
2014-06-27 11:08             ` Thierry Reding
2014-06-27 21:33             ` Stephen Warren
2014-06-27 21:33               ` Stephen Warren
2014-06-27 21:33               ` Stephen Warren
2014-06-27 11:07       ` Arnd Bergmann
2014-06-27 11:07         ` Arnd Bergmann
2014-06-27 11:07         ` Arnd Bergmann
2014-06-27 11:15         ` Thierry Reding
2014-06-27 11:15           ` Thierry Reding
2014-06-27 11:15           ` Thierry Reding
2014-06-27 21:37           ` Stephen Warren
2014-06-27 21:37             ` Stephen Warren
2014-06-27 21:37             ` Stephen Warren
2014-06-30 22:43       ` Stephen Warren
2014-06-30 22:43         ` Stephen Warren
2014-06-30 22:43         ` Stephen Warren
2014-07-01 12:14       ` Hiroshi Doyu
2014-07-01 12:14         ` Hiroshi Doyu
2014-07-01 12:14         ` Hiroshi Doyu
2014-06-27 13:29     ` Mikko Perttunen
2014-06-27 13:29       ` Mikko Perttunen
2014-06-27 13:29       ` Mikko Perttunen
2014-06-26 20:49   ` [RFC 05/10] ARM: tegra: Add memory controller on Tegra124 Thierry Reding
2014-06-26 20:49     ` Thierry Reding
2014-06-26 20:49     ` Thierry Reding
2014-06-26 20:49   ` [RFC 06/10] ARM: tegra: tegra124: Enable IOMMU for display controllers Thierry Reding
2014-06-26 20:49     ` Thierry Reding
2014-06-26 20:49     ` Thierry Reding
2014-06-26 20:49   ` [RFC 07/10] ARM: tegra: tegra124: Enable IOMMU for SDMMC controllers Thierry Reding
2014-06-26 20:49     ` Thierry Reding
2014-06-26 20:49     ` Thierry Reding
2014-06-26 20:49   ` [RFC 08/10] ARM: tegra: Select ARM_DMA_USE_IOMMU Thierry Reding
2014-06-26 20:49     ` Thierry Reding
2014-06-26 20:49     ` Thierry Reding
2014-06-26 20:49   ` [RFC 09/10] drm/tegra: Add IOMMU support Thierry Reding
2014-06-26 20:49     ` Thierry Reding
2014-06-26 20:49     ` Thierry Reding
     [not found]     ` <1403815790-8548-10-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-06-27  9:46       ` Hiroshi DOyu
2014-06-27  9:46         ` Hiroshi DOyu
2014-06-27  9:46         ` Hiroshi DOyu
     [not found]         ` <20140627124614.050be2e406a4b9a02d9fe97c-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-06-27 10:54           ` Arnd Bergmann
2014-06-27 10:54             ` Arnd Bergmann
2014-06-27 10:54             ` Arnd Bergmann
2014-06-27 11:03             ` Hiroshi Doyu
2014-06-27 11:03               ` Hiroshi Doyu
2014-06-27 10:58           ` Thierry Reding
2014-06-27 10:58             ` Thierry Reding
2014-06-27 10:58             ` Thierry Reding
2014-09-30 18:48       ` Sean Paul
2014-09-30 18:48         ` Sean Paul
2014-09-30 18:48         ` Sean Paul
     [not found]         ` <CAOw6vbJy6oy7cibH4f332UM=kS56KUMcnYdUTG0pEYXyQkFDoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-01 15:54           ` Sean Paul
2014-10-01 15:54             ` Sean Paul
2014-10-01 15:54             ` Sean Paul
     [not found]             ` <CAOw6vbLFLrqWYB-4N50G7oucgMD+xd+QtdcMSzX4z7xRiU-vPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-02  8:39               ` Thierry Reding
2014-10-02  8:39                 ` Thierry Reding
2014-10-02  8:39                 ` Thierry Reding
2014-11-05  9:50               ` Thierry Reding
2014-11-05  9:50                 ` Thierry Reding
2014-11-05  9:50                 ` Thierry Reding
2014-11-05 10:26           ` Thierry Reding
2014-11-05 10:26             ` Thierry Reding
2014-11-05 10:26             ` Thierry Reding
2014-06-26 20:49   ` [RFC 10/10] mmc: sdhci-tegra: " Thierry Reding
2014-06-26 20:49     ` Thierry Reding
2014-06-26 20:49     ` Thierry Reding
     [not found]     ` <1403815790-8548-11-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-06-27  9:46       ` Hiroshi DOyu
2014-06-27  9:46         ` Hiroshi DOyu
2014-06-27  9:46         ` Hiroshi DOyu
     [not found]         ` <20140627124602.53d046dae5d7e269815e56a0-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-06-27 11:01           ` Thierry Reding
2014-06-27 11:01             ` Thierry Reding
2014-06-27 11:01             ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.