From: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: matthew.brost@intel.com, paulo.r.zanoni@intel.com, tvrtko.ursulin@intel.com, lionel.g.landwerlin@intel.com, thomas.hellstrom@intel.com, matthew.auld@intel.com, jason@jlekstrand.net, daniel.vetter@intel.com, christian.koenig@amd.com Subject: [RFC 00/10] drm/i915/vm_bind: Add VM_BIND functionality Date: Fri, 1 Jul 2022 15:50:45 -0700 [thread overview] Message-ID: <20220701225055.8204-1-niranjana.vishwanathapura@intel.com> (raw) 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). This patch series support VM_BIND version 1, as described by the param I915_PARAM_VM_BIND_VERSION. Add new execbuf3 ioctl (I915_GEM_EXECBUFFER3) which only works in vm_bind mode. The vm_bind mode only works with this new execbuf3 ioctl. The new execbuf3 ioctl will not have any execlist support and all the legacy support like relocations etc., are removed. TODOs: * Support out fence for VM_UNBIND ioctl. * Async VM_UNBIND support. * Share code between execbuf2 and execbuf3 where possible. * Cleanups and optimizations. NOTEs: * It is based on below VM_BIND design+uapi patch series. https://lists.freedesktop.org/archives/intel-gfx/2022-July/300760.html * The IGT RFC series is posted as, [RFC 0/5] vm_bind: Add VM_BIND validation support Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Niranjana Vishwanathapura (10): drm/i915/vm_bind: Introduce VM_BIND ioctl drm/i915/vm_bind: Bind and unbind mappings drm/i915/vm_bind: Support private and shared BOs drm/i915/vm_bind: Add out fence support drm/i915/vm_bind: Handle persistent vmas drm/i915/vm_bind: Add I915_GEM_EXECBUFFER3 ioctl drm/i915/vm_bind: Handle persistent vmas in execbuf3 drm/i915/vm_bind: userptr dma-resv changes drm/i915/vm_bind: Skip vma_lookup for persistent vmas drm/i915/vm_bind: Fix vm->vm_bind_mutex and vm->mutex nesting drivers/gpu/drm/i915/Makefile | 2 + drivers/gpu/drm/i915/gem/i915_gem_context.c | 20 +- drivers/gpu/drm/i915/gem/i915_gem_context.h | 15 + drivers/gpu/drm/i915/gem/i915_gem_create.c | 51 +- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 6 + .../gpu/drm/i915/gem/i915_gem_execbuffer.c | 5 + .../gpu/drm/i915/gem/i915_gem_execbuffer3.c | 1270 +++++++++++++++++ drivers/gpu/drm/i915/gem/i915_gem_ioctls.h | 2 + drivers/gpu/drm/i915/gem/i915_gem_object.c | 1 + drivers/gpu/drm/i915/gem/i915_gem_object.h | 2 + .../gpu/drm/i915/gem/i915_gem_object_types.h | 3 + drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 3 + drivers/gpu/drm/i915/gem/i915_gem_vm_bind.h | 54 + .../drm/i915/gem/i915_gem_vm_bind_object.c | 342 +++++ drivers/gpu/drm/i915/gt/intel_gtt.c | 37 +- drivers/gpu/drm/i915/gt/intel_gtt.h | 20 + drivers/gpu/drm/i915/i915_driver.c | 38 + drivers/gpu/drm/i915/i915_gem_gtt.h | 22 + drivers/gpu/drm/i915/i915_getparam.c | 3 + drivers/gpu/drm/i915/i915_vma.c | 59 +- drivers/gpu/drm/i915/i915_vma.h | 80 +- drivers/gpu/drm/i915/i915_vma_types.h | 40 + include/uapi/drm/i915_drm.h | 289 +++- 23 files changed, 2316 insertions(+), 48 deletions(-) create mode 100644 drivers/gpu/drm/i915/gem/i915_gem_execbuffer3.c create mode 100644 drivers/gpu/drm/i915/gem/i915_gem_vm_bind.h create mode 100644 drivers/gpu/drm/i915/gem/i915_gem_vm_bind_object.c -- 2.21.0.rc0.32.g243a4c7e27
WARNING: multiple messages have this Message-ID (diff)
From: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: paulo.r.zanoni@intel.com, thomas.hellstrom@intel.com, matthew.auld@intel.com, daniel.vetter@intel.com, christian.koenig@amd.com Subject: [Intel-gfx] [RFC 00/10] drm/i915/vm_bind: Add VM_BIND functionality Date: Fri, 1 Jul 2022 15:50:45 -0700 [thread overview] Message-ID: <20220701225055.8204-1-niranjana.vishwanathapura@intel.com> (raw) 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). This patch series support VM_BIND version 1, as described by the param I915_PARAM_VM_BIND_VERSION. Add new execbuf3 ioctl (I915_GEM_EXECBUFFER3) which only works in vm_bind mode. The vm_bind mode only works with this new execbuf3 ioctl. The new execbuf3 ioctl will not have any execlist support and all the legacy support like relocations etc., are removed. TODOs: * Support out fence for VM_UNBIND ioctl. * Async VM_UNBIND support. * Share code between execbuf2 and execbuf3 where possible. * Cleanups and optimizations. NOTEs: * It is based on below VM_BIND design+uapi patch series. https://lists.freedesktop.org/archives/intel-gfx/2022-July/300760.html * The IGT RFC series is posted as, [RFC 0/5] vm_bind: Add VM_BIND validation support Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Niranjana Vishwanathapura (10): drm/i915/vm_bind: Introduce VM_BIND ioctl drm/i915/vm_bind: Bind and unbind mappings drm/i915/vm_bind: Support private and shared BOs drm/i915/vm_bind: Add out fence support drm/i915/vm_bind: Handle persistent vmas drm/i915/vm_bind: Add I915_GEM_EXECBUFFER3 ioctl drm/i915/vm_bind: Handle persistent vmas in execbuf3 drm/i915/vm_bind: userptr dma-resv changes drm/i915/vm_bind: Skip vma_lookup for persistent vmas drm/i915/vm_bind: Fix vm->vm_bind_mutex and vm->mutex nesting drivers/gpu/drm/i915/Makefile | 2 + drivers/gpu/drm/i915/gem/i915_gem_context.c | 20 +- drivers/gpu/drm/i915/gem/i915_gem_context.h | 15 + drivers/gpu/drm/i915/gem/i915_gem_create.c | 51 +- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 6 + .../gpu/drm/i915/gem/i915_gem_execbuffer.c | 5 + .../gpu/drm/i915/gem/i915_gem_execbuffer3.c | 1270 +++++++++++++++++ drivers/gpu/drm/i915/gem/i915_gem_ioctls.h | 2 + drivers/gpu/drm/i915/gem/i915_gem_object.c | 1 + drivers/gpu/drm/i915/gem/i915_gem_object.h | 2 + .../gpu/drm/i915/gem/i915_gem_object_types.h | 3 + drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 3 + drivers/gpu/drm/i915/gem/i915_gem_vm_bind.h | 54 + .../drm/i915/gem/i915_gem_vm_bind_object.c | 342 +++++ drivers/gpu/drm/i915/gt/intel_gtt.c | 37 +- drivers/gpu/drm/i915/gt/intel_gtt.h | 20 + drivers/gpu/drm/i915/i915_driver.c | 38 + drivers/gpu/drm/i915/i915_gem_gtt.h | 22 + drivers/gpu/drm/i915/i915_getparam.c | 3 + drivers/gpu/drm/i915/i915_vma.c | 59 +- drivers/gpu/drm/i915/i915_vma.h | 80 +- drivers/gpu/drm/i915/i915_vma_types.h | 40 + include/uapi/drm/i915_drm.h | 289 +++- 23 files changed, 2316 insertions(+), 48 deletions(-) create mode 100644 drivers/gpu/drm/i915/gem/i915_gem_execbuffer3.c create mode 100644 drivers/gpu/drm/i915/gem/i915_gem_vm_bind.h create mode 100644 drivers/gpu/drm/i915/gem/i915_gem_vm_bind_object.c -- 2.21.0.rc0.32.g243a4c7e27
next reply other threads:[~2022-07-01 22:51 UTC|newest] Thread overview: 121+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-01 22:50 Niranjana Vishwanathapura [this message] 2022-07-01 22:50 ` [Intel-gfx] [RFC 00/10] drm/i915/vm_bind: Add VM_BIND functionality Niranjana Vishwanathapura 2022-07-01 22:50 ` [RFC 01/10] drm/i915/vm_bind: Introduce VM_BIND ioctl Niranjana Vishwanathapura 2022-07-01 22:50 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-05 9:59 ` Hellstrom, Thomas 2022-07-05 9:59 ` Hellstrom, Thomas 2022-07-07 1:18 ` [Intel-gfx] " Andi Shyti 2022-07-07 1:18 ` Andi Shyti 2022-07-07 5:06 ` Niranjana Vishwanathapura 2022-07-07 5:01 ` Niranjana Vishwanathapura 2022-07-07 5:01 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-07 7:32 ` Hellstrom, Thomas 2022-07-07 7:32 ` [Intel-gfx] " Hellstrom, Thomas 2022-07-08 12:58 ` Niranjana Vishwanathapura 2022-07-08 12:58 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-01 22:50 ` [RFC 02/10] drm/i915/vm_bind: Bind and unbind mappings Niranjana Vishwanathapura 2022-07-01 22:50 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-06 16:21 ` Thomas Hellström 2022-07-06 16:21 ` [Intel-gfx] " Thomas Hellström 2022-07-07 1:41 ` Andi Shyti 2022-07-07 1:41 ` Andi Shyti 2022-07-07 5:48 ` Niranjana Vishwanathapura 2022-07-07 5:43 ` Niranjana Vishwanathapura 2022-07-07 5:43 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-07 8:14 ` Thomas Hellström 2022-07-07 8:14 ` [Intel-gfx] " Thomas Hellström 2022-07-08 12:57 ` Niranjana Vishwanathapura 2022-07-08 12:57 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-18 10:55 ` Tvrtko Ursulin 2022-07-26 5:07 ` Niranjana Vishwanathapura 2022-07-26 8:40 ` Tvrtko Ursulin 2022-07-01 22:50 ` [RFC 03/10] drm/i915/vm_bind: Support private and shared BOs Niranjana Vishwanathapura 2022-07-01 22:50 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-07 10:31 ` Hellstrom, Thomas 2022-07-07 10:31 ` [Intel-gfx] " Hellstrom, Thomas 2022-07-08 13:14 ` Niranjana Vishwanathapura 2022-07-08 13:14 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-08 13:43 ` Hellstrom, Thomas 2022-07-08 13:43 ` [Intel-gfx] " Hellstrom, Thomas 2022-07-08 14:44 ` Hellstrom, Thomas 2022-07-08 14:44 ` [Intel-gfx] " Hellstrom, Thomas 2022-07-09 20:13 ` Niranjana Vishwanathapura 2022-07-09 20:13 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-07 13:27 ` Christian König 2022-07-07 13:27 ` [Intel-gfx] " Christian König 2022-07-08 13:23 ` Niranjana Vishwanathapura 2022-07-08 13:23 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-08 17:32 ` Christian König 2022-07-08 17:32 ` [Intel-gfx] " Christian König 2022-07-09 20:14 ` Niranjana Vishwanathapura 2022-07-09 20:14 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-01 22:50 ` [RFC 04/10] drm/i915/vm_bind: Add out fence support Niranjana Vishwanathapura 2022-07-01 22:50 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-01 22:50 ` [RFC 05/10] drm/i915/vm_bind: Handle persistent vmas Niranjana Vishwanathapura 2022-07-01 22:50 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-04 17:05 ` Zeng, Oak 2022-07-04 17:05 ` Zeng, Oak 2022-07-05 9:20 ` Ramalingam C 2022-07-05 9:20 ` Ramalingam C 2022-07-05 13:50 ` Zeng, Oak 2022-07-05 13:50 ` Zeng, Oak 2022-07-07 6:00 ` Niranjana Vishwanathapura 2022-07-07 11:27 ` Hellstrom, Thomas 2022-07-07 11:27 ` [Intel-gfx] " Hellstrom, Thomas 2022-07-08 15:06 ` Niranjana Vishwanathapura 2022-07-08 15:06 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-01 22:50 ` [RFC 06/10] drm/i915/vm_bind: Add I915_GEM_EXECBUFFER3 ioctl Niranjana Vishwanathapura 2022-07-01 22:50 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-07 14:41 ` Hellstrom, Thomas 2022-07-07 14:41 ` [Intel-gfx] " Hellstrom, Thomas 2022-07-07 19:38 ` Andi Shyti 2022-07-07 19:38 ` Andi Shyti 2022-07-08 12:22 ` Hellstrom, Thomas 2022-07-08 12:22 ` Hellstrom, Thomas 2022-07-08 13:47 ` Niranjana Vishwanathapura 2022-07-08 13:47 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-08 14:37 ` Hellstrom, Thomas 2022-07-08 14:37 ` [Intel-gfx] " Hellstrom, Thomas 2022-07-09 20:23 ` Niranjana Vishwanathapura 2022-07-09 20:23 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-01 22:50 ` [RFC 07/10] drm/i915/vm_bind: Handle persistent vmas in execbuf3 Niranjana Vishwanathapura 2022-07-01 22:50 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-07 14:54 ` Hellstrom, Thomas 2022-07-07 14:54 ` [Intel-gfx] " Hellstrom, Thomas 2022-07-08 12:44 ` Niranjana Vishwanathapura 2022-07-08 12:44 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-08 13:03 ` Hellstrom, Thomas 2022-07-08 13:03 ` [Intel-gfx] " Hellstrom, Thomas 2022-07-09 20:25 ` Niranjana Vishwanathapura 2022-07-09 20:25 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-01 22:50 ` [RFC 08/10] drm/i915/vm_bind: userptr dma-resv changes Niranjana Vishwanathapura 2022-07-01 22:50 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-07 13:11 ` Hellstrom, Thomas 2022-07-07 13:11 ` [Intel-gfx] " Hellstrom, Thomas 2022-07-08 14:51 ` Niranjana Vishwanathapura 2022-07-08 14:51 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-08 15:20 ` Hellstrom, Thomas 2022-07-08 15:20 ` [Intel-gfx] " Hellstrom, Thomas 2022-07-09 20:56 ` Niranjana Vishwanathapura 2022-07-09 20:56 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-08 12:17 ` Hellstrom, Thomas 2022-07-08 12:17 ` [Intel-gfx] " Hellstrom, Thomas 2022-07-08 14:54 ` Niranjana Vishwanathapura 2022-07-08 14:54 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-01 22:50 ` [RFC 09/10] drm/i915/vm_bind: Skip vma_lookup for persistent vmas Niranjana Vishwanathapura 2022-07-01 22:50 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-05 8:57 ` Thomas Hellström 2022-07-05 8:57 ` Thomas Hellström 2022-07-08 12:40 ` Niranjana Vishwanathapura 2022-07-08 12:40 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-01 22:50 ` [RFC 10/10] drm/i915/vm_bind: Fix vm->vm_bind_mutex and vm->mutex nesting Niranjana Vishwanathapura 2022-07-01 22:50 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-05 8:40 ` Thomas Hellström 2022-07-05 8:40 ` [Intel-gfx] " Thomas Hellström 2022-07-06 16:33 ` Ramalingam C 2022-07-06 16:33 ` [Intel-gfx] " Ramalingam C 2022-07-07 5:56 ` Niranjana Vishwanathapura 2022-07-07 5:56 ` [Intel-gfx] " Niranjana Vishwanathapura 2022-07-01 23:19 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/vm_bind: Add VM_BIND functionality Patchwork 2022-07-01 23:19 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork 2022-07-01 23:40 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220701225055.8204-1-niranjana.vishwanathapura@intel.com \ --to=niranjana.vishwanathapura@intel.com \ --cc=christian.koenig@amd.com \ --cc=daniel.vetter@intel.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ --cc=jason@jlekstrand.net \ --cc=lionel.g.landwerlin@intel.com \ --cc=matthew.auld@intel.com \ --cc=matthew.brost@intel.com \ --cc=paulo.r.zanoni@intel.com \ --cc=thomas.hellstrom@intel.com \ --cc=tvrtko.ursulin@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.