drm/nouveau/bar/nv50: fix bar2 vm size
authorBen Skeggs <bskeggs@redhat.com>
Wed, 11 May 2016 06:28:30 +0000 (16:28 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 12 Oct 2016 07:29:31 +0000 (17:29 +1000)
The BAR2 page table was being made WAY too big - oops.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c

index 370dcd8ff7b5abd0f0c3424a8783dcc6acbffee3..6eff637ac301af422e83ff2d083413ce4656910d 100644 (file)
@@ -84,7 +84,7 @@ nv50_bar_oneinit(struct nvkm_bar *base)
        start = 0x0100000000ULL;
        limit = start + device->func->resource_size(device, 3);
 
-       ret = nvkm_vm_new(device, start, limit, start, &bar3_lock, &vm);
+       ret = nvkm_vm_new(device, start, limit - start, start, &bar3_lock, &vm);
        if (ret)
                return ret;
 
@@ -117,7 +117,7 @@ nv50_bar_oneinit(struct nvkm_bar *base)
        start = 0x0000000000ULL;
        limit = start + device->func->resource_size(device, 1);
 
-       ret = nvkm_vm_new(device, start, limit--, start, &bar1_lock, &vm);
+       ret = nvkm_vm_new(device, start, limit-- - start, start, &bar1_lock, &vm);
        if (ret)
                return ret;