drm/tegra: Add Tegra DRM allocation API
authorMikko Perttunen <mperttunen@nvidia.com>
Wed, 14 Dec 2016 11:16:11 +0000 (13:16 +0200)
committerThierry Reding <treding@nvidia.com>
Wed, 5 Apr 2017 16:11:46 +0000 (18:11 +0200)
commitad92601521ea1928e702dc709384d21e96202155
tree9560c41ea247234608ed2d24894101d02da04b95
parent5e91144dd702d068b22a75911c06104e56cb4858
drm/tegra: Add Tegra DRM allocation API

Add a new IO virtual memory allocation API to allow clients to
allocate non-GEM memory in the Tegra DRM IOMMU domain. This is
required e.g. for loading client firmware when clients are attached
to the IOMMU domain.

The allocator allocates contiguous physical pages that are then
mapped contiguously to the IOMMU domain using the iova_domain
library provided by the kernel. Contiguous physical pages are
used so that the same allocator works also when IOMMU support
is disabled and therefore devices access physical memory directly.

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