[{"id":1012,"web_url":"https://patchwork.libcamera.org/comment/1012/","msgid":"<20190302230055.GP4682@pendragon.ideasonboard.com>","date":"2019-03-02T23:00:55","subject":"Re: [libcamera-devel] [PATCH 09/10] libcamera: ipu3: Connect CIO2\n\toutput to ImgU input","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Thu, Feb 28, 2019 at 09:04:09PM +0100, Jacopo Mondi wrote:\n> Connect the CIO2 output buffer available signal to a slot that simply\n> queue the received buffer to ImgU for processing.\n> \n> FIXME: as long as the bufferReady signal cannot transport at least the\n> cameraData from where to retrieve a pointer to the ImguDevice, store it\n> as a class member.\n\nYou should be able to fix this with a rebase :-)\n\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/pipeline/ipu3/ipu3.cpp | 23 +++++++++++++++++++++++\n>  1 file changed, 23 insertions(+)\n> \n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index b9bc992879f5..3138eb0bf8b6 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -149,6 +149,8 @@ private:\n>  \tint startDevice(V4L2Device *dev);\n>  \tint stopDevice(V4L2Device *dev);\n>  \n> +\tvoid cio2BufferDone(Buffer *buffer);\n> +\n>  \tImguDevice imgu0_;\n>  \tImguDevice imgu1_;\n>  \n> @@ -156,6 +158,7 @@ private:\n>  \tstd::shared_ptr<MediaDevice> imguMediaDev_;\n>  \n>  \tunsigned int tmpBufferCount;\n> +\tIPU3CameraData *tmpCameraData;\n>  };\n>  \n>  PipelineHandlerIPU3::PipelineHandlerIPU3(CameraManager *manager)\n> @@ -430,6 +433,19 @@ int PipelineHandlerIPU3::start(const Camera *camera)\n>  \tif (ret)\n>  \t\treturn ret;\n>  \n> +\t/*\n> +\t * FIXME\n> +\t * This is a big hack! tmpCameraData is used in the cio2BufferDone\n> +\t * slot, as there is currently no way to access cameraData from there.\n> +\t */\n> +\ttmpCameraData = data;\n> +\n> +\t/*\n> +\t * Connect CIO2 output and ImgU input buffer events, when a buffer\n> +\t * is available from CIO2, queue it to the ImgU.\n> +\t */\n> +\tdata->cio2.output->bufferReady.connect(this,\n> +\t\t\t\t\t&PipelineHandlerIPU3::cio2BufferDone);\n>  \tret = startDevice(data->cio2.output);\n>  \tif (ret)\n>  \t\treturn ret;\n> @@ -975,6 +991,13 @@ int PipelineHandlerIPU3::stopDevice(V4L2Device *dev)\n>  \treturn 0;\n>  }\n>  \n> +void PipelineHandlerIPU3::cio2BufferDone(Buffer *buffer)\n> +{\n> +\tImguDevice *imgu = tmpCameraData->imgu;\n> +\n> +\timgu->input->queueBuffer(buffer);\n> +}\n> +\n>  REGISTER_PIPELINE_HANDLER(PipelineHandlerIPU3);\n>  \n>  } /* namespace libcamera */","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 93DBF610BF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  3 Mar 2019 00:01:01 +0100 (CET)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1DCC554E;\n\tSun,  3 Mar 2019 00:01:01 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1551567661;\n\tbh=vN5kvnqGZQfjGrrBMmU3FfCCgBT5/HEQDfIJ4YT70q8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=qdj66hnvqjgUY2Y9d/J2HDSwjyqYBVItQg6WNuErPDrZdW/m9NXz0iAfJIORXn0Wg\n\tmw7apzrXwD3qvYV6cUCiwR1aA2OgeRbxR+F529eE/HxPLjQlXAE/5a6ULG6JQB9z39\n\tYmw7nBV1+WqdTEhvsEpp6CBTJyEa6cvf+5yMhG3g=","Date":"Sun, 3 Mar 2019 01:00:55 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190302230055.GP4682@pendragon.ideasonboard.com>","References":"<20190228200410.3022-1-jacopo@jmondi.org>\n\t<20190228200410.3022-10-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190228200410.3022-10-jacopo@jmondi.org>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 09/10] libcamera: ipu3: Connect CIO2\n\toutput to ImgU input","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Sat, 02 Mar 2019 23:01:01 -0000"}},{"id":1025,"web_url":"https://patchwork.libcamera.org/comment/1025/","msgid":"<20190309210135.7vgblqgvt5qbtmk4@uno.localdomain>","date":"2019-03-09T21:01:35","subject":"Re: [libcamera-devel] [PATCH 09/10] libcamera: ipu3: Connect CIO2\n\toutput to ImgU input","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Sun, Mar 03, 2019 at 01:00:55AM +0200, Laurent Pinchart wrote:\n> Hi Jacopo,\n>\n> Thank you for the patch.\n>\n> On Thu, Feb 28, 2019 at 09:04:09PM +0100, Jacopo Mondi wrote:\n> > Connect the CIO2 output buffer available signal to a slot that simply\n> > queue the received buffer to ImgU for processing.\n> >\n> > FIXME: as long as the bufferReady signal cannot transport at least the\n> > cameraData from where to retrieve a pointer to the ImguDevice, store it\n> > as a class member.\n>\n> You should be able to fix this with a rebase :-)\n>\n\nDone by adding slots to the IPU3CameraData :)\n\nThanks\n  j\n\n> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > ---\n> >  src/libcamera/pipeline/ipu3/ipu3.cpp | 23 +++++++++++++++++++++++\n> >  1 file changed, 23 insertions(+)\n> >\n> > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > index b9bc992879f5..3138eb0bf8b6 100644\n> > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > @@ -149,6 +149,8 @@ private:\n> >  \tint startDevice(V4L2Device *dev);\n> >  \tint stopDevice(V4L2Device *dev);\n> >\n> > +\tvoid cio2BufferDone(Buffer *buffer);\n> > +\n> >  \tImguDevice imgu0_;\n> >  \tImguDevice imgu1_;\n> >\n> > @@ -156,6 +158,7 @@ private:\n> >  \tstd::shared_ptr<MediaDevice> imguMediaDev_;\n> >\n> >  \tunsigned int tmpBufferCount;\n> > +\tIPU3CameraData *tmpCameraData;\n> >  };\n> >\n> >  PipelineHandlerIPU3::PipelineHandlerIPU3(CameraManager *manager)\n> > @@ -430,6 +433,19 @@ int PipelineHandlerIPU3::start(const Camera *camera)\n> >  \tif (ret)\n> >  \t\treturn ret;\n> >\n> > +\t/*\n> > +\t * FIXME\n> > +\t * This is a big hack! tmpCameraData is used in the cio2BufferDone\n> > +\t * slot, as there is currently no way to access cameraData from there.\n> > +\t */\n> > +\ttmpCameraData = data;\n> > +\n> > +\t/*\n> > +\t * Connect CIO2 output and ImgU input buffer events, when a buffer\n> > +\t * is available from CIO2, queue it to the ImgU.\n> > +\t */\n> > +\tdata->cio2.output->bufferReady.connect(this,\n> > +\t\t\t\t\t&PipelineHandlerIPU3::cio2BufferDone);\n> >  \tret = startDevice(data->cio2.output);\n> >  \tif (ret)\n> >  \t\treturn ret;\n> > @@ -975,6 +991,13 @@ int PipelineHandlerIPU3::stopDevice(V4L2Device *dev)\n> >  \treturn 0;\n> >  }\n> >\n> > +void PipelineHandlerIPU3::cio2BufferDone(Buffer *buffer)\n> > +{\n> > +\tImguDevice *imgu = tmpCameraData->imgu;\n> > +\n> > +\timgu->input->queueBuffer(buffer);\n> > +}\n> > +\n> >  REGISTER_PIPELINE_HANDLER(PipelineHandlerIPU3);\n> >\n> >  } /* namespace libcamera */\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[217.70.178.230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4872F600F9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  9 Mar 2019 22:01:02 +0100 (CET)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay10.mail.gandi.net (Postfix) with ESMTPSA id 7C7CD240004;\n\tSat,  9 Mar 2019 21:01:01 +0000 (UTC)"],"Date":"Sat, 9 Mar 2019 22:01:35 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190309210135.7vgblqgvt5qbtmk4@uno.localdomain>","References":"<20190228200410.3022-1-jacopo@jmondi.org>\n\t<20190228200410.3022-10-jacopo@jmondi.org>\n\t<20190302230055.GP4682@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"7ifg42jmwbs6yd2l\"","Content-Disposition":"inline","In-Reply-To":"<20190302230055.GP4682@pendragon.ideasonboard.com>","User-Agent":"NeoMutt/20180716","Subject":"Re: [libcamera-devel] [PATCH 09/10] libcamera: ipu3: Connect CIO2\n\toutput to ImgU input","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Sat, 09 Mar 2019 21:01:02 -0000"}}]