diff options
Diffstat (limited to 'bin/nv_rffunc.h')
-rw-r--r-- | bin/nv_rffunc.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/bin/nv_rffunc.h b/bin/nv_rffunc.h index f7db0317f..31dc5c88e 100644 --- a/bin/nv_rffunc.h +++ b/bin/nv_rffunc.h @@ -1,20 +1,18 @@ #include <stdlib.h> -#include <core/os.h> -#include <core/object.h> -#include <core/device.h> +#include <nvif/device.h> static void __iomem *map = NULL; static u64 map_page = ~0ULL; static CAST -nv_rfb(struct nouveau_object *device, u64 offset) +nv_rfb(struct nvif_device *device, u64 offset) { u64 page = (offset & ~(PAGE_SIZE - 1)); u64 addr = (offset & (PAGE_SIZE - 1)); - if (nv_device(device)->card_type < NV_04 || - nv_device(device)->card_type > NV_E0) { + if (device->info.family < NV_DEVICE_INFO_V0_TNT || + device->info.family > NV_DEVICE_INFO_V0_MAXWELL) { printk("unsupported chipset\n"); exit(1); } @@ -23,7 +21,7 @@ nv_rfb(struct nouveau_object *device, u64 offset) if (map) iounmap(map); - map = ioremap(pci_resource_start(nv_device(device)->pdev, 1) + + map = ioremap(pci_resource_start(nvkm_device(device)->pdev, 1) + page, PAGE_SIZE); if (!map) { printk("map failed\n"); |