diff options
| author | Danilo Krummrich <[email protected]> | 2023-11-08 00:12:40 +0000 |
|---|---|---|
| committer | Danilo Krummrich <[email protected]> | 2023-11-13 17:19:20 +0000 |
| commit | 94bc2249f08e141fb4aa120bfdc392c7a5e78211 (patch) | |
| tree | 62c031e5a36882e79c43c5fb00afb25c4a817891 /drivers/gpu/drm/amd/amdgpu/atom.c | |
| parent | drm/gpuvm: reference count drm_gpuvm structures (diff) | |
| download | kernel-94bc2249f08e141fb4aa120bfdc392c7a5e78211.tar.gz kernel-94bc2249f08e141fb4aa120bfdc392c7a5e78211.zip | |
drm/gpuvm: add an abstraction for a VM / BO combination
Add an abstraction layer between the drm_gpuva mappings of a particular
drm_gem_object and this GEM object itself. The abstraction represents a
combination of a drm_gem_object and drm_gpuvm. The drm_gem_object holds
a list of drm_gpuvm_bo structures (the structure representing this
abstraction), while each drm_gpuvm_bo contains list of mappings of this
GEM object.
This has multiple advantages:
1) We can use the drm_gpuvm_bo structure to attach it to various lists
of the drm_gpuvm. This is useful for tracking external and evicted
objects per VM, which is introduced in subsequent patches.
2) Finding mappings of a certain drm_gem_object mapped in a certain
drm_gpuvm becomes much cheaper.
3) Drivers can derive and extend the structure to easily represent
driver specific states of a BO for a certain GPUVM.
The idea of this abstraction was taken from amdgpu, hence the credit for
this idea goes to the developers of amdgpu.
Cc: Christian König <[email protected]>
Acked-by: Christian König <[email protected]>
Reviewed-by: Thomas Hellström <[email protected]>
Reviewed-by: Boris Brezillon <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/atom.c')
0 files changed, 0 insertions, 0 deletions
