]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau: implement explicitly coherent BOs
authorAlexandre Courbot <acourbot@nvidia.com>
Mon, 27 Oct 2014 09:49:17 +0000 (18:49 +0900)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 2 Dec 2014 05:43:59 +0000 (15:43 +1000)
commitecaba3dcec9dcfbf2a86b15dac2fc46c649e0e94
tree4374fe4b75818b907ab3c07bcdc9ec9e0e6325ed
parent707d88a75721ba7f402b7b23e6d80bd720e419f4
drm/nouveau: implement explicitly coherent BOs

Allow nouveau_bo_new() to recognize the TTM_PL_FLAG_UNCACHED flag, which
means that we want the allocated BO to be perfectly coherent between the
CPU and GPU. This is useful on non-coherent architectures for which we
do not want to manually sync some rarely-accessed buffers: typically,
fences and pushbuffers.

A TTM BO allocated with the TTM_PL_FLAG_UNCACHED on a non-coherent
architecture will be populated using the DMA API, and accesses to it
performed using the coherent mapping performed by dma_alloc_coherent().

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_bo.h