]> git.baikalelectronics.ru Git - kernel.git/commit
drm/tegra: Restrict IOVA space to DMA mask
authorThierry Reding <treding@nvidia.com>
Fri, 1 Feb 2019 13:28:34 +0000 (14:28 +0100)
committerThierry Reding <treding@nvidia.com>
Thu, 7 Feb 2019 17:29:00 +0000 (18:29 +0100)
commit7e379f69c6c7af3820a6dd3a9d03737d236ccd60
tree019e89c703461a0a4a6abae84b08a81c497d2d45
parent505adaf6d34ad9bae73b9d55b1911ce185e5dc9b
drm/tegra: Restrict IOVA space to DMA mask

On Tegra186 and later, the ARM SMMU provides an input address space that
is 48 bits wide. However, memory clients can only address up to 40 bits.
If the geometry is used as-is, allocations of IOVA space can end up in a
region that cannot be addressed by the memory clients.

To fix this, restrict the IOVA space to the DMA mask of the host1x
device. Note that, technically, the IOVA space needs to be restricted to
the intersection of the DMA masks for all clients that are attached to
the IOMMU domain. In practice using the DMA mask of the host1x device is
sufficient because all host1x clients share the same DMA mask.

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/drm.c