diff options
Diffstat (limited to 'drm/nouveau/nvkm/subdev')
-rw-r--r-- | drm/nouveau/nvkm/subdev/bar/gf100.c | 2 | ||||
-rw-r--r-- | drm/nouveau/nvkm/subdev/bar/nv50.c | 4 | ||||
-rw-r--r-- | drm/nouveau/nvkm/subdev/devinit/fbmem.h | 4 | ||||
-rw-r--r-- | drm/nouveau/nvkm/subdev/instmem/nv40.c | 6 | ||||
-rw-r--r-- | drm/nouveau/nvkm/subdev/instmem/nv50.c | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/drm/nouveau/nvkm/subdev/bar/gf100.c b/drm/nouveau/nvkm/subdev/bar/gf100.c index 2eb0a370a..c794b2c2d 100644 --- a/drm/nouveau/nvkm/subdev/bar/gf100.c +++ b/drm/nouveau/nvkm/subdev/bar/gf100.c @@ -58,7 +58,7 @@ gf100_bar_ctor_vm(struct gf100_bar *bar, struct gf100_bar_vm *bar_vm, if (ret) return ret; - bar_len = nv_device_resource_len(device, bar_nr); + bar_len = device->func->resource_size(device, bar_nr); ret = nvkm_vm_new(device, 0, bar_len, 0, key, &vm); if (ret) diff --git a/drm/nouveau/nvkm/subdev/bar/nv50.c b/drm/nouveau/nvkm/subdev/bar/nv50.c index fac54f972..370dcd8ff 100644 --- a/drm/nouveau/nvkm/subdev/bar/nv50.c +++ b/drm/nouveau/nvkm/subdev/bar/nv50.c @@ -82,7 +82,7 @@ nv50_bar_oneinit(struct nvkm_bar *base) /* BAR3 */ start = 0x0100000000ULL; - limit = start + nv_device_resource_len(device, 3); + limit = start + device->func->resource_size(device, 3); ret = nvkm_vm_new(device, start, limit, start, &bar3_lock, &vm); if (ret) @@ -115,7 +115,7 @@ nv50_bar_oneinit(struct nvkm_bar *base) /* BAR1 */ start = 0x0000000000ULL; - limit = start + nv_device_resource_len(device, 1); + limit = start + device->func->resource_size(device, 1); ret = nvkm_vm_new(device, start, limit--, start, &bar1_lock, &vm); if (ret) diff --git a/drm/nouveau/nvkm/subdev/devinit/fbmem.h b/drm/nouveau/nvkm/subdev/devinit/fbmem.h index 4e484c40b..6c5bbff12 100644 --- a/drm/nouveau/nvkm/subdev/devinit/fbmem.h +++ b/drm/nouveau/nvkm/subdev/devinit/fbmem.h @@ -47,8 +47,8 @@ static inline struct io_mapping * fbmem_init(struct nvkm_device *dev) { - return io_mapping_create_wc(nv_device_resource_start(dev, 1), - nv_device_resource_len(dev, 1)); + return io_mapping_create_wc(dev->func->resource_addr(dev, 1), + dev->func->resource_size(dev, 1)); } static inline void diff --git a/drm/nouveau/nvkm/subdev/instmem/nv40.c b/drm/nouveau/nvkm/subdev/instmem/nv40.c index a170ff9b3..c0543875e 100644 --- a/drm/nouveau/nvkm/subdev/instmem/nv40.c +++ b/drm/nouveau/nvkm/subdev/instmem/nv40.c @@ -243,13 +243,13 @@ nv40_instmem_new(struct nvkm_device *device, int index, *pimem = &imem->base; /* map bar */ - if (nv_device_resource_len(device, 2)) + if (device->func->resource_size(device, 2)) bar = 2; else bar = 3; - imem->iomem = ioremap(nv_device_resource_start(device, bar), - nv_device_resource_len(device, bar)); + imem->iomem = ioremap(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; diff --git a/drm/nouveau/nvkm/subdev/instmem/nv50.c b/drm/nouveau/nvkm/subdev/instmem/nv50.c index ec5020e3f..6d512c062 100644 --- a/drm/nouveau/nvkm/subdev/instmem/nv50.c +++ b/drm/nouveau/nvkm/subdev/instmem/nv50.c @@ -81,7 +81,7 @@ nv50_instobj_boot(struct nvkm_memory *memory, struct nvkm_vm *vm) ret = nvkm_vm_get(vm, size, 12, NV_MEM_ACCESS_RW, &iobj->bar); if (ret == 0) { - map = ioremap(nv_device_resource_start(device, 3) + + map = ioremap(device->func->resource_addr(device, 3) + (u32)iobj->bar.offset, size); if (map) { nvkm_memory_map(memory, &iobj->bar, 0); |