Skip to content

drm/tegra: Fix IOVA space on Tegra186 and later

Thierry Reding dri-devel linux-tegra 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest16 patches 13 repliesIn review
  2. v213 patches 13 repliesSuperseded
  3. v15 patches 16 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16gpu: host1x: Set up stream ID tabledrivers/gpu/host1x/dev.c drivers/gpu/host1x/dev.h+46 -00 replies
2/16gpu: host1x: Program the channel stream IDdrivers/gpu/host1x/hw/channel_hw.c drivers/gpu/host1x/hw/host1x06_hardware.h drivers/gpu/host1x/hw/host1x07_hardware.h +2 more+36 -00 replies
3/16gpu: host1x: Introduce support for wide opcodesdrivers/gpu/host1x/cdma.c drivers/gpu/host1x/cdma.h include/trace/events/host1x.h+120 -00 replies
4/16gpu: host1x: Support 40-bit addressingdrivers/gpu/host1x/hw/cdma_hw.c drivers/gpu/host1x/hw/channel_hw.c drivers/gpu/host1x/hw/host1x06_hardware.h +1 more+62 -100 replies
5/16gpu: host1x: Use direct DMA with IOMMU API usagedrivers/gpu/host1x/cdma.c+8 -31 reply
6/16gpu: host1x: Restrict IOVA space to DMA maskdrivers/gpu/host1x/dev.c+6 -31 reply
7/16gpu: host1x: Support 40-bit addressing on Tegra186drivers/gpu/host1x/dev.c+1 -10 replies
8/16gpu: host1x: Use correct semantics for HOST1X_CHANNEL_DMAENDdrivers/gpu/host1x/hw/cdma_hw.c+2 -26 replies
9/16gpu: host1x: Optimize CDMA push buffer memory usagedrivers/gpu/host1x/cdma.c+25 -41 reply
10/16drm/tegra: Store parent pointer in Tegra DRM clientsdrivers/gpu/drm/tegra/drm.c drivers/gpu/drm/tegra/drm.h+3 -01 reply
11/16drm/tegra: vic: Load firmware on demanddrivers/gpu/drm/tegra/vic.c+36 -170 replies
12/16drm/tegra: Setup shared IOMMU domain after initializationdrivers/gpu/drm/tegra/drm.c+29 -251 reply
13/16drm/tegra: Restrict IOVA space to DMA maskdrivers/gpu/drm/tegra/drm.c+3 -21 reply
14/16drm/tegra: vic: Do not clear driver datadrivers/gpu/drm/tegra/vic.c+0 -10 replies
15/16drm/tegra: vic: Support stream ID register programmingdrivers/gpu/drm/tegra/vic.c drivers/gpu/drm/tegra/vic.h+30 -00 replies
16/16arm64: tegra: Enable SMMU for VIC on Tegra186arch/arm64/boot/dts/nvidia/tegra186.dtsi+1 -00 replies

Reviews trailers per patch

9 of 16 patches have a Reviewed-by or Acked-by.

PatchDmitry Osipenko
1/16
2/16
3/16
4/16
5/16R-b R-b T-b
6/16R-b T-b
7/16
8/16R-b T-b
9/16R-b T-b
10/16R-b R-b T-b
11/16R-b
12/16R-b R-b T-b
13/16R-b T-b
14/16R-b
15/16
16/16

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 00/16] drm/tegra: Fix IOVA space on Tegra186 and later

From: Thierry Reding <[email protected]>

Tegra186 and later are different from earlier generations in that they use an ARM SMMU rather than the Tegra SMMU. The ARM SMMU driver behaves slightly differently in that the geometry for IOMMU domains is set only after a device was attached to it. This is to make sure that the SMMU instance that the domain belongs to is known, because each instance can have a different input address space (i.e. geometry).

Work around this by moving all IOVA allocations to a point where the geometry of the domain is properly initialized.

This second version of the series addresses all review comments and adds a number of patches that will actually allow host1x to work with an SMMU enabled on Tegra186. The patches also add programming required to address the full 40 bits of address space.

The third version of the series fixes the 40-bit addressing code by making sure that wide opcodes are always written atomically to the push buffer. Another pair of patches are introduced to fix a long-standing bug where the HOST1X_CHANNEL_DMAEND register wasn't properly programmed and one push buffer memory optimization that avoid wasting almost one full memory page per push buffer.

This supersedes the following patch:

	https://patchwork.kernel.org/patch/10775579/

Thierry

Thierry Reding (16):
gpu: host1x: Set up stream ID table
gpu: host1x: Program the channel stream ID
gpu: host1x: Introduce support for wide opcodes
gpu: host1x: Support 40-bit addressing
gpu: host1x: Use direct DMA with IOMMU API usage
gpu: host1x: Restrict IOVA space to DMA mask
gpu: host1x: Support 40-bit addressing on Tegra186
gpu: host1x: Use correct semantics for HOST1X_CHANNEL_DMAEND
gpu: host1x: Optimize CDMA push buffer memory usage drm/tegra: Store parent pointer in Tegra DRM clients drm/tegra: vic: Load firmware on demand
drm/tegra: Setup shared IOMMU domain after initialization drm/tegra: Restrict IOVA space to DMA mask drm/tegra: vic: Do not clear driver data drm/tegra: vic: Support stream ID register programming
arm64: tegra: Enable SMMU for VIC on Tegra186

 arch/arm64/boot/dts/nvidia/tegra186.dtsi    |   1 +
 drivers/gpu/drm/tegra/drm.c                 |  57 +++++----
 drivers/gpu/drm/tegra/drm.h                 |   1 +
 drivers/gpu/drm/tegra/vic.c                 |  75 ++++++++---
 drivers/gpu/drm/tegra/vic.h                 |   9 ++
 drivers/gpu/host1x/cdma.c                   | 132 ++++++++++++++++++--
 drivers/gpu/host1x/cdma.h                   |   2 +
 drivers/gpu/host1x/dev.c                    |  49 +++++++-
 drivers/gpu/host1x/dev.h                    |   8 ++
 drivers/gpu/host1x/hw/cdma_hw.c             |  32 ++++-
 drivers/gpu/host1x/hw/channel_hw.c          |  42 ++++++-
 drivers/gpu/host1x/hw/host1x06_hardware.h   |   6 +
 drivers/gpu/host1x/hw/host1x07_hardware.h   |   6 +
 drivers/gpu/host1x/hw/hw_host1x06_channel.h |  11 ++
 drivers/gpu/host1x/hw/hw_host1x07_channel.h |  11 ++
 include/trace/events/host1x.h               |  26 ++++
 16 files changed, 404 insertions(+), 64 deletions(-)
 create mode 100644 drivers/gpu/host1x/hw/hw_host1x06_channel.h
 create mode 100644 drivers/gpu/host1x/hw/hw_host1x07_channel.h
Signature · 6 lines
2.19.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel