[igt-dev] [RFC i-g-t 0/5] vm_bind: Add VM_BIND validation support
Niranjana Vishwanathapura
niranjana.vishwanathapura at intel.com
Fri Jul 1 23:05:41 UTC 2022
DRM_I915_GEM_VM_BIND/UNBIND ioctls allows UMD to bind/unbind GEM
buffer objects (BOs) or sections of a BOs at specified GPU virtual
addresses on a specified address space (VM). Multiple mappings can map
to the same physical pages of an object (aliasing). These mappings (also
referred to as persistent mappings) will be persistent across multiple
GPU submissions (execbuf calls) issued by the UMD, without user having
to provide a list of all required mappings during each submission (as
required by older execbuf mode).
The new execbuf3 ioctl (I915_GEM_EXECBUFFER3) will only work in vm_bind
mode. The vm_bind mode only works with this new execbuf3 ioctl.
Add sanity tests to validate the VM_BIND, VM_UNBIND and execbuf3 ioctls.
Add basic test to create and VM_BIND the objects and issue execbuf3 for
GPU to copy the data from a source to destination buffer.
TODOs:
* More validation support.
* Port some relevant gem_exec_* tests for execbuf3.
NOTEs:
* It is based on below VM_BIND design+uapi patch series.
https://lists.freedesktop.org/archives/intel-gfx/2022-July/300760.html
* The i915 VM_BIND support is posted as,
[RFC 00/10] drm/i915/vm_bind: Add VM_BIND functionality
Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura at intel.com>
Adam Miszczak (1):
lib/vm_bind: Add interface to support VM_BIND
Niranjana Vishwanathapura (4):
vm_bind: import uapi definitions
tests/i915/vm_bind: Add vm_bind sanity test
tests/i915/vm_bind: Add basic VM_BIND test support
tests/i915/vm_bind: Add userptr subtest
include/drm-uapi/i915_drm.h | 288 ++++++++++++++-
lib/i915/gem_context.c | 24 ++
lib/i915/gem_context.h | 3 +
lib/i915/gem_vm.c | 31 +-
lib/i915/gem_vm.h | 3 +-
lib/i915/intel_memory_region.c | 14 +-
lib/i915/intel_memory_region.h | 21 +-
lib/intel_chipset.h | 2 +
lib/ioctl_wrappers.c | 117 ++++++-
lib/ioctl_wrappers.h | 7 +
tests/i915/gem_eio.c | 2 +-
tests/i915/gem_lmem_swapping.c | 2 +-
tests/i915/i915_pm_rpm.c | 6 +-
tests/i915/i915_query.c | 2 +-
tests/i915/i915_vm_bind_basic.c | 585 +++++++++++++++++++++++++++++++
tests/i915/i915_vm_bind_sanity.c | 247 +++++++++++++
tests/meson.build | 2 +
tests/prime_mmap.c | 26 +-
18 files changed, 1330 insertions(+), 52 deletions(-)
create mode 100644 tests/i915/i915_vm_bind_basic.c
create mode 100644 tests/i915/i915_vm_bind_sanity.c
--
2.21.0.rc0.32.g243a4c7e27
More information about the igt-dev
mailing list