summaryrefslogtreecommitdiff
path: root/lib/include
AgeCommit message (Collapse)AuthorFilesLines
2015-10-22gem: return only valid domain when there's only onelinux-4.3Ilia Mirkin1-0/+6
On nv50+, we restrict the valid domains to just the one where the buffer was originally created. However after the buffer is evicted to system memory, we might move it back to a different domain that was not originally valid. When sharing the buffer and retrieving its GEM_INFO data, we still want the domain that will be valid for this buffer in a pushbuf, not the one where it currently happens to be. This resolves fdo#92504 and several others. These are due to suspend evicting all buffers, making it more likely that they temporarily end up in the wrong place. Cc: stable@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92504 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-10-12nouveau: Disable AGP for SiS 761Ondrej Zary1-0/+3
SiS 761 chipset does not support AGP cards but has AGP capability (for the onboard video). At least PC Chips A31G board using this chipset has an AGP-like AGPro slot that's wired to the PCI bus. Enabling AGP will fail (GPU lockup and software fbcon, X11 hangs). Add support for matching just the host bridge in nvkm_device_agp_quirks and add entry for SiS 761 with mode 0 (AGP disabled). Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28tegra: merge platform setup from nouveau drmBen Skeggs1-13/+140
The copyright header in nvkm/engine/device/platform.c has been replaced with the NVIDIA one from drm/nouveau_platform.c, as most of the actual code is now theirs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28pci: merge agp handling from nouveau drmBen Skeggs1-0/+54
This commit reinstates the pre-DEVINIT AGP fiddling that was broken in an earlier commit. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28device: import pciid list and integrate quirks with itBen Skeggs1-0/+1
PCI IDs taken from the NVIDIA binary driver, with permission. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28fifo: convert user classes to new-style nvkm_objectBen Skeggs1-1/+45
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28imem: improve management of instance memoryBen Skeggs1-0/+5
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28mmu: protect each vm with its own mutexBen Skeggs1-1/+1
An upcoming commit requires being able to modify the PRAMIN BAR page tables while already holding the MMU subdev mutex. To solve this issue, each VM has been given its own mutex. As a nice side-effect, this also allows separate VMs to be updated concurrently. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28device: separate construction of pci/tegra devicesBen Skeggs1-1/+29
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28subdev: implement support for new-style nvkm_subdevBen Skeggs1-1/+4
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28nvif: replace path-based object identificationBen Skeggs1-0/+22
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28platform: remove subclassing of nvkm_deviceBen Skeggs1-5/+0
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28i2c: transition pad/ports away from being based on nvkm_objectBen Skeggs1-1/+2
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28sec: switch to subdev printk macrosBen Skeggs1-1/+0
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28core: type-safe printk macrosBen Skeggs1-4/+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>
2015-08-28tmr: type-safe PTIMER-based delay/wait macrosBen Skeggs1-0/+5
These require an explicit struct nvkm_device pointer, unlike the previous macros which take a void *, and work for (almost) anything derived from nvkm_object by using some heuristics. These macros are more general than the previous ones, and can be used to handle PTIMER-based busy-waits (will be used in later devinit fixes) as well as more complicated wait conditions. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28lib: various tweaksBen Skeggs2-73/+35
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28gr: use NVIDIA-provided external firmwaresAlexandre Courbot1-0/+1
NVIDIA will officially start providing GR firmwares through linux-firmware for GPUs that require it. Change the GR firmware lookup function to use these files. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-03-17platform: probe IOMMU if presentAlexandre Courbot1-0/+32
Tegra SoCs have an IOMMU that can be used to present non-contiguous physical memory as contiguous to the GPU and maximize the use of large pages in the GPU MMU, leading to performance gains. This patch adds support for probing such a IOMMU if present and make its properties available in the nouveau_platform_gpu structure so subsystems can take advantage of it. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-03-17instmem/gk20a: use DMA attributesAlexandre Courbot1-0/+31
instmem for GK20A is allocated using dma_alloc_coherent(), which provides us with a coherent CPU mapping that we never use because instmem objects are accessed through PRAMIN. Switch to dma_alloc_attrs() which gives us the option to dismiss that CPU mapping and free up some CPU virtual space. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-01-19drm: remove symlinks from build, use Kbuild files for lib buildBen Skeggs2-0/+1554
The DRM build used a separate, symlinked, source tree out of a desire to avoid Kbuild/autotools' object files conflicting. Not only is this very annoying to maintain, but it's made worse by having two entirely separate source file lists to maintain too. Fixes both these issues by ditching automake (it doesn't approve of the kernel's Kbuild syntax) in favour of custom makefiles that can build libnvif.so from the Kbuild files. Like the previous commit, this will never show up in the kernel tree (it has its own version). Signed-off-by: Ben Skeggs <bskeggs@redhat.com>