{"id":27557,"url":"https://patchwork.libcamera.org/api/patches/27557/?format=json","web_url":"https://patchwork.libcamera.org/patch/27557/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260803131435.153927-9-barnabas.pocze@ideasonboard.com>","date":"2026-08-03T13:13:53","name":"[RFC,v3,08/50] ipa: rkisp1: updateControls(): Use sensor info from context","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"de30c7afa7cc2fb3a2fc09e1cf00b78d4216af26","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/?format=json","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/27557/mbox/","series":[{"id":6103,"url":"https://patchwork.libcamera.org/api/series/6103/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=6103","date":"2026-08-03T13:13:45","name":"ipa: libipa: agc rework","version":3,"mbox":"https://patchwork.libcamera.org/series/6103/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/27557/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/27557/checks/","tags":{},"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 7866ABDE4C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  3 Aug 2026 13:15:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 26F37680A1;\n\tMon,  3 Aug 2026 15:14:48 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DB33D6807A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  3 Aug 2026 15:14:40 +0200 (CEST)","from pb-laptop.local (185.221.141.208.nat.pool.zt.hu\n\t[185.221.141.208])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E8A995B3;\n\tMon,  3 Aug 2026 15:13:31 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"lBFL5v8o\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1785762812;\n\tbh=s+zEl0hHYLEoNlZPFsVZH8RWfTKgkrGwd5gnrgCgLxk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=lBFL5v8oNwp3PUK/UjK9qBy3H4oz6sao8YeX83m1jErnwZsNV6MRywH+HTAHu6im+\n\tdIgT9zfLtM6wwwPSILWjK9vZcG5HLwX9ol3OAR1oojZbWRGNUvNhnNlcuhwgwtQjXa\n\t029o15xosxmxSNrMfUB2LBwHhN3dGBLoirYevdmc=","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>","Subject":"[RFC PATCH v3 08/50] ipa: rkisp1: updateControls(): Use sensor info\n\tfrom context","Date":"Mon,  3 Aug 2026 15:13:53 +0200","Message-ID":"<20260803131435.153927-9-barnabas.pocze@ideasonboard.com>","X-Mailer":"git-send-email 2.55.0","In-Reply-To":"<20260803131435.153927-1-barnabas.pocze@ideasonboard.com>","References":"<20260803131435.153927-1-barnabas.pocze@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","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>"},"content":"It is already available so do not take it as a parameter.\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/ipa/rkisp1/rkisp1.cpp | 28 +++++++++++++---------------\n 1 file changed, 13 insertions(+), 15 deletions(-)","diff":"diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex b31d5b59a8..66a91c4d79 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -74,8 +74,7 @@ protected:\n \tstd::string logPrefix() const override;\n \n private:\n-\tvoid updateControls(const IPACameraSensorInfo &sensorInfo,\n-\t\t\t    ControlInfoMap *ipaControls);\n+\tvoid updateControls(ControlInfoMap *ipaControls);\n \tvoid setControls(unsigned int frame);\n \n \tstd::map<unsigned int, FrameBuffer> buffers_;\n@@ -205,7 +204,7 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision,\n \t\treturn ret;\n \n \t/* Initialize controls. */\n-\tupdateControls(sensorInfo, ipaControls);\n+\tupdateControls(ipaControls);\n \n \treturn 0;\n }\n@@ -247,12 +246,12 @@ int IPARkISP1::configure(const IPAConfigInfo &ipaConfig,\n \n \tcontext_.configuration.paramFormat = ipaConfig.paramFormat;\n \n-\tconst IPACameraSensorInfo &info = ipaConfig.sensorInfo;\n-\tcontext_.configuration.sensor.size = info.outputSize;\n-\tcontext_.configuration.sensor.lineDuration = info.minLineLength * 1.0s / info.pixelRate;\n+\tcontext_.configuration.sensor.size = context_.sensorInfo.outputSize;\n+\tcontext_.configuration.sensor.lineDuration = context_.sensorInfo.minLineLength * 1.0s\n+\t\t\t\t\t\t\t/ context_.sensorInfo.pixelRate;\n \n \t/* Update the camera controls using the new sensor settings. */\n-\tupdateControls(info, ipaControls);\n+\tupdateControls(ipaControls);\n \n \t/*\n \t * When the AGC computes the new exposure values for a frame, it needs\n@@ -285,7 +284,7 @@ int IPARkISP1::configure(const IPAConfigInfo &ipaConfig,\n \t\tif (algo->disabled_)\n \t\t\tcontinue;\n \n-\t\tint ret = algo->configure(context_, info);\n+\t\tint ret = algo->configure(context_, context_.sensorInfo);\n \t\tif (ret)\n \t\t\treturn ret;\n \t}\n@@ -383,8 +382,7 @@ void IPARkISP1::processStats(const uint32_t frame, const uint32_t bufferId,\n \tmetadataReady.emit(frame, metadata);\n }\n \n-void IPARkISP1::updateControls(const IPACameraSensorInfo &sensorInfo,\n-\t\t\t       ControlInfoMap *ipaControls)\n+void IPARkISP1::updateControls(ControlInfoMap *ipaControls)\n {\n \tControlInfoMap::Map ctrlMap = rkisp1Controls;\n \n@@ -418,19 +416,19 @@ void IPARkISP1::updateControls(const IPACameraSensorInfo &sensorInfo,\n \t */\n \tconst ControlInfo &v4l2HBlank = context_.sensorControls.find(V4L2_CID_HBLANK)->second;\n \tuint32_t hblank = v4l2HBlank.def().get<int32_t>();\n-\tuint32_t lineLength = sensorInfo.outputSize.width + hblank;\n+\tuint32_t lineLength = context_.sensorInfo.outputSize.width + hblank;\n \n \tconst ControlInfo &v4l2VBlank = context_.sensorControls.find(V4L2_CID_VBLANK)->second;\n \tstd::array<uint32_t, 3> frameHeights{\n-\t\tv4l2VBlank.min().get<int32_t>() + sensorInfo.outputSize.height,\n-\t\tv4l2VBlank.max().get<int32_t>() + sensorInfo.outputSize.height,\n-\t\tv4l2VBlank.def().get<int32_t>() + sensorInfo.outputSize.height,\n+\t\tv4l2VBlank.min().get<int32_t>() + context_.sensorInfo.outputSize.height,\n+\t\tv4l2VBlank.max().get<int32_t>() + context_.sensorInfo.outputSize.height,\n+\t\tv4l2VBlank.def().get<int32_t>() + context_.sensorInfo.outputSize.height,\n \t};\n \n \tstd::array<int64_t, 3> frameDurations;\n \tfor (unsigned int i = 0; i < frameHeights.size(); ++i) {\n \t\tuint64_t frameSize = lineLength * frameHeights[i];\n-\t\tframeDurations[i] = frameSize / (sensorInfo.pixelRate / 1000000U);\n+\t\tframeDurations[i] = frameSize / (context_.sensorInfo.pixelRate / 1000000U);\n \t}\n \n \t/* \\todo Move this (and other agc-related controls) to agc */\n","prefixes":["RFC","v3","08/50"]}