diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2016-03-03 10:38:12 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-03-14 03:13:34 +0300 |
commit | e02d586da6405f8d401a90f5d19b90c3d7e2810b (patch) | |
tree | d80f3a467335d5722c8af6f17bd812e5f4d15f9a /drivers/gpu/drm/nouveau/nvkm/subdev/instmem | |
parent | 1733a2ad36741b1812cf8b3f3037c28d0af53f50 (diff) | |
download | linux-e02d586da6405f8d401a90f5d19b90c3d7e2810b.tar.xz |
drm/nouveau/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>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/instmem')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c index 4c20fec64d96..6b8f2a19b2d9 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c +++ b/drivers/gpu/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); } |