diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2015-11-11 17:07:51 +0900 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-01-11 11:15:09 +1000 |
commit | 5c29a21323204cc12b643f3f5b1c94ed11a59173 (patch) | |
tree | 5c0da518647943df51913f05b6508819b711a5b0 /lib | |
parent | df2ba381d60c879db1fb05f608b894044015c099 (diff) | |
download | nouveau-5c29a21323204cc12b643f3f5b1c94ed11a59173.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>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'lib')
-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 *****************************************************************************/ |