drm/nouveau/fifo/nv04-nv40: fix missing nvkm_kmap() calls around ramfc access
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:27 +0000 (13:32 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c

index 0a7b6ed5ed284fc56fa518dceb9ae050643cce60..c213122cf08858cf3920cc7c05a2ec5e4dfd7692 100644 (file)
@@ -95,6 +95,7 @@ nv04_fifo_dma_fini(struct nvkm_fifo_chan *base)
                nvkm_mask(device, NV04_PFIFO_CACHE1_PULL0, 0x00000001, 0);
 
                c = fifo->ramfc;
+               nvkm_kmap(fctx);
                do {
                        u32 rm = ((1ULL << c->bits) - 1) << c->regs;
                        u32 cm = ((1ULL << c->bits) - 1) << c->ctxs;
@@ -102,6 +103,7 @@ nv04_fifo_dma_fini(struct nvkm_fifo_chan *base)
                        u32 cv = (nvkm_ro32(fctx, c->ctxp + data) & ~cm);
                        nvkm_wo32(fctx, c->ctxp + data, cv | (rv << c->ctxs));
                } while ((++c)->bits);
+               nvkm_done(fctx);
 
                c = fifo->ramfc;
                do {