OpenCloudOS-Kernel/drivers/gpu/drm/nouveau/nvkm/engine
Thierry Reding b59fb482b5 drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping
Depending on the kernel configuration, early ARM architecture setup code
may have attached the GPU to a DMA/IOMMU mapping that transparently uses
the IOMMU to back the DMA API. Tegra requires special handling for IOMMU
backed buffers (a special bit in the GPU's MMU page tables indicates the
memory path to take: via the SMMU or directly to the memory controller).
Transparently backing DMA memory with an IOMMU prevents Nouveau from
properly handling such memory accesses and causes memory access faults.

As a side-note: buffers other than those allocated in instance memory
don't need to be physically contiguous from the GPU's perspective since
the GPU can map them into contiguous buffers using its own MMU. Mapping
these buffers through the IOMMU is unnecessary and will even lead to
performance degradation because of the additional translation. One
exception to this are compressible buffers which need large pages. In
order to enable these large pages, multiple small pages will have to be
combined into one large (I/O virtually contiguous) mapping via the
IOMMU. However, that is a topic outside the scope of this fix and isn't
currently supported. An implementation will want to explicitly create
these large pages in the Nouveau driver, so detaching from a DMA/IOMMU
mapping would still be required.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Nicolas Chauvet <kwizart@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-07-16 18:06:36 +10:00
..
bsp drm/nouveau/bsp/g92: disable by default 2017-10-03 16:34:17 +10:00
ce drm/nouveau/ce/gv100: initial support 2018-05-18 15:01:46 +10:00
cipher drm/nouveau/core: remove pmc_enable argument from subdev ctor 2016-05-20 14:43:04 +10:00
device drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping 2018-07-16 18:06:36 +10:00
disp drm/nouveau/disp/nv50-gp10x: fix coverity warning 2018-07-16 18:06:29 +10:00
dma drm/nouveau/dma/gv100: initial support 2018-05-18 15:01:39 +10:00
fifo treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
gr drm/nouveau/gr/gv100: handle multiple SM-per-TPC for shader exceptions 2018-07-16 18:06:28 +10:00
mpeg main drm pull request for v4.15 2017-11-15 20:42:10 -08:00
msenc drm/nouveau/core: add msenc plumbing 2016-03-14 10:13:43 +10:00
mspdec License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
msppp License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
msvld License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nvdec License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nvenc drm/nouveau/core: add nvenc plumbing 2016-03-14 10:13:44 +10:00
pm treewide: Use struct_size() for kmalloc()-family 2018-06-06 11:15:43 -07:00
sec License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sec2 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sw main drm pull request for v4.15 2017-11-15 20:42:10 -08:00
vic drm/nouveau/core: add vic plumbing 2016-03-14 10:13:45 +10:00
vp drm/nouveau/core: remove pmc_enable argument from subdev ctor 2016-05-20 14:43:04 +10:00
Kbuild drm/nouveau/core: add SEC2 engine 2017-03-07 17:05:13 +10:00
falcon.c drm/nouveau/core/memory: add reference counting 2017-11-02 13:32:22 +10:00
xtensa.c drm/nouveau/core/memory: add reference counting 2017-11-02 13:32:22 +10:00