[libcamera-devel] [PATCH 09/10] libcamera: ipu3: Connect CIO2 output to ImgU input
Jacopo Mondi
jacopo at jmondi.org
Sat Mar 9 22:01:35 CET 2019
Hi Laurent,
On Sun, Mar 03, 2019 at 01:00:55AM +0200, Laurent Pinchart wrote:
> Hi Jacopo,
>
> Thank you for the patch.
>
> On Thu, Feb 28, 2019 at 09:04:09PM +0100, Jacopo Mondi wrote:
> > Connect the CIO2 output buffer available signal to a slot that simply
> > queue the received buffer to ImgU for processing.
> >
> > FIXME: as long as the bufferReady signal cannot transport at least the
> > cameraData from where to retrieve a pointer to the ImguDevice, store it
> > as a class member.
>
> You should be able to fix this with a rebase :-)
>
Done by adding slots to the IPU3CameraData :)
Thanks
j
> > Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> > ---
> > src/libcamera/pipeline/ipu3/ipu3.cpp | 23 +++++++++++++++++++++++
> > 1 file changed, 23 insertions(+)
> >
> > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> > index b9bc992879f5..3138eb0bf8b6 100644
> > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> > @@ -149,6 +149,8 @@ private:
> > int startDevice(V4L2Device *dev);
> > int stopDevice(V4L2Device *dev);
> >
> > + void cio2BufferDone(Buffer *buffer);
> > +
> > ImguDevice imgu0_;
> > ImguDevice imgu1_;
> >
> > @@ -156,6 +158,7 @@ private:
> > std::shared_ptr<MediaDevice> imguMediaDev_;
> >
> > unsigned int tmpBufferCount;
> > + IPU3CameraData *tmpCameraData;
> > };
> >
> > PipelineHandlerIPU3::PipelineHandlerIPU3(CameraManager *manager)
> > @@ -430,6 +433,19 @@ int PipelineHandlerIPU3::start(const Camera *camera)
> > if (ret)
> > return ret;
> >
> > + /*
> > + * FIXME
> > + * This is a big hack! tmpCameraData is used in the cio2BufferDone
> > + * slot, as there is currently no way to access cameraData from there.
> > + */
> > + tmpCameraData = data;
> > +
> > + /*
> > + * Connect CIO2 output and ImgU input buffer events, when a buffer
> > + * is available from CIO2, queue it to the ImgU.
> > + */
> > + data->cio2.output->bufferReady.connect(this,
> > + &PipelineHandlerIPU3::cio2BufferDone);
> > ret = startDevice(data->cio2.output);
> > if (ret)
> > return ret;
> > @@ -975,6 +991,13 @@ int PipelineHandlerIPU3::stopDevice(V4L2Device *dev)
> > return 0;
> > }
> >
> > +void PipelineHandlerIPU3::cio2BufferDone(Buffer *buffer)
> > +{
> > + ImguDevice *imgu = tmpCameraData->imgu;
> > +
> > + imgu->input->queueBuffer(buffer);
> > +}
> > +
> > REGISTER_PIPELINE_HANDLER(PipelineHandlerIPU3);
> >
> > } /* namespace libcamera */
>
> --
> Regards,
>
> Laurent Pinchart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20190309/0e434dcc/attachment-0001.sig>
More information about the libcamera-devel
mailing list