diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2017-10-31 20:56:20 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-11-02 06:32:32 +0300 |
commit | 96da0bcd51964ca708d8de2987ff473a9da4406d (patch) | |
tree | 28ac39b37917b4957b803531bac0c0c9ce3bf05c /drivers/gpu/drm/nouveau/nouveau_vmm.c | |
parent | acb16cfa95f1cc6fb4b1b52da27bdbeb079ef115 (diff) | |
download | linux-96da0bcd51964ca708d8de2987ff473a9da4406d.tar.xz |
drm/nouveau: allocate vmm object for every client
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_vmm.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_vmm.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_vmm.c b/drivers/gpu/drm/nouveau/nouveau_vmm.c index 6dc14f92b988..656f43ad012d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_vmm.c +++ b/drivers/gpu/drm/nouveau/nouveau_vmm.c @@ -114,13 +114,19 @@ done: void nouveau_vmm_fini(struct nouveau_vmm *vmm) { - nvkm_vm_ref(NULL, &vmm->vm, NULL); + nvif_vmm_fini(&vmm->vmm); + vmm->cli = NULL; } int nouveau_vmm_init(struct nouveau_cli *cli, s32 oclass, struct nouveau_vmm *vmm) { + int ret = nvif_vmm_init(&cli->mmu, oclass, PAGE_SIZE, 0, NULL, 0, + &vmm->vmm); + if (ret) + return ret; + vmm->cli = cli; - return nvkm_vm_new(nvxx_device(&cli->device), 0, (1ULL << 40), - 0x1000, NULL, &vmm->vm); + vmm->vm = nvkm_uvmm(vmm->vmm.object.priv)->vmm; + return 0; } |