From a8b8485aca773836cb33a2e10db92b4f6044896c Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Mon, 24 Nov 2025 17:19:22 +0100 Subject: [PATCH] libcamera: request: Create control list with Camera info map The control lists associated with a Request is created with the global libcamera::controls::controls id map. This is fine as the idmap/info map used to contruct a ControlList are not used for any control validation purposes by the libcamera code. However creating a ControlList with the camera ControlInfoMap has two advantages: 1) The idmap can be extracted from the info map, but not the other way around 2) The control list is constructed with a valid map of info to the controls it can actually supports, instead of the global map of libcamera controls Initialize the ControlList part of a Request with the Camera control info map, as the association between a Request and a Camera is permanent and valid for the whole lifetime of a Request. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder Reviewed-by: Daniel Scally --- src/libcamera/request.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp index 60565f59..2544a059 100644 --- a/src/libcamera/request.cpp +++ b/src/libcamera/request.cpp @@ -356,7 +356,7 @@ Request::Request(Camera *camera, uint64_t cookie) : Extensible(std::make_unique(camera)), cookie_(cookie), status_(RequestPending) { - controls_ = new ControlList(controls::controls, + controls_ = new ControlList(camera->controls(), camera->_d()->validator()); /**