[libcamera-devel] Questions about a zero-copy RAW stream in the raspberrypi pipelinehandler

Naushir Patuck naush at raspberrypi.com
Fri Jun 26 14:16:06 CEST 2020


Hi Niklas,

On Fri, 26 Jun 2020 at 13:03, Niklas Söderlund
<niklas.soderlund at ragnatech.se> wrote:
>
> Hi Naushir,
>
> I just merged a patch for the IPU3 pipeline handler making its RAW
> stream zero-copy [1]. I would like for something similar for the
> raspberrypi pipeline handler as that would allow us to drop
> FrameBuffer::copyFrom(). The need to copy out the RAW buffer was an idea
> we had when we wished to protect against applications re-using the RAW
> buffer before the request it belonged to had completed. In hindsight we
> think this was a bad idea and wish to reverse course and address the
> issue in a way that does not impact performance as much.
>
> I had a look at the raspberrypi pipeline. After understanding that you
> run the bayer and embeddeddata queues in lockstep and share the bayer
> buffer with the IPA (RPI_IPA_EVENT_SIGNAL_ISP_PREPARE) I realised it
> would not be a simple change as it was for the IPU3 pipeline. Would it
> be possible for you to have a look and provide some guidance on how we
> could move the pipeline in this direction? If you think getting rid of
> the copy operation is a bad idea that is of course also good feedback.
>
> Thanks and have a nice weekend.
>
> 1. 40148cfcafbac274 ("libcamera: ipu3: Allow zero-copy RAW stream capture")
>

I would be happy to assist with this.  We certainly do want to get rid
of the memcpy in our pipeline handler to improve performance.  I will
have a look at what changes you made to the IPU3 pipeline handler to
see what is involved.  Separate, could you perhaps summarise the
steps/changes you made in the IPU3 - this would help me understand the
code better, I have not looked at the IPU3 pipeline at all.  Perhaps
we can take this discussion private to avoid spamming the mailing list
as well?

Regards,
Naush


More information about the libcamera-devel mailing list