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

Oded Gabbay 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
> 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
>

Got it, will change
Thanks,
Oded

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20210706/70c2af9e/attachment.htm>


More information about the amd-gfx mailing list