[Intel-gfx] [RFC 0/8] drm/i915/svm: [WIP] SVM runtime allocator support

Niranjana Vishwanathapura niranjana.vishwanathapura at intel.com
Fri Jan 24 08:53:54 UTC 2020


This patch series is WIP and not submission ready.
It needs more clarity on locking strategy, synchronization between
VM_BIND and execbuff paths, endless batch buffer support among other things.
This patch series is in continuation of runtime allocator support in
earlier posted series
https://lists.freedesktop.org/archives/intel-gfx/2019-December/223480.html
It is an initial dig to address (partially) some feedback received in patch
[02/12] in above RFC series.
Posting it for early feedback.

Shared Virtual Memory (SVM) allows the programmer to use a single virtual
address space which will be shared between threads executing on CPUs and GPUs.
It abstracts away from the user the location of the backing memory, and hence
simplifies the user programming model.

This series supports SVM Runtime allocator that requires the driver to provide
memory allocation and management interface through GEM buffer object (BO) interface.

No change is done to execbuff command submission interface.
The newly added ability to partial bind BOs is only supported via VM_BIND ioctl.

The patch series includes
- Support to partially bind gem buffer objects in ppgtt including aliasing
- Support to mark VMs as active and wait for them to become idle
- VM_BIND ioctl to bind an array of BO fragments to specified GPU VAs
- Handle persistent vmas created through VM_BIND in the execbuff path
- Support for user to enable/disable SVM support on a per VM basis
- Initial dig at handling endless batch buffer

Niranjana Vishwanathapura (8):
  drm/i915/svm: Support partial binding in ppgtt
  drm/i915/svm: Add support to mark VMs as active
  drm/i915/svm: Introduce VM_BIND ioctl
  drm/i915/svm: Manage SVM bindings added using VM_BIND
  drm/i915/svm: Handle persistent vmas
  drm/i915/svm: Skip vma_lookup for persistent vmas
  drm/i915/svm: Add support to en/disable SVM
  drm/i915/svm: VM_BIND for endless batch buffer

 drivers/gpu/drm/i915/Kconfig                  |  11 ++
 drivers/gpu/drm/i915/Makefile                 |   3 +
 drivers/gpu/drm/i915/gem/i915_gem_context.c   | 100 ++++++++++++++++++
 drivers/gpu/drm/i915/gem/i915_gem_context.h   |   4 +
 .../gpu/drm/i915/gem/i915_gem_execbuffer.c    |  36 +++++++
 drivers/gpu/drm/i915/gem/i915_gem_svm.c       |  94 ++++++++++++++++
 drivers/gpu/drm/i915/gem/i915_gem_svm.h       |  22 ++++
 drivers/gpu/drm/i915/gt/gen8_ppgtt.c          |  37 ++++---
 drivers/gpu/drm/i915/gt/intel_gtt.c           |  43 ++++++++
 drivers/gpu/drm/i915/gt/intel_gtt.h           |  41 ++++++-
 drivers/gpu/drm/i915/i915_drv.c               |  50 ++++++++-
 drivers/gpu/drm/i915/i915_drv.h               |  32 ++++++
 drivers/gpu/drm/i915/i915_gem_gtt.h           |  14 +++
 drivers/gpu/drm/i915/i915_getparam.c          |   3 +
 drivers/gpu/drm/i915/i915_vma.c               |  27 +++--
 drivers/gpu/drm/i915/i915_vma.h               |  17 ++-
 drivers/gpu/drm/i915/i915_vma_types.h         |   7 ++
 include/uapi/drm/i915_drm.h                   |  70 ++++++++++++
 18 files changed, 583 insertions(+), 28 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/gem/i915_gem_svm.c
 create mode 100644 drivers/gpu/drm/i915/gem/i915_gem_svm.h

-- 
2.21.0.rc0.32.g243a4c7e27



More information about the Intel-gfx mailing list