]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau: synchronize BOs when required
authorAlexandre Courbot <acourbot@nvidia.com>
Mon, 27 Oct 2014 09:49:19 +0000 (18:49 +0900)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 2 Dec 2014 05:44:00 +0000 (15:44 +1000)
commite8090f88278b8e4d4c43d5cf443382a45879cacb
treeb967fb75ea6f4e9500a02297246bdf95c116f19f
parentad9e66d62e15213cbdad8283b3dfb71abd24729a
drm/nouveau: synchronize BOs when required

On architectures for which access to GPU memory is non-coherent,
caches need to be flushed and invalidated explicitly when BO control
changes between CPU and GPU.

This patch adds buffer synchronization functions which invokes the
correct API (PCI or DMA) to ensure synchronization is effective.

Based on the TTM DMA cache helper patches by Lucas Stach.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
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
drivers/gpu/drm/nouveau/nouveau_gem.c