]> 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)
commit3969f42bfc2032cac865328164bd934ed24f1331
tree019e89c703461a0a4a6abae84b08a81c497d2d45
parent8fb557f49402eec36efe1f6c7e95f940c777f2ab
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