Thread (38 messages) 38 messages, 9 authors, 2021-07-09

Re: [PATCH v4 2/2] habanalabs: add support for dma-buf exporter

From: Jason Gunthorpe <jgg@ziepe.ca>
Date: 2021-07-06 15:13:00
Also in: amd-gfx, dri-devel, linux-media, lkml

On Tue, Jul 06, 2021 at 12:44:49PM +0300, Oded Gabbay wrote:
quoted
quoted
+     /* In case we got a large memory area to export, we need to divide it
+      * to smaller areas because each entry in the dmabuf sgt can only
+      * describe unsigned int.
+      */
Huh? This is forming a SGL, it should follow the SGL rules which means
you have to fragment based on the dma_get_max_seg_size() of the
importer device.
hmm
I don't see anyone in drm checking this value (and using it) when
creating the SGL when exporting dmabuf. (e.g.
amdgpu_vram_mgr_alloc_sgt)
For dmabuf the only importer is RDMA and it doesn't care, but you
certainly should not introduce a hardwired constant instead of using
the correct function.

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help