Selaa lähdekoodia

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>
Alexandre Courbot 9 vuotta sitten
vanhempi
commit
e02d586da6
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c

+ 2 - 0
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 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);
 }
 }