drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest2 patches 7 repliesIn review
- v25 patches 16 repliesSuperseded
- v14 patches 1 replySuperseded
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | ARM: dma-mapping: Set proper DMA ops in arm_iommu_detach_device()arch/ | +6 | 4 replies | |
| 2/2 | drm/nouveau: tegra: Detach from ARM DMA/IOMMU mappingdrivers/ | +13 | 3 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Christoph Hellwig | Robin Murphy | Russell King | Nicolas Chauvet |
|---|---|---|---|---|
| 1/2 | A-b | R-b | A-b | |
| 2/2 | A-b | R-b | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v4 0/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping
From: Thierry Reding <[email protected]>
An unfortunate interaction between the 32-bit ARM DMA/IOMMU mapping code and Tegra SMMU driver changes to support IOMMU groups introduced a boot- time regression on Tegra124. This was caught very late because none of the standard configurations that are tested on Tegra enable the ARM DMA/ IOMMU mapping code since it is not needed.
The reason for the failure is that the GPU found on Tegra uses a special bit in physical addresses to determine whether or not a buffer is mapped through the SMMU. In order to achieve this, the Nouveau driver needs to explicitly understand which buffers are mapped through the SMMU and which aren't. Hiding usage of the SMMU behind the DMA API is bound to fail because the knowledge doesn't exist. Furthermore, the GPU has its own IOMMU and in most cases doesn't need buffers to be physically or virtually contiguous. One notable exception is for compressible buffers which need to be mapped with large pages, which in turn require all the small pages in a large page to be contiguous. This can be achieved with an SMMU mapping, though it isn't currently supported in Nouveau. Since Translating through the SMMU is unnecessary and can have a negative impact on performance for the common case, so we want to avoid it when possible.
This series of patches adds a 32-bit ARM specific API that allows a driver to detach the device from the DMA/IOMMU mapping so that it can provide its own implementation for dealing with the SMMU. The second patch makes use of that new API in the Nouveau driver to fix the regression.
Thierry
Thierry Reding (2):
ARM: dma-mapping: Set proper DMA ops in arm_iommu_detach_device() drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping
arch/arm/mm/dma-mapping.c | 12 ++++++------ drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 13 +++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-)
Signature · 1 line
2.17.0