[{"id":15793,"web_url":"https://patchwork.libcamera.org/comment/15793/","msgid":"<20210322174322.f2rearztmii42rlh@uno.localdomain>","date":"2021-03-22T17:43:22","subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: stream: Add\n\tcontrolList attribute","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Marian,\n\nOn Mon, Mar 22, 2021 at 11:42:40AM +0100, Marian Cichy wrote:\n> By adding a controlList to the stream attributes, we have access to\n> several more configuration parameters for a stream. In this patch\n> series, it is for now only used to access the frame duration of a sensor.\n>\n> Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>\n> ---\n>  include/libcamera/stream.h | 2 ++\n>  1 file changed, 2 insertions(+)\n>\n> diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\n> index bb47c390..a6347e31 100644\n> --- a/include/libcamera/stream.h\n> +++ b/include/libcamera/stream.h\n> @@ -13,6 +13,7 @@\n>  #include <vector>\n>\n>  #include <libcamera/buffer.h>\n> +#include <libcamera/controls.h>\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/pixel_format.h>\n>\n> @@ -44,6 +45,7 @@ struct StreamConfiguration {\n>  \tSize size;\n>  \tunsigned int stride;\n>  \tunsigned int frameSize;\n> +\tControlList controls;\n\nDocumentation is missing.\n\nIn general, as discussed on irc, I guess this is an acceptable first\nstep to be able to retrieve per-stream information.\n\n>\n>  \tunsigned int bufferCount;\n>\n> --\n> 2.29.2\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 2FFE3C32E1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 22 Mar 2021 17:42:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 36FC868D62;\n\tMon, 22 Mar 2021 18:42:52 +0100 (CET)","from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net\n\t[217.70.183.198])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D34AF68D50\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 22 Mar 2021 18:42:50 +0100 (CET)","from uno.localdomain (host-82-63-7-72.business.telecomitalia.it\n\t[82.63.7.72]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay6-d.mail.gandi.net (Postfix) with ESMTPSA id A58D6C0005;\n\tMon, 22 Mar 2021 17:42:49 +0000 (UTC)"],"X-Originating-IP":"82.63.7.72","Date":"Mon, 22 Mar 2021 18:43:22 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Marian Cichy <m.cichy@pengutronix.de>","Message-ID":"<20210322174322.f2rearztmii42rlh@uno.localdomain>","References":"<20210322104242.31107-1-m.cichy@pengutronix.de>\n\t<20210322104242.31107-2-m.cichy@pengutronix.de>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210322104242.31107-2-m.cichy@pengutronix.de>","Subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: stream: Add\n\tcontrolList attribute","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","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>","Cc":"libcamera-devel@lists.libcamera.org, graphics@pengutronix.de","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":16674,"web_url":"https://patchwork.libcamera.org/comment/16674/","msgid":"<20210428134705.czzrg7ovps3avh27@pengutronix.de>","date":"2021-04-28T13:47:05","subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: stream: Add\n\tcontrolList attribute","submitter":{"id":89,"url":"https://patchwork.libcamera.org/api/people/89/","name":"Marco Felsch","email":"m.felsch@pengutronix.de"},"content":"Hi Jacopo,\n\nOn 21-03-22 18:43, Jacopo Mondi wrote:\n> Hi Marian,\n> \n> On Mon, Mar 22, 2021 at 11:42:40AM +0100, Marian Cichy wrote:\n> > By adding a controlList to the stream attributes, we have access to\n> > several more configuration parameters for a stream. In this patch\n> > series, it is for now only used to access the frame duration of a sensor.\n> >\n> > Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>\n> > ---\n> >  include/libcamera/stream.h | 2 ++\n> >  1 file changed, 2 insertions(+)\n> >\n> > diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\n> > index bb47c390..a6347e31 100644\n> > --- a/include/libcamera/stream.h\n> > +++ b/include/libcamera/stream.h\n> > @@ -13,6 +13,7 @@\n> >  #include <vector>\n> >\n> >  #include <libcamera/buffer.h>\n> > +#include <libcamera/controls.h>\n> >  #include <libcamera/geometry.h>\n> >  #include <libcamera/pixel_format.h>\n> >\n> > @@ -44,6 +45,7 @@ struct StreamConfiguration {\n> >  \tSize size;\n> >  \tunsigned int stride;\n> >  \tunsigned int frameSize;\n> > +\tControlList controls;\n> \n> Documentation is missing.\n> \n> In general, as discussed on irc, I guess this is an acceptable first\n> step to be able to retrieve per-stream information.\n\nI picked up Marian's work to become familar with libcamera and now I\nhave my first question on this topic.\n\nWhy is this necessary here? It think what we wanna do (retrieve the\nframerate) can be done by the pipeline_handler ControlInfoMap. So we\nonly need to extended the simple-pipeline rather than adding it here,\nlike all other pipeline handlers does.\n\nAm I right or did I miss something?\n\nRegards,\n  Marco\n\n\n> \n> >\n> >  \tunsigned int bufferCount;\n> >\n> > --\n> > 2.29.2\n> >\n> > _______________________________________________\n> > libcamera-devel mailing list\n> > libcamera-devel@lists.libcamera.org\n> > https://lists.libcamera.org/listinfo/libcamera-devel\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id A0FDDBDE44\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 Apr 2021 13:47:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 28281688DC;\n\tWed, 28 Apr 2021 15:47:07 +0200 (CEST)","from metis.ext.pengutronix.de (metis.ext.pengutronix.de\n\t[IPv6:2001:67c:670:201:290:27ff:fe1d:cc33])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2BA1A688DC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 Apr 2021 15:47:06 +0200 (CEST)","from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5])\n\tby metis.ext.pengutronix.de with esmtps\n\t(TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92)\n\t(envelope-from <mfe@pengutronix.de>)\n\tid 1lbkWv-0000nY-K3; Wed, 28 Apr 2021 15:47:05 +0200","from mfe by pty.hi.pengutronix.de with local (Exim 4.89)\n\t(envelope-from <mfe@pengutronix.de>)\n\tid 1lbkWv-00048b-1g; Wed, 28 Apr 2021 15:47:05 +0200"],"Date":"Wed, 28 Apr 2021 15:47:05 +0200","From":"Marco Felsch <m.felsch@pengutronix.de>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<20210428134705.czzrg7ovps3avh27@pengutronix.de>","References":"<20210322104242.31107-1-m.cichy@pengutronix.de>\n\t<20210322104242.31107-2-m.cichy@pengutronix.de>\n\t<20210322174322.f2rearztmii42rlh@uno.localdomain>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210322174322.f2rearztmii42rlh@uno.localdomain>","X-Sent-From":"Pengutronix Hildesheim","X-URL":"http://www.pengutronix.de/","X-IRC":"#ptxdist @freenode","X-Accept-Language":"de,en","X-Accept-Content-Type":"text/plain","X-Uptime":"15:22:07 up 147 days, 3:28, 49 users, load average: 0.28, 0.14, \n\t0.06","User-Agent":"NeoMutt/20170113 (1.7.2)","X-SA-Exim-Connect-IP":"2001:67c:670:100:1d::c5","X-SA-Exim-Mail-From":"mfe@pengutronix.de","X-SA-Exim-Scanned":"No (on metis.ext.pengutronix.de);\n\tSAEximRunCond expanded to false","X-PTX-Original-Recipient":"libcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: stream: Add\n\tcontrolList attribute","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","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>","Cc":"libcamera-devel@lists.libcamera.org, graphics@pengutronix.de,\n\tMarian Cichy <m.cichy@pengutronix.de>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":16685,"web_url":"https://patchwork.libcamera.org/comment/16685/","msgid":"<20210429085204.7cfitolsvcgminpg@uno.localdomain>","date":"2021-04-29T08:52:04","subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: stream: Add\n\tcontrolList attribute","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Marco,\n\nOn Wed, Apr 28, 2021 at 03:47:05PM +0200, Marco Felsch wrote:\n> Hi Jacopo,\n>\n> On 21-03-22 18:43, Jacopo Mondi wrote:\n> > Hi Marian,\n> >\n> > On Mon, Mar 22, 2021 at 11:42:40AM +0100, Marian Cichy wrote:\n> > > By adding a controlList to the stream attributes, we have access to\n> > > several more configuration parameters for a stream. In this patch\n> > > series, it is for now only used to access the frame duration of a sensor.\n> > >\n> > > Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>\n> > > ---\n> > >  include/libcamera/stream.h | 2 ++\n> > >  1 file changed, 2 insertions(+)\n> > >\n> > > diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\n> > > index bb47c390..a6347e31 100644\n> > > --- a/include/libcamera/stream.h\n> > > +++ b/include/libcamera/stream.h\n> > > @@ -13,6 +13,7 @@\n> > >  #include <vector>\n> > >\n> > >  #include <libcamera/buffer.h>\n> > > +#include <libcamera/controls.h>\n> > >  #include <libcamera/geometry.h>\n> > >  #include <libcamera/pixel_format.h>\n> > >\n> > > @@ -44,6 +45,7 @@ struct StreamConfiguration {\n> > >  \tSize size;\n> > >  \tunsigned int stride;\n> > >  \tunsigned int frameSize;\n> > > +\tControlList controls;\n> >\n> > Documentation is missing.\n> >\n> > In general, as discussed on irc, I guess this is an acceptable first\n> > step to be able to retrieve per-stream information.\n>\n> I picked up Marian's work to become familar with libcamera and now I\n> have my first question on this topic.\n\nWelcome on board :)\n\n>\n> Why is this necessary here? It think what we wanna do (retrieve the\n> framerate) can be done by the pipeline_handler ControlInfoMap. So we\n> only need to extended the simple-pipeline rather than adding it here,\n> like all other pipeline handlers does.\n\nDo you mean populating the Camera::contorls() info maps ?\n\nI tried to explain my understanding in my last reply to patch [2/3]\nhttps://patchwork.libcamera.org/patch/11639/\n\nI'll try to summarize it here:\n\n- The current frame duration (as well as other parameters) depend on\n  the currently applied configuration as they depend on what sizes/formats\n  are requested and how the sensor is configured.\n- The ControlInfoMap instances access through Camera::controls() are\n  initialized at pipeline creation time. We have to pick and euhristic\n  to decide which sensor configuration to use, as the Camera's ControlInfoMap\n  instances are populated using (also) the sensor's v4l2 controls, whose values\n  and limits depend on the current configuration [*]\n- Ideally, we would need a mechanism to update the Camera's\n  ControlInfoMaps when a new configuration is applied. It's a bit of\n  work, and would need to be a mchanism that all pipeline handler can\n  use [**]\n- As we don't have the above mechanism in place at the moment, the\n  easiest way to do allow libcamera to expose to applications\n  information that are configuration-dependent is to augment the\n  CameraConfiguration (or StreamConfiguration as in this case) with a\n  list of controls that report the current values\n- The 'issue' with this series is that Marian wanted to do at\n  Camera::generateConfiguration() time, which for the reasons\n  I tried to outline in https://patchwork.libcamera.org/patch/11639/\n  is not really possible.\n\nSo yes, we're missing a mechanism to\n1) Update the Camera::controls() when a Configuration is applied to\nthe Camera\n2) It could be worked around by adding controls to the\nconfiguration-dependent components (CameraConfiguration and\nStreamConfiguration)\n3) However this can only be done after a configuration has been\napplied and the sensor driver has been configured and its controls\nvalues and limits updated.\n\nMaybe there's an easier way out I might have missed, what do you think ?\n\nThanks\n   j\n\n[*] The most notable example is the VBLANK limits, that change\ndepending on the selected sensor's output sizes\n\n[**] RPi in example has a series that would allow to update the V4L2\ncontrols on format change https://patchwork.libcamera.org/patch/11797/\nThis is a first step. With an updated v4l2 control info, also the\nCamera's controls info can be updated.\n>\n> Am I right or did I miss something?\n>\n> Regards,\n>   Marco\n>\n>\n> >\n> > >\n> > >  \tunsigned int bufferCount;\n> > >\n> > > --\n> > > 2.29.2\n> > >\n> > > _______________________________________________\n> > > libcamera-devel mailing list\n> > > libcamera-devel@lists.libcamera.org\n> > > https://lists.libcamera.org/listinfo/libcamera-devel\n> > _______________________________________________\n> > libcamera-devel mailing list\n> > libcamera-devel@lists.libcamera.org\n> > https://lists.libcamera.org/listinfo/libcamera-devel\n> >\n>\n> --\n> Pengutronix e.K.                           |                             |\n> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |\n> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |\n> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id B0BC5BDE45\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 29 Apr 2021 08:51:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 142786890E;\n\tThu, 29 Apr 2021 10:51:24 +0200 (CEST)","from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net\n\t[217.70.183.198])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 246C060516\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 29 Apr 2021 10:51:23 +0200 (CEST)","from uno.localdomain (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 2F1F4C0011;\n\tThu, 29 Apr 2021 08:51:21 +0000 (UTC)"],"X-Originating-IP":"93.61.96.190","Date":"Thu, 29 Apr 2021 10:52:04 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Marco Felsch <m.felsch@pengutronix.de>","Message-ID":"<20210429085204.7cfitolsvcgminpg@uno.localdomain>","References":"<20210322104242.31107-1-m.cichy@pengutronix.de>\n\t<20210322104242.31107-2-m.cichy@pengutronix.de>\n\t<20210322174322.f2rearztmii42rlh@uno.localdomain>\n\t<20210428134705.czzrg7ovps3avh27@pengutronix.de>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210428134705.czzrg7ovps3avh27@pengutronix.de>","Subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: stream: Add\n\tcontrolList attribute","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","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>","Cc":"libcamera-devel@lists.libcamera.org, graphics@pengutronix.de,\n\tMarian Cichy <m.cichy@pengutronix.de>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":16686,"web_url":"https://patchwork.libcamera.org/comment/16686/","msgid":"<20210429095914.ypfqll4ylb2wtrs5@pengutronix.de>","date":"2021-04-29T09:59:14","subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: stream: Add\n\tcontrolList attribute","submitter":{"id":89,"url":"https://patchwork.libcamera.org/api/people/89/","name":"Marco Felsch","email":"m.felsch@pengutronix.de"},"content":"Hi Jacopo,\n\nOn 21-04-29 10:52, Jacopo Mondi wrote:\n> Hi Marco,\n> \n> On Wed, Apr 28, 2021 at 03:47:05PM +0200, Marco Felsch wrote:\n> > Hi Jacopo,\n> >\n> > On 21-03-22 18:43, Jacopo Mondi wrote:\n> > > Hi Marian,\n> > >\n> > > On Mon, Mar 22, 2021 at 11:42:40AM +0100, Marian Cichy wrote:\n> > > > By adding a controlList to the stream attributes, we have access to\n> > > > several more configuration parameters for a stream. In this patch\n> > > > series, it is for now only used to access the frame duration of a sensor.\n> > > >\n> > > > Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>\n> > > > ---\n> > > >  include/libcamera/stream.h | 2 ++\n> > > >  1 file changed, 2 insertions(+)\n> > > >\n> > > > diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\n> > > > index bb47c390..a6347e31 100644\n> > > > --- a/include/libcamera/stream.h\n> > > > +++ b/include/libcamera/stream.h\n> > > > @@ -13,6 +13,7 @@\n> > > >  #include <vector>\n> > > >\n> > > >  #include <libcamera/buffer.h>\n> > > > +#include <libcamera/controls.h>\n> > > >  #include <libcamera/geometry.h>\n> > > >  #include <libcamera/pixel_format.h>\n> > > >\n> > > > @@ -44,6 +45,7 @@ struct StreamConfiguration {\n> > > >  \tSize size;\n> > > >  \tunsigned int stride;\n> > > >  \tunsigned int frameSize;\n> > > > +\tControlList controls;\n> > >\n> > > Documentation is missing.\n> > >\n> > > In general, as discussed on irc, I guess this is an acceptable first\n> > > step to be able to retrieve per-stream information.\n> >\n> > I picked up Marian's work to become familar with libcamera and now I\n> > have my first question on this topic.\n> \n> Welcome on board :)\n> \n> >\n> > Why is this necessary here? It think what we wanna do (retrieve the\n> > framerate) can be done by the pipeline_handler ControlInfoMap. So we\n> > only need to extended the simple-pipeline rather than adding it here,\n> > like all other pipeline handlers does.\n> \n> Do you mean populating the Camera::contorls() info maps ?\n\nYep.\n\n> I tried to explain my understanding in my last reply to patch [2/3]\n> https://patchwork.libcamera.org/patch/11639/\n> \n> I'll try to summarize it here:\n> \n> - The current frame duration (as well as other parameters) depend on\n>   the currently applied configuration as they depend on what sizes/formats\n>   are requested and how the sensor is configured.\n\nYes.\n\n> - The ControlInfoMap instances access through Camera::controls() are\n>   initialized at pipeline creation time. We have to pick and euhristic\n>   to decide which sensor configuration to use, as the Camera's ControlInfoMap\n>   instances are populated using (also) the sensor's v4l2 controls, whose values\n>   and limits depend on the current configuration [*]\n\nYes, this was the next topic I thought about. Currently there is no way\nto defer the initializiation for such controls?\n\n> - Ideally, we would need a mechanism to update the Camera's\n>   ControlInfoMaps when a new configuration is applied. It's a bit of\n>   work, and would need to be a mchanism that all pipeline handler can\n>   use [**]\n\nThanks for that pointer.\n\n> - As we don't have the above mechanism in place at the moment, the\n>   easiest way to do allow libcamera to expose to applications\n>   information that are configuration-dependent is to augment the\n>   CameraConfiguration (or StreamConfiguration as in this case) with a\n>   list of controls that report the current values\n\nBut in that case we should mark it as RO so users are not trying to\nchange the controls by StreamConfiguration. In other words, it should\nonly mirror the values. In that case the controls are frame based too.\n\n> - The 'issue' with this series is that Marian wanted to do at\n>   Camera::generateConfiguration() time, which for the reasons\n>   I tried to outline in https://patchwork.libcamera.org/patch/11639/\n>   is not really possible.\n\nI've just wanted to gather more information, why this solution was\ntaken. Thanks for this :)\n\n> So yes, we're missing a mechanism to\n> 1) Update the Camera::controls() when a Configuration is applied to\n> the Camera\n> 2) It could be worked around by adding controls to the\n> configuration-dependent components (CameraConfiguration and\n> StreamConfiguration)\n> 3) However this can only be done after a configuration has been\n> applied and the sensor driver has been configured and its controls\n> values and limits updated.\n> \n> Maybe there's an easier way out I might have missed, what do you think ?\n\nCurrently I'm not that deep into libcamera.. so I'm maybe the wrong\nperson. I would try to avoid duplications for the users. I'm now know\nthe problem. Currently we can't init to some value which let the user\nknow that it has to be initialized after the first configuration\nhappend. Then we also need something like [**] to update the it control\nif there is a need to.\n\nRegards,\n  Marco\n\n> \n> Thanks\n>    j\n> \n> [*] The most notable example is the VBLANK limits, that change\n> depending on the selected sensor's output sizes\n> \n> [**] RPi in example has a series that would allow to update the V4L2\n> controls on format change https://patchwork.libcamera.org/patch/11797/\n> This is a first step. With an updated v4l2 control info, also the\n> Camera's controls info can be updated.\n> >\n> > Am I right or did I miss something?\n> >\n> > Regards,\n> >   Marco\n> >\n> >\n> > >\n> > > >\n> > > >  \tunsigned int bufferCount;\n> > > >\n> > > > --\n> > > > 2.29.2\n> > > >\n> > > > _______________________________________________\n> > > > libcamera-devel mailing list\n> > > > libcamera-devel@lists.libcamera.org\n> > > > https://lists.libcamera.org/listinfo/libcamera-devel\n> > > _______________________________________________\n> > > libcamera-devel mailing list\n> > > libcamera-devel@lists.libcamera.org\n> > > https://lists.libcamera.org/listinfo/libcamera-devel\n> > >\n> >\n> > --\n> > Pengutronix e.K.                           |                             |\n> > Steuerwalder Str. 21                       | http://www.pengutronix.de/  |\n> > 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |\n> > Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id AD930BDE45\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 29 Apr 2021 09:59:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3399E6890D;\n\tThu, 29 Apr 2021 11:59:18 +0200 (CEST)","from metis.ext.pengutronix.de (metis.ext.pengutronix.de\n\t[IPv6:2001:67c:670:201:290:27ff:fe1d:cc33])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B832460516\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 29 Apr 2021 11:59:16 +0200 (CEST)","from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5])\n\tby metis.ext.pengutronix.de with esmtps\n\t(TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92)\n\t(envelope-from <mfe@pengutronix.de>)\n\tid 1lc3Rz-0000GG-CS; Thu, 29 Apr 2021 11:59:15 +0200","from mfe by pty.hi.pengutronix.de with local (Exim 4.89)\n\t(envelope-from <mfe@pengutronix.de>)\n\tid 1lc3Ry-00035j-8Y; Thu, 29 Apr 2021 11:59:14 +0200"],"Date":"Thu, 29 Apr 2021 11:59:14 +0200","From":"Marco Felsch <m.felsch@pengutronix.de>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<20210429095914.ypfqll4ylb2wtrs5@pengutronix.de>","References":"<20210322104242.31107-1-m.cichy@pengutronix.de>\n\t<20210322104242.31107-2-m.cichy@pengutronix.de>\n\t<20210322174322.f2rearztmii42rlh@uno.localdomain>\n\t<20210428134705.czzrg7ovps3avh27@pengutronix.de>\n\t<20210429085204.7cfitolsvcgminpg@uno.localdomain>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210429085204.7cfitolsvcgminpg@uno.localdomain>","X-Sent-From":"Pengutronix Hildesheim","X-URL":"http://www.pengutronix.de/","X-IRC":"#ptxdist @freenode","X-Accept-Language":"de,en","X-Accept-Content-Type":"text/plain","X-Uptime":"11:04:01 up 147 days, 23:10, 46 users, load average: 0.10, 0.09, \n\t0.09","User-Agent":"NeoMutt/20170113 (1.7.2)","X-SA-Exim-Connect-IP":"2001:67c:670:100:1d::c5","X-SA-Exim-Mail-From":"mfe@pengutronix.de","X-SA-Exim-Scanned":"No (on metis.ext.pengutronix.de);\n\tSAEximRunCond expanded to false","X-PTX-Original-Recipient":"libcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: stream: Add\n\tcontrolList attribute","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","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>","Cc":"libcamera-devel@lists.libcamera.org, graphics@pengutronix.de,\n\tMarian Cichy <m.cichy@pengutronix.de>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]