summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2015-11-11 17:17:01 +0900
committerAlexandre Courbot <acourbot@nvidia.com>2016-01-15 14:32:53 +0900
commita6557fa5b4d348eac83533efd7ebfa0bfa40496d (patch)
treed2337743c70358522b872b89c511e1aa37271730
parent54a79a667652b511ffaf6f4f206954e91d9e0d8e (diff)
downloadnouveau-a6557fa5b4d348eac83533efd7ebfa0bfa40496d.tar.gz
instmem/gk20a: add write barrier when releasing DMA object
When using the DMA-API for instmem, we may obtain a write-combined mapping. For such cases, add a write barrier in gk20a_instobj_release_dma() to make sure that all writes have reached memory at this time. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
-rw-r--r--drm/nouveau/nvkm/subdev/instmem/gk20a.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drm/nouveau/nvkm/subdev/instmem/gk20a.c b/drm/nouveau/nvkm/subdev/instmem/gk20a.c
index 4c20fec64..6b8f2a19b 100644
--- a/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/instmem/gk20a.c
@@ -228,6 +228,8 @@ gk20a_instobj_release_dma(struct nvkm_memory *memory)
struct gk20a_instmem *imem = node->imem;
struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;
+ /* in case we got a write-combined mapping */
+ wmb();
nvkm_ltc_invalidate(ltc);
}