]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
drm/nouveau/imem/nv40: map bar2 write-combined
authorBen Skeggs <bskeggs@redhat.com>
Tue, 31 Oct 2017 17:56:19 +0000 (03:56 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 2 Nov 2017 03:32:19 +0000 (13:32 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c

index 5ae9dd28dbbadb35e63a9a3df2a1557c3cdb0f30..01453fdaa049b58ace1283387c0e330667d224d2 100644 (file)
@@ -67,6 +67,7 @@ nv40_instobj_ptrs = {
 static void
 nv40_instobj_release(struct nvkm_memory *memory)
 {
+       wmb();
 }
 
 static void __iomem *
@@ -253,8 +254,8 @@ nv40_instmem_new(struct nvkm_device *device, int index,
        else
                bar = 3;
 
-       imem->iomem = ioremap(device->func->resource_addr(device, bar),
-                             device->func->resource_size(device, bar));
+       imem->iomem = ioremap_wc(device->func->resource_addr(device, bar),
+                                device->func->resource_size(device, bar));
        if (!imem->iomem) {
                nvkm_error(&imem->base.subdev, "unable to map PRAMIN BAR\n");
                return -EFAULT;