lkml.org 
[lkml]   [2023]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectQuestion: partial transfers of DMABUFs
    From
    Date
    Hi,

    I am working on adding support for DMABUFs in the IIO subsystem.

    One thing we want there, is the ability to specify the number of bytes
    to transfer (while still defaulting to the DMABUF size).

    Since dma_buf_map_attachment() returns a sg_table, I basically have two
    options, and I can't decide which one is the best (or the less ugly):

    - Either I add a new API function similar to dmaengine_prep_slave_sg(),
    which still takes a scatterlist as argument but also takes the number
    of bytes as argument;

    - Or I add a function to duplicate the scatterlist and then shrink it
    manually, which doesn't sound like a good idea either.

    What would be the recommended way?

    Cheers,
    -Paul

    \
     
     \ /
      Last update: 2023-03-27 00:24    [W:4.078 / U:0.148 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site