Commit Graph

9 Commits

Author SHA1 Message Date
Ben Skeggs eeaf06ac1a drm/nouveau/svm: initial support for shared virtual memory
This uses HMM to mirror a process' CPU page tables into a channel's page
tables, and keep them synchronised so that both the CPU and GPU are able
to access the same memory at the same virtual address.

While this code also supports Volta/Turing, it's only enabled for Pascal
GPUs currently due to channel recovery being unreliable right now on the
later GPUs.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2019-02-20 09:00:02 +10:00
Ben Skeggs 2606f29162 drm/nouveau/mmu: support initialisation of client-managed address-spaces
NVKM is currently responsible for managing the allocation of a client's
GPU address-space, but there's various use-cases (ie. HMM address-space
mirroring) where giving a client more direct control is desirable.

This commit allows for a VMM to be created where the area allocated for
NVKM is limited to a client-specified window, the remainder of address-
space is controlled directly by the client.

Leaving a window is necessary to support various internal requirements,
but also to support existing allocation interfaces as not all of the HW
is capable of working with a HMM allocation.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2019-02-20 09:00:00 +10:00
Ben Skeggs 0db912af8f drm/nouveau/gem: attach fences to VMAs to track GPU usage
An upcoming patch will use these to fix issues related to the deferred
unmapping of GEM objects.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs 4ef9289299 drm/nouveau: fix obvious memory leak
fdo#104340.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2017-12-20 08:40:36 +10:00
Ben Skeggs 632b740c54 drm/nouveau/mmu: remove old vmm frontend
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2017-11-02 13:32:33 +10:00
Ben Skeggs d7722134b8 drm/nouveau: switch over to new memory and vmm interfaces
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2017-11-02 13:32:33 +10:00
Ben Skeggs 96da0bcd51 drm/nouveau: allocate vmm object for every client
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2017-11-02 13:32:32 +10:00
Ben Skeggs 3a314f747b drm/nouveau: remove explicit unmaps
If the VMA is being deleted, we don't need to explicity unmap first
anymore.  The MMU code will automatically merge the operations into
a single page tree walk.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2017-11-02 13:32:31 +10:00
Ben Skeggs 24e8375b1b drm/nouveau: separate constant-va tracking from nvkm vma structure
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2017-11-02 13:32:21 +10:00