drm/nouveau: make use of the GPUVM's shared dma-resv
authorDanilo Krummrich <dakr@redhat.com>
Wed, 8 Nov 2023 00:12:36 +0000 (01:12 +0100)
committerDanilo Krummrich <dakr@redhat.com>
Mon, 13 Nov 2023 17:18:12 +0000 (18:18 +0100)
commit6118411428a393fb0868bad9025d71875418058b
tree1d797eb40ae48944007a0e8eb45573ce8415aecd
parentbbe8458037e74b9887ba2f0f0b8084a13ade3a90
drm/nouveau: make use of the GPUVM's shared dma-resv

DRM GEM objects private to a single GPUVM can use a shared dma-resv.
Make use of the shared dma-resv of GPUVM rather than a driver specific
one.

The shared dma-resv originates from a "root" GEM object serving as
container for the dma-resv to make it compatible with drm_exec.

In order to make sure the object proving the shared dma-resv can't be
freed up before the objects making use of it, let every such GEM object
take a reference on it.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-7-dakr@redhat.com
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_bo.h
drivers/gpu/drm/nouveau/nouveau_gem.c
drivers/gpu/drm/nouveau/nouveau_uvmm.c
drivers/gpu/drm/nouveau/nouveau_uvmm.h