[libcamera-devel] [PATCH v2 10/19] py: examples: Add simple-capture.py
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Fri May 27 08:25:28 CEST 2022
On Fri, May 27, 2022 at 09:16:01AM +0300, Tomi Valkeinen wrote:
> On 27/05/2022 09:14, Laurent Pinchart wrote:
>
> >>>> + with libcamera.utils.MappedFrameBuffer(fb) as mfb:
> >>>> + crcs = [binascii.crc32(p) for p in mfb.planes]
> >>>
> >>> Mapping buffers is expensive, this should be done before starting the
> >>> camera.
> >>
> >> Hmm... How do we invalidate the caches if we keep the buffers mapped?
> >
> > QBUF/DQBUF are supposed to handle that.
>
> Ah, ok. Isn't that horribly inefficient if you never actually access the
> buffer with CPU?
There are hints that can be passed to the ioctls to have cache
operations when not touching the buffers with the CPU.
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list