diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2015-11-11 16:37:33 +0900 |
---|---|---|
committer | Alexandre Courbot <acourbot@nvidia.com> | 2015-11-11 17:09:09 +0900 |
commit | 5678d2364b3625eb3d169e64486614daa12da733 (patch) | |
tree | 80b34a091c5d9aa363f14123357fc6efc2466516 /lib/include/nvif/os.h | |
parent | fe3ed618b24ff539432db339091ce49486108bb4 (diff) | |
download | nouveau-5678d2364b3625eb3d169e64486614daa12da733.tar.gz |
instmem/gk20a: use DMA API CPU mapping
Commit 69c4938249fb ("drm/nouveau/instmem/gk20a: use direct CPU access")
tried to be smart while using the DMA-API by managing the CPU mappings of
buffers allocated with the DMA-API by itself. In doing so, it relied
on dma_to_phys() which is an architecture-private function not
available everywhere. This broke the build on several architectures.
Since there is no reliable and portable way to obtain the physical
address of a DMA-API buffer, stop trying to be smart and just use the
CPU mapping that the DMA-API can provide. This means that buffers will
be CPU-mapped for all their life as opposed to when we need them, but
anyway using the DMA-API here is a fallback for when no IOMMU is
available so we should not expect optimal behavior.
This makes the IOMMU and DMA-API implementations of instmem diverge
enough that we should maybe put them into separate files...
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Diffstat (limited to 'lib/include/nvif/os.h')
-rw-r--r-- | lib/include/nvif/os.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/include/nvif/os.h b/lib/include/nvif/os.h index 2df304891..e8c06cb25 100644 --- a/lib/include/nvif/os.h +++ b/lib/include/nvif/os.h @@ -943,12 +943,6 @@ dma_unmap_page(struct device *pdev, dma_addr_t addr, int size, unsigned flags) { } -static inline phys_addr_t -dma_to_phys(struct device *dev, dma_addr_t addr) -{ - return 0; -} - /****************************************************************************** * PCI *****************************************************************************/ |