[{"id":37035,"web_url":"https://patchwork.libcamera.org/comment/37035/","msgid":"<176400438055.567526.13607480804819620774@ping.linuxembedded.co.uk>","date":"2025-11-24T17:13:00","subject":"Re: [PATCH RFC 2/2] libcamera: request: Create control list with\n\tCamera info map","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Jacopo Mondi (2025-11-24 16:43:45)\n> The control lists associated with a Request is created with the global\n> libcamera::controls::controls id map.\n> \n> This is fine as the idmap/info map used to contruct a ControlList are not\n> used for any control validation purposes by the libcamera code.\n> \n> However creating a ControlList with the camera ControlInfoMap has two\n> advantages:\n> \n> 1) The idmap can be extracted from the info map, but not the other way\n>    around\n> 2) The control list is constructed with a valid map of info to the\n>    controls it can actually supports, instead of the global map of\n>    libcamera controls\n> \n> Initialize the ControlList part of a Request with the Camera control\n> info map, as the association between a Request and a Camera is permanent\n> and valid for the whole lifetime of a Request.\n> \n> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> ---\n>  src/libcamera/request.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp\n> index 60565f5984971c7ab34e119a15b8141799f71071..2544a059f6984d930ec909c74e0b621c9fe82726 100644\n> --- a/src/libcamera/request.cpp\n> +++ b/src/libcamera/request.cpp\n> @@ -356,7 +356,7 @@ Request::Request(Camera *camera, uint64_t cookie)\n>         : Extensible(std::make_unique<Private>(camera)),\n>           cookie_(cookie), status_(RequestPending)\n>  {\n> -       controls_ = new ControlList(controls::controls,\n> +       controls_ = new ControlList(camera->controls(),\n\nI see what you mean, this does look so obvious it should have been like\nthis from the start ...\n\nDoes the Request now have a copy of the info map - or will it have an\ninternal pointer to the most up to date info map ? (As in - will it\nalways be up to date when things like exposure limits are updated?)\n\n--\nKieran\n\n>                                     camera->_d()->validator());\n>  \n>         /**\n> \n> -- \n> 2.51.1\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 7D389C32DE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 Nov 2025 17:13:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9673860A80;\n\tMon, 24 Nov 2025 18:13:04 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 198A86096B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Nov 2025 18:13:03 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8AD552C5;\n\tMon, 24 Nov 2025 18:10:54 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"m4j3qSRL\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1764004254;\n\tbh=NNSHN6RTSw9XLut0HZxI4F5boOTe0S8ubzYfPKUbe1c=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=m4j3qSRLVXQnIsI5gVfprmQnniJWIUdLU+0t00r1pQ57lILAOw6BsEjHwMI8CQ1VR\n\t9SdtBL0BZ7fGB42819NaU3t3/CFKx+1aSk7tfFkT2JuoYi0++UYAwk2Y0lZlzvKFEZ\n\tZJ4lDtn7JfHOzTNX07H52V87f8V1lc3qy2E5w+NE=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20251124-cam-control-override-v1-2-dfc3a2f3feee@ideasonboard.com>","References":"<20251124-cam-control-override-v1-0-dfc3a2f3feee@ideasonboard.com>\n\t<20251124-cam-control-override-v1-2-dfc3a2f3feee@ideasonboard.com>","Subject":"Re: [PATCH RFC 2/2] libcamera: request: Create control list with\n\tCamera info map","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 24 Nov 2025 17:13:00 +0000","Message-ID":"<176400438055.567526.13607480804819620774@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":37042,"web_url":"https://patchwork.libcamera.org/comment/37042/","msgid":"<z4frktboftiqlnjc7kol56hytvko4qthcl2hexjinth6ei3xn2@4ch3as6ckxjx>","date":"2025-11-25T07:49:59","subject":"Re: [PATCH RFC 2/2] libcamera: request: Create control list with\n\tCamera info map","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Kieran\n\nOn Mon, Nov 24, 2025 at 05:13:00PM +0000, Kieran Bingham wrote:\n> Quoting Jacopo Mondi (2025-11-24 16:43:45)\n> > The control lists associated with a Request is created with the global\n> > libcamera::controls::controls id map.\n> >\n> > This is fine as the idmap/info map used to contruct a ControlList are not\n> > used for any control validation purposes by the libcamera code.\n> >\n> > However creating a ControlList with the camera ControlInfoMap has two\n> > advantages:\n> >\n> > 1) The idmap can be extracted from the info map, but not the other way\n> >    around\n> > 2) The control list is constructed with a valid map of info to the\n> >    controls it can actually supports, instead of the global map of\n> >    libcamera controls\n> >\n> > Initialize the ControlList part of a Request with the Camera control\n> > info map, as the association between a Request and a Camera is permanent\n> > and valid for the whole lifetime of a Request.\n> >\n> > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> > ---\n> >  src/libcamera/request.cpp | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> >\n> > diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp\n> > index 60565f5984971c7ab34e119a15b8141799f71071..2544a059f6984d930ec909c74e0b621c9fe82726 100644\n> > --- a/src/libcamera/request.cpp\n> > +++ b/src/libcamera/request.cpp\n> > @@ -356,7 +356,7 @@ Request::Request(Camera *camera, uint64_t cookie)\n> >         : Extensible(std::make_unique<Private>(camera)),\n> >           cookie_(cookie), status_(RequestPending)\n> >  {\n> > -       controls_ = new ControlList(controls::controls,\n> > +       controls_ = new ControlList(camera->controls(),\n>\n> I see what you mean, this does look so obvious it should have been like\n> this from the start ...\n\nIsn't it ? I feel like I'm overlooking something\n\n>\n> Does the Request now have a copy of the info map - or will it have an\n> internal pointer to the most up to date info map ? (As in - will it\n> always be up to date when things like exposure limits are updated?)\n\nGranted we still don't have a reliable way to update ControlInfo as\nper my latest discussions on wanting to updated ExposureTime limits on\nFrameDurationLimits change, infoMap_ is a pointer in ControlList, so\nno copies, just a reference.\n\nThanks\n  j\n\n>\n> --\n> Kieran\n>\n> >                                     camera->_d()->validator());\n> >\n> >         /**\n> >\n> > --\n> > 2.51.1\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 20B9DC32EF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 Nov 2025 07:50:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1549560A9D;\n\tTue, 25 Nov 2025 08:50:05 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B2502608CF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Nov 2025 08:50:03 +0100 (CET)","from ideasonboard.com (mob-5-90-51-179.net.vodafone.it\n\t[5.90.51.179])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5698E524;\n\tTue, 25 Nov 2025 08:47:54 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"aLLVAxL1\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1764056874;\n\tbh=mgdASa3nqzjb8H0dRK4XzTrqp/FaCHgK/WWN+Asr9Uw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=aLLVAxL1sUdNY7vQLd//NrH6ECi9F2vBPMnu85MXSY8sE0c+TRtGkutU9IPkps74N\n\tb1BhlaMmErHQdhhom7CTpiYOU5UM/+COwypPHdqODtqByGJSF6C0rNo8TJKBNJ1U20\n\tUdTw6OblgPChAWcNsggVpKKA0s0KEy5qoSDv4Ea8=","Date":"Tue, 25 Nov 2025 08:49:59 +0100","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>, \n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH RFC 2/2] libcamera: request: Create control list with\n\tCamera info map","Message-ID":"<z4frktboftiqlnjc7kol56hytvko4qthcl2hexjinth6ei3xn2@4ch3as6ckxjx>","References":"<20251124-cam-control-override-v1-0-dfc3a2f3feee@ideasonboard.com>\n\t<20251124-cam-control-override-v1-2-dfc3a2f3feee@ideasonboard.com>\n\t<176400438055.567526.13607480804819620774@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<176400438055.567526.13607480804819620774@ping.linuxembedded.co.uk>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":37119,"web_url":"https://patchwork.libcamera.org/comment/37119/","msgid":"<03c6d5dd-aae8-4563-85b6-2d4c964418ac@ideasonboard.com>","date":"2025-12-01T09:35:42","subject":"Re: [PATCH RFC 2/2] libcamera: request: Create control list with\n\tCamera info map","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2025. 11. 25. 8:49 keltezéssel, Jacopo Mondi írta:\n> Hi Kieran\n> \n> On Mon, Nov 24, 2025 at 05:13:00PM +0000, Kieran Bingham wrote:\n>> Quoting Jacopo Mondi (2025-11-24 16:43:45)\n>>> The control lists associated with a Request is created with the global\n>>> libcamera::controls::controls id map.\n>>>\n>>> This is fine as the idmap/info map used to contruct a ControlList are not\n>>> used for any control validation purposes by the libcamera code.\n>>>\n>>> However creating a ControlList with the camera ControlInfoMap has two\n>>> advantages:\n>>>\n>>> 1) The idmap can be extracted from the info map, but not the other way\n>>>     around\n>>> 2) The control list is constructed with a valid map of info to the\n>>>     controls it can actually supports, instead of the global map of\n>>>     libcamera controls\n>>>\n>>> Initialize the ControlList part of a Request with the Camera control\n>>> info map, as the association between a Request and a Camera is permanent\n>>> and valid for the whole lifetime of a Request.\n>>>\n>>> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n>>> ---\n>>>   src/libcamera/request.cpp | 2 +-\n>>>   1 file changed, 1 insertion(+), 1 deletion(-)\n>>>\n>>> diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp\n>>> index 60565f5984971c7ab34e119a15b8141799f71071..2544a059f6984d930ec909c74e0b621c9fe82726 100644\n>>> --- a/src/libcamera/request.cpp\n>>> +++ b/src/libcamera/request.cpp\n>>> @@ -356,7 +356,7 @@ Request::Request(Camera *camera, uint64_t cookie)\n>>>          : Extensible(std::make_unique<Private>(camera)),\n>>>            cookie_(cookie), status_(RequestPending)\n>>>   {\n>>> -       controls_ = new ControlList(controls::controls,\n>>> +       controls_ = new ControlList(camera->controls(),\n>>\n>> I see what you mean, this does look so obvious it should have been like\n>> this from the start ...\n> \n> Isn't it ? I feel like I'm overlooking something\n\nI think this will only really affect the serialization parts. Specifically,\n`IPADataSerializer<ControlList>::serialize()` and `ControlSerializer::serialize()`\nmight do more work since `ControlList::infoMap()` is no longer nullptr.\n\n\n> \n>>\n>> Does the Request now have a copy of the info map - or will it have an\n>> internal pointer to the most up to date info map ? (As in - will it\n>> always be up to date when things like exposure limits are updated?)\n> \n> Granted we still don't have a reliable way to update ControlInfo as\n> per my latest discussions on wanting to updated ExposureTime limits on\n> FrameDurationLimits change, infoMap_ is a pointer in ControlList, so\n> no copies, just a reference.\n> \n> Thanks\n>    j\n> \n>>\n>> --\n>> Kieran\n>>\n>>>                                      camera->_d()->validator());\n>>>\n>>>          /**\n>>>\n>>> --\n>>> 2.51.1\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 2BCFDC0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Dec 2025 09:35:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C3FEB60AB0;\n\tMon,  1 Dec 2025 10:35:47 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 94A49609D8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Dec 2025 10:35:46 +0100 (CET)","from [192.168.33.24] (185.182.214.104.nat.pool.zt.hu\n\t[185.182.214.104])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5FFBF4F1;\n\tMon,  1 Dec 2025 10:33:33 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Uq/LUf3A\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1764581613;\n\tbh=Wc9OsJqJDGVg1dyoXEMvQr0hP6ObjU0R9CBQuIIuz2o=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=Uq/LUf3A6QmGm7iC/2/EhowEwTuGGTMiNcV1Zezy17qPhHNeqsvS/YRO3sVnDmcos\n\t6gwL6yBqJDkwAwkqJB9rP3ScBS8YYKGumJu+IqKNxzEbaG4ZCaUKOaAc7QPqf901B6\n\th2OGw7AJX1+924yBdSmaSrUqScIETV/Z7q0Y3E/4=","Message-ID":"<03c6d5dd-aae8-4563-85b6-2d4c964418ac@ideasonboard.com>","Date":"Mon, 1 Dec 2025 10:35:42 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH RFC 2/2] libcamera: request: Create control list with\n\tCamera info map","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20251124-cam-control-override-v1-0-dfc3a2f3feee@ideasonboard.com>\n\t<20251124-cam-control-override-v1-2-dfc3a2f3feee@ideasonboard.com>\n\t<176400438055.567526.13607480804819620774@ping.linuxembedded.co.uk>\n\t<z4frktboftiqlnjc7kol56hytvko4qthcl2hexjinth6ei3xn2@4ch3as6ckxjx>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<z4frktboftiqlnjc7kol56hytvko4qthcl2hexjinth6ei3xn2@4ch3as6ckxjx>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]