summaryrefslogtreecommitdiff
path: root/lib/main.c
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2014-02-17 15:17:26 +0900
committerBen Skeggs <bskeggs@redhat.com>2014-03-26 13:56:52 +1000
commit3bb3c0639ea36f29f42563516f0fa1a2492a597b (patch)
tree212816f501963d69343c655a4fe58b0e92128ecc /lib/main.c
parentd4feb2976625f0845681a83bf351880dbb878f46 (diff)
downloadnouveau-3bb3c0639ea36f29f42563516f0fa1a2492a597b.tar.gz
support for platform devices
Upcoming mobile Kepler GPUs (such as GK20A) use the platform bus instead of PCI to which Nouveau is tightly dependent. This patch allows Nouveau to handle platform devices by: - abstracting PCI-dependent functions that were typically used for resource querying and page mapping, - introducing a nv_device_is_pci() function that allows to make PCI-dependent code conditional, - providing a nouveau_drm_platform_probe() function that takes a GPU platform device to be probed. Core code as well as engine/subdev drivers are updated wherever possible to make use of these functions. Some older drivers are too dependent on PCI to be properly updated, but all newer code on which future chips may depend should at least be runnable with platform devices. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'lib/main.c')
-rw-r--r--lib/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/main.c b/lib/main.c
index cde8fc847..c82d21408 100644
--- a/lib/main.c
+++ b/lib/main.c
@@ -157,7 +157,8 @@ os_init_device(struct pci_device *pdev, u64 handle, char *cfg, char *dbg)
cfg = cfg ? strdup(cfg) : NULL;
dbg = dbg ? strdup(dbg) : NULL;
- ret = nouveau_device_create(ldev, handle, name, cfg, dbg, &odev);
+ ret = nouveau_device_create(ldev, NOUVEAU_BUS_PCI, handle, name,
+ cfg, dbg, &odev);
if (ret) {
fprintf(stderr, "failed to create device, %d\n", ret);
return ret;