All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Enable KFD to use render node BO mappings
@ 2023-01-12  1:31 Felix Kuehling
  2023-01-12  1:31 ` [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import Felix Kuehling
                   ` (6 more replies)
  0 siblings, 7 replies; 32+ messages in thread
From: Felix Kuehling @ 2023-01-12  1:31 UTC (permalink / raw)
  To: amd-gfx, dri-devel; +Cc: xiaogang.chen, christian.koenig

Rebased on latest amd-staging-drm-next. This is meant to be the final
review of this series, assuming no more issues are found.

This patch series enables KFD to interoperate more closely with DRM render
nodes. ROCm user mode already uses DRM render nodes to create its GPU VM
contexts and to CPU-map its GEM buffer objects. This patch series adds an
API to let KFD export its BOs as DMABufs, so they can be imported into
the DRM render nodes. This enables more flexible virtual memory mappings
using DRM_IOCTL_AMDGPU_GEM_VA.

Patches 1 and 2 deal with the exporting and importing of DMABufs.

The remaining patches let KFD validate and update GPUVM mappings managed
through render nodes.

The user mode side of this patch series can be seen in libhsakmt and
KFDTest where we improve integration with libdrm (initializing
amdgpu_device instances) to enable DMABuf imports into the render nodes
representing KFD GPU VM contexts. KFDTest is modified to test evictions
and validations of BOs mapped through amdgpu_bo_va_op:
https://github.com/fxkamd/ROCT-Thunk-Interface/commits/fxkamd/dmabuf

As a consequence, applications using Mesa and ROCm in the same process on
the same GPU will now share a single render node FD and GPUVM address
space.

The DMABuf export API will also be used later for upstream IPC and RDMA
implementations.

Felix Kuehling (6):
  drm/amdgpu: Generalize KFD dmabuf import
  drm/amdkfd: Implement DMA buf fd export from KFD
  drm/amdkfd: Improve amdgpu_vm_handle_moved
  drm/amdgpu: Attach eviction fence on alloc
  drm/amdgpu: update mappings not managed by KFD
  drm/amdgpu: Do bo_va ref counting for KFD BOs

 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h    |   2 +
 .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c  | 196 ++++++++++++------
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c        |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c   |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c        |  18 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h        |   3 +-
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c      |  55 +++++
 include/uapi/linux/kfd_ioctl.h                |  14 +-
 8 files changed, 219 insertions(+), 77 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread
* [PATCH 0/6] Enable KFD to use render node BO mappings
@ 2022-11-18 23:44 Felix Kuehling
  2022-11-18 23:44 ` [PATCH 3/6] drm/amdkfd: Improve amdgpu_vm_handle_moved Felix Kuehling
  0 siblings, 1 reply; 32+ messages in thread
From: Felix Kuehling @ 2022-11-18 23:44 UTC (permalink / raw)
  To: amd-gfx, dri-devel

This patch series enables KFD to interoperate more closely with DRM render
nodes. ROCm user mode already uses DRM render nodes to create its GPU VM
contexts and to CPU-map its GEM buffer objects. This patch series adds an
API to let KFD export its BOs as DMABufs, so they can be imported into
the DRM render nodes. This enables more flexible virtual memory mappings
using DRM_IOCTL_AMDGPU_GEM_VA.

Patches 1 and 2 deal with the exporting and importing of DMABufs.

The remaining patches let KFD validate and update GPUVM mappings managed
through render nodes.

The user mode side of this patch series can be seen in libhsakmt and
KFDTest where we improve integration with libdrm (initializing
amdgpu_device instances) to enable DMABuf imports into the render nodes
representing KFD GPU VM contexts. KFDTest is modified to test evictions
and validations of BOs mapped through amdgpu_bo_va_op:
https://github.com/fxkamd/ROCT-Thunk-Interface/commits/fxkamd/dmabuf

As a consequence, applications using Mesa and ROCm in the same process on
the same GPU will now share a single render node FD and GPUVM address
space.

The DMABuf export API will also be used later for upstream IPC and RDMA
implementation.

Felix Kuehling (6):
  drm/amdgpu: Generalize KFD dmabuf import
  drm/amdkfd: Implement DMA buf fd export from KFD
  drm/amdkfd: Improve amdgpu_vm_handle_moved
  drm/amdgpu: Attach eviction fence on alloc
  drm/amdgpu: update mappings not managed by KFD
  drm/amdgpu: Do bo_va ref counting for KFD BOs

 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h    |   2 +
 .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c  | 196 ++++++++++++------
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c        |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c   |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c        |  18 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h        |   3 +-
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c      |  55 +++++
 include/uapi/linux/kfd_ioctl.h                |  14 +-
 8 files changed, 219 insertions(+), 77 deletions(-)

-- 
2.32.0


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

end of thread, other threads:[~2023-02-16 12:22 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-12  1:31 [PATCH 0/6] Enable KFD to use render node BO mappings Felix Kuehling
2023-01-12  1:31 ` [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import Felix Kuehling
2023-01-12 22:41   ` Chen, Xiaogang
2023-01-13 22:26     ` Felix Kuehling
2023-01-13 23:00       ` Chen, Xiaogang
2023-01-13 23:15         ` Felix Kuehling
2023-01-15 16:43           ` Christian König
2023-01-15 18:32             ` Felix Kuehling
2023-01-16 11:42               ` Christian König
2023-01-16 14:52                 ` Felix Kuehling
2023-01-16 15:11                   ` Christian König
2023-01-17  1:06                     ` Dmitry Osipenko
2023-02-16 12:22                       ` Daniel Vetter
2023-02-16 12:22                         ` Daniel Vetter
2023-01-16 22:04   ` Errabolu, Ramesh
2023-01-16 22:25     ` Felix Kuehling
2023-01-12  1:31 ` [PATCH 2/6] drm/amdkfd: Implement DMA buf fd export from KFD Felix Kuehling
2023-01-13  8:03   ` Chen, Xiaogang
2023-01-12  1:31 ` [PATCH 3/6] drm/amdkfd: Improve amdgpu_vm_handle_moved Felix Kuehling
2023-01-13  8:05   ` Chen, Xiaogang
2023-01-12  1:31 ` [PATCH 4/6] drm/amdgpu: Attach eviction fence on alloc Felix Kuehling
2023-01-13  8:12   ` Chen, Xiaogang
2023-01-16 22:11   ` Errabolu, Ramesh
2023-01-16 22:51     ` Felix Kuehling
2023-01-12  1:31 ` [PATCH 5/6] drm/amdgpu: update mappings not managed by KFD Felix Kuehling
2023-01-13 20:02   ` Chen, Xiaogang
2023-01-12  1:31 ` [PATCH 6/6] drm/amdgpu: Do bo_va ref counting for KFD BOs Felix Kuehling
2023-01-13 22:58   ` Chen, Xiaogang
2023-01-16 22:12     ` Errabolu, Ramesh
2023-01-16 22:58       ` Felix Kuehling
2023-01-12  7:18 ` [PATCH 0/6] Enable KFD to use render node BO mappings Christian König
  -- strict thread matches above, loose matches on Subject: below --
2022-11-18 23:44 Felix Kuehling
2022-11-18 23:44 ` [PATCH 3/6] drm/amdkfd: Improve amdgpu_vm_handle_moved Felix Kuehling

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.