mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
The latest GPU uses nvlink and its own MMU to access memory, instead of SMMU like others. So it doesn't go through IOMMU framework to allocate physically non-contiguous memory. The DMA API had a pair of downstream functions to allocate the memory for this situation, but it is removed since it's not likely acceptable for upstream kernel. In order not to hack the dma-direct ops that by its meaning is supposed to provide contiguous memory, this patch adds a pair of memory-allocation functions inside the gpu driver, since nvgpu is the only user. This pair of functions are only used when GPU driver doesn't go through either dma-direct (FORCE_CONTIGUOUS) or iommu. It also requires GPU driver to map the non-contiguous pages. Bug 200444660 Change-Id: I26678a3f8d63bba340872beeecbb7b0e1e7a35fa Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2029680 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
15 KiB
15 KiB