diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 14:54:15 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 12:37:36 +1000 |
commit | 0d0169db280f0bec85d273d35c6282f231b09c76 (patch) | |
tree | 933dcd326178a7fee7b7122fc7593052399f26ee /lib/main.c | |
parent | 558d9ac4b06b61f087c2411117096372124c2575 (diff) | |
download | nouveau-0d0169db280f0bec85d273d35c6282f231b09c76.tar.gz |
device: simplify subdev construction
Replaces the piece-by-piece (in response to NV_DEVICE ctor args) device
contruction with a once-off all-or-nothing approach, eliminating some
tricky refcounting issues. The partial device init capability was only
required by some tools, and has been moved to probe time instead.
Temporarily removes a workaround for some boards where we need to fiddle
with AGP registers before executing the DEVINIT scripts. A later commit
in this series reinstates it.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'lib/main.c')
-rw-r--r-- | lib/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/main.c b/lib/main.c index 09ff15fab..0102a7768 100644 --- a/lib/main.c +++ b/lib/main.c @@ -44,6 +44,10 @@ static DEFINE_MUTEX(os_mutex); static LIST_HEAD(os_device_list); static int os_client_nr = 0; +bool os_device_detect = true; +bool os_device_mmio = true; +u64 os_device_subdev = ~0ULL; + /****************************************************************************** * horrific stuff to implement linux's ioremap interface on top of pciaccess *****************************************************************************/ @@ -169,7 +173,8 @@ os_init_device(struct pci_device *pdev, u64 handle, const char *cfg, const char ret = nvkm_device_new(&odev->pdev, NVKM_BUS_PCI, handle, odev->pdev.dev.name, cfg, dbg, - &odev->device); + os_device_detect, os_device_mmio, + os_device_subdev, &odev->device); if (ret) { fprintf(stderr, "failed to create device, %d\n", ret); os_fini_device(odev); |