[PATCH v4 2/2] habanalabs: add support for dma-buf exporter
oded.gabbay at gmail.com
Tue Jul 6 14:00:07 UTC 2021
On Tue, Jul 6, 2021, 16:54 Jason Gunthorpe <jgg at ziepe.ca> wrote:
> On Tue, Jul 06, 2021 at 12:44:49PM +0300, Oded Gabbay wrote:
> > > > + /* 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
> > > > + * 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.
Got it, will change
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the amd-gfx