OSDN Git Service

drm: manager to keep track of GPUs VA mappings
authorDanilo Krummrich <dakr@redhat.com>
Thu, 20 Jul 2023 00:14:22 +0000 (02:14 +0200)
committerDanilo Krummrich <dakr@redhat.com>
Thu, 20 Jul 2023 03:15:53 +0000 (05:15 +0200)
commite6303f323b1ad9c02ae813fc3dedeaa9dadfd3b0
treedab633d684a54a27858623efb0898231cf235916
parent41639b3a8b0f1f194dfe0577d99db70613f78626
drm: manager to keep track of GPUs VA mappings

Add infrastructure to keep track of GPU virtual address (VA) mappings
with a decicated VA space manager implementation.

New UAPIs, motivated by Vulkan sparse memory bindings graphics drivers
start implementing, allow userspace applications to request multiple and
arbitrary GPU VA mappings of buffer objects. The DRM GPU VA manager is
intended to serve the following purposes in this context.

1) Provide infrastructure to track GPU VA allocations and mappings,
   using an interval tree (RB-tree).

2) Generically connect GPU VA mappings to their backing buffers, in
   particular DRM GEM objects.

3) Provide a common implementation to perform more complex mapping
   operations on the GPU VA space. In particular splitting and merging
   of GPU VA mappings, e.g. for intersecting mapping requests or partial
   unmap requests.

Acked-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Acked-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Matthew Brost <matthew.brost@intel.com>
Tested-by: Donald Robson <donald.robson@imgtec.com>
Suggested-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230720001443.2380-2-dakr@redhat.com
Documentation/gpu/drm-mm.rst
drivers/gpu/drm/Makefile
drivers/gpu/drm/drm_gem.c
drivers/gpu/drm/drm_gpuva_mgr.c [new file with mode: 0644]
include/drm/drm_drv.h
include/drm/drm_gem.h
include/drm/drm_gpuva_mgr.h [new file with mode: 0644]