linux/drivers/gpu/drm/nouveau/nvkm/subdev/instmem
Alexandre Courbot b306712d92 drm/nouveau/instmem/gk20a: use DMA API CPU mapping
Commit 69c4938249 ("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>
2016-01-11 11:17:40 +10:00
..
base.c drm/nouveau/instmem: protect instobj list with a spinlock 2015-11-25 15:31:21 +10:00
gk20a.c drm/nouveau/instmem/gk20a: use DMA API CPU mapping 2016-01-11 11:17:40 +10:00
Kbuild drm/nouveau/instmem/gk20a: move memory allocation to instmem 2015-04-14 17:00:42 +10:00
nv04.c drm/nouveau/imem: convert to new-style nvkm_subdev 2015-08-28 12:40:44 +10:00
nv40.c drm/nouveau/device: cleaner abstraction for device resource functions 2015-08-28 12:40:48 +10:00
nv50.c drm/nouveau/device: cleaner abstraction for device resource functions 2015-08-28 12:40:48 +10:00
priv.h drm/nouveau/imem: convert to new-style nvkm_subdev 2015-08-28 12:40:44 +10:00