[PATCH 1/3] media: v4l2: Add V4L2_EVENT_BUF_PROGRESS to report progress of capture
Nicolas Dufresne
nicolas.dufresne at collabora.com
Mon Nov 30 07:21:49 PST 2026
Hi,
Le dimanche 29 novembre 2026 à 18:58 +0530, Siddharth Vadapalli a écrit :
> + The buffer remains owned by the driver until it is dequeued, and the
> + driver does not perform any cache maintenance on the part of the
> + buffer that was reported. An application that reads that part before
> + the buffer is dequeued must make sure that its mapping is coherent
> + with DMA, which is not the case for memory allocated with
> + ``V4L2_MEMORY_FLAG_NON_COHERENT``. For buffers with memory type
> + ``V4L2_MEMORY_DMABUF``, cache management is the responsibility of
> + the exporter of the buffer.
I think outside of write-combine, which you likely use, this is completely
unusable. Its not possible to do device cache management properly without the
context the driver has.
May I propose for the event to deliver a dma fence. Then the driver that do use
device caches can spawn a worker that will signal the fence when the memory is
actually ready. On top of which, you can deliver the fence once the transfer is
proven to have started, rather then when its complet. Sub-frame, unless you only
care about really slow devices, introduce very tight timing which only dma
fences will really cover.
Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20261130/b2f2b6fb/attachment.sig>
More information about the linux-arm-kernel
mailing list