提交 e02d586d 编写于 作者: A Alexandre Courbot 提交者: Ben Skeggs

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: NAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 1733a2ad
...@@ -228,6 +228,8 @@ gk20a_instobj_release_dma(struct nvkm_memory *memory) ...@@ -228,6 +228,8 @@ gk20a_instobj_release_dma(struct nvkm_memory *memory)
struct gk20a_instmem *imem = node->imem; struct gk20a_instmem *imem = node->imem;
struct nvkm_ltc *ltc = imem->base.subdev.device->ltc; struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;
/* in case we got a write-combined mapping */
wmb();
nvkm_ltc_invalidate(ltc); nvkm_ltc_invalidate(ltc);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册