All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Add p2p via dmabuf to habanalabs
@ 2021-07-05 13:03 ` Oded Gabbay
  0 siblings, 0 replies; 110+ messages in thread
From: Oded Gabbay @ 2021-07-05 13:03 UTC (permalink / raw)
  To: linux-kernel, gregkh
  Cc: sumit.semwal, christian.koenig, daniel.vetter, galpress, sleybo,
	dri-devel, jgg, linux-rdma, linux-media, dledford, airlied,
	alexander.deucher, leonro, hch, amd-gfx, linaro-mm-sig

Hi,
I'm sending v4 of this patch-set following the long email thread.
I want to thank Jason for reviewing v3 and pointing out the errors, saving
us time later to debug it :)

I consulted with Christian on how to fix patch 2 (the implementation) and
at the end of the day I shamelessly copied the relevant content from
amdgpu_vram_mgr_alloc_sgt() and amdgpu_dma_buf_attach(), regarding the
usage of dma_map_resource() and pci_p2pdma_distance_many(), respectively.

I also made a few improvements after looking at the relevant code in amdgpu.
The details are in the changelog of patch 2.

I took the time to write an import code into the driver, allowing me to
check real P2P with two Gaudi devices, one as exporter and the other as
importer. I'm not going to include the import code in the product, it was
just for testing purposes (although I can share it if anyone wants).

I run it on a bare-metal environment with IOMMU enabled, on a sky-lake CPU
with a white-listed PCIe bridge (to make the pci_p2pdma_distance_many happy).

Greg, I hope this will be good enough for you to merge this code.

Thanks,
Oded

Oded Gabbay (1):
  habanalabs: define uAPI to export FD for DMA-BUF

Tomer Tayar (1):
  habanalabs: add support for dma-buf exporter

 drivers/misc/habanalabs/Kconfig             |   1 +
 drivers/misc/habanalabs/common/habanalabs.h |  26 ++
 drivers/misc/habanalabs/common/memory.c     | 480 +++++++++++++++++++-
 drivers/misc/habanalabs/gaudi/gaudi.c       |   1 +
 drivers/misc/habanalabs/goya/goya.c         |   1 +
 include/uapi/misc/habanalabs.h              |  28 +-
 6 files changed, 532 insertions(+), 5 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2021-07-10  8:56 UTC | newest]

Thread overview: 110+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05 13:03 [PATCH v4 0/2] Add p2p via dmabuf to habanalabs Oded Gabbay
2021-07-05 13:03 ` Oded Gabbay
2021-07-05 13:03 ` Oded Gabbay
2021-07-05 13:03 ` [PATCH v4 1/2] habanalabs: define uAPI to export FD for DMA-BUF Oded Gabbay
2021-07-05 13:03   ` Oded Gabbay
2021-07-05 13:03   ` Oded Gabbay
2021-07-05 13:03 ` [PATCH v4 2/2] habanalabs: add support for dma-buf exporter Oded Gabbay
2021-07-05 13:03   ` Oded Gabbay
2021-07-05 13:03   ` Oded Gabbay
2021-07-05 16:52   ` Jason Gunthorpe
2021-07-05 16:52     ` Jason Gunthorpe
2021-07-05 16:52     ` Jason Gunthorpe
2021-07-06  9:44     ` Oded Gabbay
2021-07-06  9:44       ` Oded Gabbay
2021-07-06  9:44       ` Oded Gabbay
2021-07-06 13:54       ` Jason Gunthorpe
2021-07-06 13:54         ` Jason Gunthorpe
2021-07-06 13:54         ` Jason Gunthorpe
2021-07-06 14:00         ` Oded Gabbay
2021-07-06 14:00           ` Oded Gabbay
2021-07-06  8:40 ` [PATCH v4 0/2] Add p2p via dmabuf to habanalabs Daniel Vetter
2021-07-06  8:40   ` Daniel Vetter
2021-07-06  8:40   ` Daniel Vetter
2021-07-06 10:03   ` Oded Gabbay
2021-07-06 10:03     ` Oded Gabbay
2021-07-06 10:36     ` Daniel Vetter
2021-07-06 10:36       ` Daniel Vetter
2021-07-06 10:36       ` Daniel Vetter
2021-07-06 10:47       ` Daniel Vetter
2021-07-06 10:47         ` Daniel Vetter
2021-07-06 10:47         ` Daniel Vetter
2021-07-06 12:07         ` Daniel Vetter
2021-07-06 12:07           ` Daniel Vetter
2021-07-06 12:07           ` Daniel Vetter
2021-07-06 13:44           ` Jason Gunthorpe
2021-07-06 13:44             ` Jason Gunthorpe
2021-07-06 13:44             ` Jason Gunthorpe
2021-07-06 14:09             ` Daniel Vetter
2021-07-06 14:09               ` Daniel Vetter
2021-07-06 14:09               ` Daniel Vetter
2021-07-06 14:56               ` Jason Gunthorpe
2021-07-06 14:56                 ` Jason Gunthorpe
2021-07-06 14:56                 ` Jason Gunthorpe
2021-07-06 15:52                 ` Daniel Vetter
2021-07-06 15:52                   ` Daniel Vetter
2021-07-06 15:52                   ` Daniel Vetter
2021-07-06 12:23       ` Christoph Hellwig
2021-07-06 12:23         ` Christoph Hellwig
2021-07-06 14:23       ` Jason Gunthorpe
2021-07-06 14:23         ` Jason Gunthorpe
2021-07-06 14:23         ` Jason Gunthorpe
2021-07-06 14:39         ` Daniel Vetter
2021-07-06 14:39           ` Daniel Vetter
2021-07-06 14:39           ` Daniel Vetter
2021-07-06 15:25           ` Jason Gunthorpe
2021-07-06 15:25             ` Jason Gunthorpe
2021-07-06 15:25             ` Jason Gunthorpe
2021-07-06 15:49             ` Daniel Vetter
2021-07-06 15:49               ` Daniel Vetter
2021-07-06 15:49               ` Daniel Vetter
2021-07-06 16:07               ` Daniel Vetter
2021-07-06 16:07                 ` Daniel Vetter
2021-07-06 16:07                 ` Daniel Vetter
2021-07-06 17:28                 ` Jason Gunthorpe
2021-07-06 17:28                   ` Jason Gunthorpe
2021-07-06 17:28                   ` Jason Gunthorpe
2021-07-06 17:31                   ` Christoph Hellwig
2021-07-06 17:31                     ` Christoph Hellwig
2021-07-06 17:59                     ` Jason Gunthorpe
2021-07-06 17:59                       ` Jason Gunthorpe
2021-07-06 17:59                       ` Jason Gunthorpe
2021-07-09 14:47                       ` Dennis Dalessandro
2021-07-09 14:47                         ` Dennis Dalessandro
2021-07-09 14:47                         ` Dennis Dalessandro
2021-07-06 16:29               ` Jason Gunthorpe
2021-07-06 16:29                 ` Jason Gunthorpe
2021-07-06 16:29                 ` Jason Gunthorpe
2021-07-06 17:35                 ` Daniel Vetter
2021-07-06 17:35                   ` Daniel Vetter
2021-07-06 17:35                   ` Daniel Vetter
2021-07-06 18:03                   ` Daniel Vetter
2021-07-06 18:03                     ` Daniel Vetter
2021-07-06 18:03                     ` Daniel Vetter
2021-07-06 18:31                   ` Jason Gunthorpe
2021-07-06 18:31                     ` Jason Gunthorpe
2021-07-06 18:31                     ` Jason Gunthorpe
2021-07-06 19:06                     ` Daniel Vetter
2021-07-06 19:06                       ` Daniel Vetter
2021-07-06 19:06                       ` Daniel Vetter
2021-07-06 19:09                     ` Alex Deucher
2021-07-06 19:09                       ` Alex Deucher
2021-07-06 19:09                       ` Alex Deucher
2021-07-06 12:21   ` Christoph Hellwig
2021-07-06 12:21     ` Christoph Hellwig
2021-07-06 12:23     ` [Linaro-mm-sig] " Daniel Vetter
2021-07-06 12:23       ` Daniel Vetter
2021-07-06 12:23       ` Daniel Vetter
2021-07-06 12:45       ` Oded Gabbay
2021-07-06 12:45         ` Oded Gabbay
2021-07-06 13:17         ` Daniel Vetter
2021-07-06 13:17           ` Daniel Vetter
2021-07-06 13:17           ` Daniel Vetter
2021-07-06 13:45           ` Oded Gabbay
2021-07-06 13:45             ` Oded Gabbay
2021-07-06 13:45             ` Oded Gabbay
2021-07-07 12:17       ` Christian König
2021-07-07 12:17         ` Christian König
2021-07-07 12:54         ` Daniel Vetter
2021-07-07 12:54           ` Daniel Vetter
2021-07-07 12:54           ` Daniel Vetter

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.