summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2017-11-01 03:56:19 +1000
committerBen Skeggs <bskeggs@redhat.com>2017-11-02 13:32:25 +1000
commit806a7335653743a33f476a3705d55bada95b7dfe (patch)
tree21ac49a98d3917c0ffd127e126833c45ff1056cb /drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c
parentf1280394109a3a3a7ef1c37950d4356b12e75cb9 (diff)
drm/nouveau/mmu: implement base for new vm management
This is the first chunk of the new VMM code that provides the structures needed to describe a GPU virtual address-space layout, as well as common interfaces to handle VMM creation, and connecting instances to a VMM. The constructor now allocates the PD itself, rather than having the user handle that manually. This won't/can't be used until after all backends have been ported to these interfaces, so a little bit of memory will be wasted on Fermi and newer for a couple of commits in the series. Compatibility has been hacked into the old code to allow each GPU backend to be ported individually. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c
index 43e3b4a77583..5bf757541f7b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c
@@ -105,10 +105,8 @@ nv04_mmu_dtor(struct nvkm_mmu *base)
{
struct nv04_mmu *mmu = nv04_mmu(base);
struct nvkm_device *device = mmu->base.subdev.device;
- if (mmu->base.vmm) {
+ if (mmu->base.vmm)
nvkm_memory_unref(&mmu->base.vmm->pgt[0].mem[0]);
- nvkm_vm_ref(NULL, &mmu->base.vmm, NULL);
- }
if (mmu->nullp) {
dma_free_coherent(device->dev, 16 * 1024,
mmu->nullp, mmu->null);