Commit graph

7 commits

Author SHA1 Message Date
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
f9463a4bc8 drm/nouveau/mmu: implement new vmm frontend
These are the new priviledged interfaces to the VMM backends, and expose
some functionality that wasn't previously available.

It's now possible to allocate a chunk of address-space (even all of it),
without causing page tables to be allocated up-front, and then map into
it at arbitrary locations.  This is the basic primitive used to support
features such as sparse mapping, or to allow userspace control over its
own address-space, or HMM (where the GPU driver isn't in control of the
address-space layout).

Rather than being tied to a subtle combination of memory object and VMA
properties, arguments that control map flags (ro, kind, etc) are passed
explicitly at map time.

The compatibility hacks to implement the old frontend on top of the new
driver backends have been replaced with something similar to implement
the old frontend's interfaces on top of the new frontend.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2017-11-02 13:32:30 +10:00
Ben Skeggs
26880e7686 drm/nouveau/mmu: remove support for old backends
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2017-11-02 13:32:30 +10:00
Ben Skeggs
7b8656636a drm/nouveau: directly handle comptag allocation
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>
2017-11-02 13:32:23 +10:00
Ben Skeggs
bd275f1d1a drm/nouveau: wrap nvkm_mem objects in nvkm_memory interfaces
This is a transition step, to enable finer-grained commits while
transitioning to new MMU interfaces.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2017-11-02 13:32:23 +10:00
Ben Skeggs
9ce523cc3b drm/nouveau: separate buffer object backing memory from nvkm structures
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2017-11-02 13:32:21 +10:00