summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/include
Commit message (Collapse)AuthorAgeFilesLines
...
| * drm/nouveau/mmu: remove support for old backendsBen Skeggs2017-11-022-4/+0
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/gp100,gp10b: implement new vmm backendBen Skeggs2017-11-021-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for: - 64KiB/2MiB big page sizes (128KiB not supported by HW with new PT layout). - System-memory PTs. - LPTE "invalid" state. - (Tegra) Use of video memory aperture. - Sparse PDEs/PTEs. - Additional blocklinear kinds. - 49-bit address-space. GP100 supports an entirely new 5-level page table layout that provides an expanded 49-bit address-space. It also supports the layout present on previous generations, which we've been making do with until now. This commit implements support for the new layout, and enables it by default. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/gm200,gm20b: implement new vmm backendBen Skeggs2017-11-021-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | Adds support for: - 64KiB big page size. - System-memory PTs. - LPTE "invalid" state. - (Tegra) Use of video memory aperture. - Sparse PDEs/PTEs. - Additional blocklinear kinds. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/gf100: implement new vmm backendBen Skeggs2017-11-021-0/+13
| | | | | | | | | | | | | | | | Adds support for: - 64KiB big page size. - System-memory PTs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/nv50,g84: implement new vmm backendBen Skeggs2017-11-021-0/+13
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/nv04: implement new vmm backendBen Skeggs2017-11-021-0/+4
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu: implement new vmm backendBen Skeggs2017-11-021-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the common code to support a rework of the VMM backends. It adds support for more than 2 levels of page table nesting, which is required to be able to support GP100's MMU layout. Sparse mappings (that don't cause MMU faults when accessed) are now supported, where the backend provides it. Dual-PT handling had to become more sophisticated to support sparse, but this also allows us to support an optimisation the MMU provides on GK104 and newer. Certain operations can now be combined into a single page tree walk to avoid some overhead, but also enables optimsations like skipping PTE unmap writes when the PT will be destroyed anyway. The old backend has been hacked up to forward requests onto the new backend, if present, so that it's possible to bisect between issues in the backend changes vs the upcoming frontend changes. Until the new frontend has been merged, new backends will leak BAR2 page tables on module unload. This is expected, and it's not worth the effort of hacking around this as it doesn't effect runtime. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu: handle instance block setupBen Skeggs2017-11-022-9/+3
| | | | | | | | | | | | | | | | | | We previously required each VMM user to allocate their own page directory and fill in the instance block themselves. It makes more sense to handle this in a common location. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/gp100,gp10b: implement vmm on top of new baseBen Skeggs2017-11-022-0/+9
| | | | | | | | | | | | | | | | | | | | | | Adds support for: - Selection of old/new-style page table layout (GP100MmuLayout=0/1). - System-memory PDs. New layout disabled by default for the moment, as we don't have a backend that can handle it yet. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/gm200,gm20b: implement vmm on top of new baseBen Skeggs2017-11-022-0/+15
| | | | | | | | | | | | | | | | Adds support for: - Per-VMM selection of big page size. - System-memory PDs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/gf100: implement vmm on top of new baseBen Skeggs2017-11-022-0/+9
| | | | | | | | | | | | | | | | Adds support for: - Selection of a 64KiB big page size (NvFbBigPage=16). - System-memory PDs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/nv50,g84: implement vmm on top of new baseBen Skeggs2017-11-023-1/+9
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/nv44: implement vmm on top of new baseBen Skeggs2017-11-021-0/+3
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/nv04: implement vmm on top of new baseBen Skeggs2017-11-022-1/+10
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu: implement base for new vm managementBen Skeggs2017-11-023-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first chunk of the new VMM code that provides the structures needed to describe a GPU virtual address-space layout, as well as common interfaces to handle VMM creation, and connecting instances to a VMM. The constructor now allocates the PD itself, rather than having the user handle that manually. This won't/can't be used until after all backends have been ported to these interfaces, so a little bit of memory will be wasted on Fermi and newer for a couple of commits in the series. Compatibility has been hacked into the old code to allow each GPU backend to be ported individually. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu: implement page table sub-allocationBen Skeggs2017-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | GP100 "big" (which is a funny name, when it supports "even bigger") page tables are small enough that we want to be able to suballocate them from a larger block of memory. This builds on the previous page table cache interfaces so that the VMM code doesn't need to know the difference. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu: implement page table cacheBen Skeggs2017-11-021-0/+5
| | | | | | | | | | | | | | | | | | Builds up and maintains a small cache of each page table size in order to reduce the frequency of expensive allocations, particularly in the pathological case where an address range ping-pongs between allocated and free. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu: automatically handle "un-bootstrapping" of vmmBen Skeggs2017-11-021-0/+2
| | | | | | | | | | | | | | Removes the need to expose internals outside of MMU, and GP100 is both different, and a lot harder to deal with. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/gp10b: fork from gf100Ben Skeggs2017-11-021-0/+1
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/gp100: fork from gf100Ben Skeggs2017-11-021-0/+1
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/gm20b: fork from gf100Ben Skeggs2017-11-021-0/+1
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/gm200: fork from gf100Ben Skeggs2017-11-021-0/+1
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/gk20a: fork from gf100Ben Skeggs2017-11-021-0/+1
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/gk104: fork from gf100Ben Skeggs2017-11-021-0/+1
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/g84: fork from nv50Ben Skeggs2017-11-021-0/+1
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/fb/ram: remove old allocatorsBen Skeggs2017-11-021-4/+0
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: directly handle comptag allocationBen Skeggs2017-11-021-2/+0
| | | | | | | | | | | | | | | | | | | | Another transition step to allow finer-grained patches transitioning to new MMU backends. Old backends will continue operate as before (accessing nvkm_mem::tag), and new backends will get a reference to the tags allocated here. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: wrap nvkm_mem objects in nvkm_memory interfacesBen Skeggs2017-11-021-0/+3
| | | | | | | | | | | | | | This is a transition step, to enable finer-grained commits while transitioning to new MMU interfaces. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/ltc/gf100-: allocate tagram with nvkm_ram_get()Ben Skeggs2017-11-021-1/+1
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/fb/ram: add interface to allocate vram as an nvkm_memory objectBen Skeggs2017-11-021-0/+4
| | | | | | | | | | | | | | | | | | | | Upcoming MMU changes use nvkm_memory as its basic representation of memory, so we need to be able to allocate VRAM like this. The code is basically identical to the current chipset-specific allocators, minus support for compression tags (which will be handled elsewhere anyway). Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/core/memory: add some useful accessor macrosBen Skeggs2017-11-023-15/+47
| | | | | | | | | | | | | | | | | | Adds support for 64-bit writes, and optimised filling of buffers with fixed 32/64-bit values. These will all be used by the upcoming MMU changes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/core/memory: add reference countingBen Skeggs2017-11-021-1/+3
| | | | | | | | | | | | | | | | | | We need to be able to prevent memory from being freed while it's still mapped in a GPU's address-space. Will be used by upcoming MMU changes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/core/memory: add mechanism to retrieve allocation granularityBen Skeggs2017-11-021-0/+2
| | | | | | | | | | | | | | | | Needed by VMM code to determine whether an allocation is compatible with a given page size (ie. you can't map 4KiB system memory pages into 64KiB GPU pages). Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/core/memory: change map interface to support upcoming mmu changesBen Skeggs2017-11-022-9/+8
| | | | | | | | | | | | | | | | | | | | | | Map flags (access, kind, etc) are currently defined in either the VMA, or the memory object, which turns out to not be ideal for things like suballocated buffers, etc. These will become per-map flags instead, so we need to support passing these arguments in nvkm_memory_map(). Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/core/memory: comptag allocationBen Skeggs2017-11-021-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | nvkm_memory is going to be used by the upcoming mmu rework for the basic representation of a memory allocation, as such, this commit adds support for comptag allocation to nvkm_memory. This is very simple for now, in that it requires comptags for the entire memory allocation even if only certain ranges are compressed. Support for tracking ranges will be added at a later date. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/ltc: init comptag mm in fb subdevBen Skeggs2017-11-021-1/+0
| | | | | | | | | | | | A single location for the MM allows us to share allocation logic. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/fb/gf100: clear comptags at allocation time rather than mmu mapBen Skeggs2017-11-021-1/+1
| | | | | | | | | | | | | | We probably don't want to destroy compression data when doing multiple mappings of a memory object. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/fb: move comptags mm into nvkm_fbBen Skeggs2017-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | We're moving towards having a central place to handle comptag allocation, and as some GPUs don't have a ram submodule (ie. Tegra), we need to move the mm somewhere else. It probably never belonged in ram anyways. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/core/mm: introduce functions to access info about a given allocationBen Skeggs2017-11-021-0/+30
| | | | | | | | | | | | These will be used in upcoming patches. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/core/mm: have users explicitly define heap identifiersBen Skeggs2017-11-022-1/+5
| | | | | | | | | | | | | | | | | | | | Different sections of VRAM may have different properties (ie. can't be used for compression/display, can't be mapped, etc). We currently already support this, but it's a bit magic. This change makes it more obvious where we're allocating from. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: separate constant-va tracking from nvkm vma structureBen Skeggs2017-11-021-2/+0
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: separate buffer object backing memory from nvkm structuresBen Skeggs2017-11-022-7/+4
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/mmu/nv04-nv4x: move global vmm to nvkm_mmuBen Skeggs2017-11-021-0/+2
| | | | | | | | | | | | In a future commit, this will be constructed by common code. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/imem: separate pre-BAR2-bootstrap objects from the restBen Skeggs2017-11-021-0/+1
| | | | | | | | | | | | These will require slow-path access during suspend/resume. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/core/memory: split info pointers from accessor pointersBen Skeggs2017-11-022-4/+11
| | | | | | | | | | | | | | | | | | The accessor functions can change as a result of acquire()/release() calls, and are protected by any refcounting done there. Other functions must remain constant, as they can be called any time. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/bar/gm107-: wait for instance block binding to completeBen Skeggs2017-11-021-0/+2
| | | | | | | | | | | | | | | | | | Discovered by accident while working to use BAR2 access to instmem objects on more paths. We've apparently been relying on luck up until now! Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/bar: modify interface to bar2 vmm mappingBen Skeggs2017-11-021-1/+1
| | | | | | | | | | | | Match API with the BAR1 version. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/bar: modify interface to bar1 vmm mappingBen Skeggs2017-11-022-1/+2
| | | | | | | | | | | | | | | | | | | | Upcoming changes will remove the nvkm_vmm pointer from nvkm_vma, instead requiring it to be explicitly specified on each operation. It's not currently possible to get this information for BAR1 mappings, so let's fix that ahead of time. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/bar: expose interface to bar2 teardownBen Skeggs2017-11-021-0/+1
| | | | | | | | | | | | | | | | | | | | Will prevent spurious MMU fault interrupts if something decides to touch BAR1 after we've unloaded the driver. Exposed external to BAR so that INSTMEM can use it to better control the suspend/resume fast-path access. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/bar: expose interface to bar2 initialisationBen Skeggs2017-11-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | If we want to be able to hit the instmem fast-path in a few trickier cases, we need to be more flexible with when we can initialise BAR2 access. There's probably a decent case to be made for merging BAR/INSTMEM into BUS, but that's something to ponder another day. Flushes have been added after the write to bind the instance block, as later commits will reveal the need for them. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
OpenPOWER on IntegriCloud