[{"id":37128,"web_url":"https://patchwork.libcamera.org/comment/37128/","msgid":"<176458459684.3882822.14462417524219971270@neptunite.rasen.tech>","date":"2025-12-01T10:23:16","subject":"Re: [PATCH v2 1/3] libcamera: request: Create control list with\n\tCamera info map","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Quoting Jacopo Mondi (2025-11-26 18:38:51)\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> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\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>                                     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 4ECA6C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Dec 2025 10:23:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 56E0960ABD;\n\tMon,  1 Dec 2025 11:23:24 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 082F9609D8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Dec 2025 11:23:23 +0100 (CET)","from neptunite.rasen.tech (unknown\n\t[IPv6:2404:7a81:160:2100:67cc:a360:f133:b401])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 6A419B7D;\n\tMon,  1 Dec 2025 11:21:09 +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=\"g+9B9UQf\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1764584469;\n\tbh=WLp+sAuWD68Mfv3Xk3lAWr0+pban7cLqMtmTZxrjxDY=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=g+9B9UQf9rzW0sk0DQwN3OwJSRVu5phX1YxY4MAcHGFPFrEKYNVpVpMphN6uJ4ugp\n\tIHrGpzsX3rfojnMUcyV1W63VYsvF8k2kuCBdEEwvNZLks3CodOn6txKZtevkYh0oCI\n\tVNkanOxt3iRETYIFLD268S3hcP02qFpRkyIIHoKc=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20251126-cam-control-override-v2-1-305024a1f190@ideasonboard.com>","References":"<20251126-cam-control-override-v2-0-305024a1f190@ideasonboard.com>\n\t<20251126-cam-control-override-v2-1-305024a1f190@ideasonboard.com>","Subject":"Re: [PATCH v2 1/3] libcamera: request: Create control list with\n\tCamera info map","From":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 01 Dec 2025 19:23:16 +0900","Message-ID":"<176458459684.3882822.14462417524219971270@neptunite.rasen.tech>","User-Agent":"alot/0.0.0","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>"}}]