public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Question: partial transfers of DMABUFs
@ 2023-02-15 10:48 Paul Cercueil
  2023-02-15 11:30 ` Maarten Lankhorst
  2023-02-15 12:58 ` Christian König
  0 siblings, 2 replies; 12+ messages in thread
From: Paul Cercueil @ 2023-02-15 10:48 UTC (permalink / raw)
  To: Sumit Semwal, Christian König, Vinod Koul
  Cc: linux-media, dmaengine, dri-devel, linux-kernel

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

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

end of thread, other threads:[~2023-02-15 13:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-15 10:48 Question: partial transfers of DMABUFs Paul Cercueil
2023-02-15 11:30 ` Maarten Lankhorst
2023-02-15 11:47   ` Paul Cercueil
2023-02-15 11:52     ` Maarten Lankhorst
2023-02-15 12:00       ` Paul Cercueil
2023-02-15 12:13         ` Maarten Lankhorst
2023-02-15 13:17           ` Paul Cercueil
2023-02-15 12:58 ` Christian König
2023-02-15 13:24   ` Paul Cercueil
2023-02-15 13:46     ` Christian König
2023-02-15 13:52       ` Paul Cercueil
2023-02-15 13:56         ` Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox