summaryrefslogtreecommitdiff
path: root/lib/main.c
Commit message (Collapse)AuthorAgeFilesLines
* device: import pciid list and integrate quirks with itBen Skeggs2015-08-281-1/+2
| | | | | | PCI IDs taken from the NVIDIA binary driver, with permission. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* device: separate construction of pci/tegra devicesBen Skeggs2015-08-281-27/+13
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* device: simplify subdev constructionBen Skeggs2015-08-281-1/+6
| | | | | | | | | | | | | 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>
* device: tidy ctor/dtor interfacesBen Skeggs2015-08-281-20/+24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* client: tidy ctor/dtor interfacesBen Skeggs2015-08-281-5/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: remove last printksBen Skeggs2015-08-281-1/+0
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: type-safe printk macrosBen Skeggs2015-08-281-11/+6
| | | | | | | | | | | | | | | | These require an explicit pointers to nvkm_object/nvkm_subdev/nvkm_device, depending on which macros are used. This is unlike the previous macros which take a void *, and work for anything derived from nvkm_object (by way of some awful heuristics). The output will be a bit confused until everything has been transitioned, as the logging format used is a more standard style that previously. In addition, usage of pr_cont(), which doesn't work correctly with the dev_*() printk functions (and was potentially racy to begin with), will be replaced. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* lib: various tweaksBen Skeggs2015-08-281-42/+47
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: finalise nvkm namespace switch (no binary change)Ben Skeggs2015-01-191-11/+11
| | | | | | | | | | | | | | | | The namespace of NVKM is being changed to nvkm_ instead of nouveau_, which will be used for the DRM part of the driver. This is being done in order to make it very clear as to what part of the driver a given symbol belongs to, and as a minor step towards splitting the DRM driver out to be able to stand on its own (for virt). Because there's already a large amount of churn here anyway, this is as good a time as any to also switch to NVIDIA's device and chipset naming to ease collaboration with them. A comparison of objdump disassemblies proves no code changes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* device: namespace + nvidia gpu names (no binary change)Ben Skeggs2015-01-191-2/+1
| | | | | | | | | | | | | | | | The namespace of NVKM is being changed to nvkm_ instead of nouveau_, which will be used for the DRM part of the driver. This is being done in order to make it very clear as to what part of the driver a given symbol belongs to, and as a minor step towards splitting the DRM driver out to be able to stand on its own (for virt). Because there's already a large amount of churn here anyway, this is as good a time as any to also switch to NVIDIA's device and chipset naming to ease collaboration with them. A comparison of objdump disassemblies proves no code changes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: namespace + nvidia gpu names (no binary change)Ben Skeggs2015-01-191-1/+0
| | | | | | | | | | | | | | | | The namespace of NVKM is being changed to nvkm_ instead of nouveau_, which will be used for the DRM part of the driver. This is being done in order to make it very clear as to what part of the driver a given symbol belongs to, and as a minor step towards splitting the DRM driver out to be able to stand on its own (for virt). Because there's already a large amount of churn here anyway, this is as good a time as any to also switch to NVIDIA's device and chipset naming to ease collaboration with them. A comparison of objdump disassemblies proves no code changes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvif: import library functions for the ioctl/event interfacesBen Skeggs2014-08-101-103/+73
| | | | | | | | | | | | 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>
* lib: silence some issues reported by valgrindBen Skeggs2014-08-101-3/+7
|
* support for platform devicesAlexandre Courbot2014-03-261-1/+2
| | | | | | | | | | | | | | | | | | | | | 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>
* lib: fix device selectionBen Skeggs2013-11-051-16/+28
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* lib: ioremap shitBen Skeggs2013-11-051-15/+37
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* lib: create thread for interrrupt pollingBen Skeggs2013-06-131-73/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* device: convert to engine, rather than subdevBen Skeggs2013-04-261-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* mc: handle irq-related setup ourselvesBen Skeggs2013-04-241-7/+39
| | | | | | | | We need to be able to process interrupts before the DRM code is able to actually enable them, set it up ourselves. Also, it's less convoluted to *not* use the DRM wrappers it appears... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* initial import of nouveau kernel module core, some simple tools, and drmBen Skeggs2013-01-091-0/+336
Ignore (or, if you're really keen, fix) any of the horrors that are part of the emulate-linux-on-libpciaccess (lib/) layer. When I started down this path I was only aiming to prototype the reworked driver core, and never actually intended on going quite this far with things, but it turns out that being able to develop and test the nouveau core from userspace is *very* useful. This tree is based on the code available as of Linux 3.8-rc2. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>