diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-08-10 04:10:21 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-08-10 04:43:28 +1000 |
commit | b7c81f0355379b9d0fcdf624a8df1b7119f28efc (patch) | |
tree | 21c37810cbdc088158e06ee75ee303a4af99d0f2 /bin/nv_wifunc.h | |
parent | c0368d5441d90c6a2ac0583d7d2144c6d6baab8c (diff) | |
download | nouveau-b7c81f0355379b9d0fcdf624a8df1b7119f28efc.tar.gz |
nvif: import library functions for the ioctl/event interfaces
This is a wrapper around the interfaces defined in an earlier commit,
and is also used by various userspace (either by a libdrm backend, or
libpciaccess) tools/tests.
In the future this will be extended to handle channels, replacing some
long-unloved code we currently use, and allow fifo/display/mpeg (hi
Ilia ;)) engines to all be exposed in the same way.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'bin/nv_wifunc.h')
-rw-r--r-- | bin/nv_wifunc.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/bin/nv_wifunc.h b/bin/nv_wifunc.h index fa47d69ce..2ae519228 100644 --- a/bin/nv_wifunc.h +++ b/bin/nv_wifunc.h @@ -1,21 +1,19 @@ #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 void -nv_wfb(struct nouveau_object *device, u64 offset, CAST data) +nv_wfb(struct nvif_device *device, u64 offset, CAST data) { - struct pci_dev *pdev = nv_device(device)->pdev; + struct pci_dev *pdev = nvkm_device(device)->pdev; u64 page = (offset & ~(PAGE_SIZE - 1)); u64 addr = (offset & (PAGE_SIZE - 1)); - if (nv_device(device)->card_type < NV_40 || - nv_device(device)->card_type > NV_E0) { + if (device->info.family < NV_DEVICE_INFO_V0_CURIE || + device->info.family > NV_DEVICE_INFO_V0_MAXWELL) { printk("unsupported chipset\n"); exit(1); } |