public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v6 00/13] vm_bind: Add VM_BIND validation support
@ 2022-11-07  8:52 Niranjana Vishwanathapura
  2022-11-07  8:52 ` [igt-dev] [PATCH i-g-t v6 01/13] lib/i915: memory region gtt_alignment support Niranjana Vishwanathapura
                   ` (15 more replies)
  0 siblings, 16 replies; 20+ messages in thread
From: Niranjana Vishwanathapura @ 2022-11-07  8:52 UTC (permalink / raw)
  To: igt-dev
  Cc: tvrtko.ursulin, thomas.hellstrom, matthew.auld, daniel.vetter,
	petri.latvala

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 rfc.
  Documentation/gpu/rfc/i915_vm_bind.rst

* The i915 VM_BIND support is posted as,
  [PATCH v5 00/19] drm/i915/vm_bind: Add VM_BIND functionality

v2: Address various review comments
v3: Add gem_exec3_basic and gem_exec3_balancer tests,
    add gem_lmem_swapping@vm_bind subtest and some fixes.
v4: Add and use i915_vm_bind library functions,
    add lmem test if lmem region is present instead of skipping,
    remove helpers to create vm_private objects, instead use
    gem_create_ext() function.
v5: Use memory region's gtt_alignment, use non-recoverable faults,
    fix review comments.
v6: Rebased, add sanity tests for added reserved uapi fields,
    add gem_shrink@vm_bind* subtests.

Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>

Niranjana Vishwanathapura (13):
  lib/i915: memory region gtt_alignment support
  lib/vm_bind: import uapi definitions
  lib/vm_bind: Add vm_bind/unbind and execbuf3 ioctls
  lib/vm_bind: Add vm_bind mode support for VM
  lib/vm_bind: Add vm_bind specific library functions
  lib/vm_bind: Add __prime_handle_to_fd()
  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
  tests/i915/vm_bind: Add gem_exec3_basic test
  tests/i915/vm_bind: Add gem_exec3_balancer test
  tests/i915/vm_bind: Add gem_lmem_swapping@vm_bind sub test
  tests/i915/vm_bind: Add gem_shrink@vm_bind* subtests

 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/i915_drm_local.h             | 287 ++++++++++++
 lib/i915/i915_vm_bind.c               |  61 +++
 lib/i915/i915_vm_bind.h               |  16 +
 lib/i915/intel_memory_region.c        |   6 +
 lib/i915/intel_memory_region.h        |   1 +
 lib/intel_chipset.h                   |   2 +
 lib/ioctl_wrappers.c                  | 117 ++++-
 lib/ioctl_wrappers.h                  |   7 +
 lib/meson.build                       |   1 +
 tests/i915/gem_exec3_balancer.c       | 466 ++++++++++++++++++++
 tests/i915/gem_exec3_basic.c          | 139 ++++++
 tests/i915/gem_lmem_swapping.c        | 134 +++++-
 tests/i915/gem_pwrite.c               |  16 +-
 tests/i915/gem_shrink.c               |  60 +++
 tests/i915/i915_vm_bind_basic.c       | 603 ++++++++++++++++++++++++++
 tests/i915/i915_vm_bind_sanity.c      | 351 +++++++++++++++
 tests/intel-ci/fast-feedback.testlist |   3 +
 tests/meson.build                     |  10 +
 tests/prime_mmap.c                    |  26 +-
 23 files changed, 2317 insertions(+), 50 deletions(-)
 create mode 100644 lib/i915/i915_vm_bind.c
 create mode 100644 lib/i915/i915_vm_bind.h
 create mode 100644 tests/i915/gem_exec3_balancer.c
 create mode 100644 tests/i915/gem_exec3_basic.c
 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

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-11-09 16:02 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-07  8:52 [igt-dev] [PATCH i-g-t v6 00/13] vm_bind: Add VM_BIND validation support Niranjana Vishwanathapura
2022-11-07  8:52 ` [igt-dev] [PATCH i-g-t v6 01/13] lib/i915: memory region gtt_alignment support Niranjana Vishwanathapura
2022-11-09 12:40   ` Matthew Auld
2022-11-07  8:52 ` [igt-dev] [PATCH i-g-t v6 02/13] lib/vm_bind: import uapi definitions Niranjana Vishwanathapura
2022-11-07  8:52 ` [igt-dev] [PATCH i-g-t v6 03/13] lib/vm_bind: Add vm_bind/unbind and execbuf3 ioctls Niranjana Vishwanathapura
2022-11-07  8:52 ` [igt-dev] [PATCH i-g-t v6 04/13] lib/vm_bind: Add vm_bind mode support for VM Niranjana Vishwanathapura
2022-11-07  8:52 ` [igt-dev] [PATCH i-g-t v6 05/13] lib/vm_bind: Add vm_bind specific library functions Niranjana Vishwanathapura
2022-11-07  8:52 ` [igt-dev] [PATCH i-g-t v6 06/13] lib/vm_bind: Add __prime_handle_to_fd() Niranjana Vishwanathapura
2022-11-07  8:52 ` [igt-dev] [PATCH i-g-t v6 07/13] tests/i915/vm_bind: Add vm_bind sanity test Niranjana Vishwanathapura
2022-11-07  8:52 ` [igt-dev] [PATCH i-g-t v6 08/13] tests/i915/vm_bind: Add basic VM_BIND test support Niranjana Vishwanathapura
2022-11-07  8:52 ` [igt-dev] [PATCH i-g-t v6 09/13] tests/i915/vm_bind: Add userptr subtest Niranjana Vishwanathapura
2022-11-07  8:52 ` [igt-dev] [PATCH i-g-t v6 10/13] tests/i915/vm_bind: Add gem_exec3_basic test Niranjana Vishwanathapura
2022-11-07  8:52 ` [igt-dev] [PATCH i-g-t v6 11/13] tests/i915/vm_bind: Add gem_exec3_balancer test Niranjana Vishwanathapura
2022-11-07  8:52 ` [igt-dev] [PATCH i-g-t v6 12/13] tests/i915/vm_bind: Add gem_lmem_swapping@vm_bind sub test Niranjana Vishwanathapura
2022-11-07  8:52 ` [igt-dev] [PATCH i-g-t v6 13/13] tests/i915/vm_bind: Add gem_shrink@vm_bind* subtests Niranjana Vishwanathapura
2022-11-09 12:38   ` Matthew Auld
2022-11-09 16:02     ` Niranjana Vishwanathapura
2022-11-07 11:02 ` [igt-dev] ✗ GitLab.Pipeline: warning for vm_bind: Add VM_BIND validation support (rev10) Patchwork
2022-11-07 11:18 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2022-11-07 13:33 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox