{"id":27186,"url":"https://patchwork.libcamera.org/api/patches/27186/?format=json","web_url":"https://patchwork.libcamera.org/patch/27186/","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":"<20260703153819.1088752-8-barnabas.pocze@ideasonboard.com>","date":"2026-07-03T15:38:09","name":"[RFC,v1,07/17] 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/27186/mbox/","series":[{"id":6036,"url":"https://patchwork.libcamera.org/api/series/6036/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=6036","date":"2026-07-03T15:38:02","name":"ipa: libipa: agc rework","version":1,"mbox":"https://patchwork.libcamera.org/series/6036/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/27186/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/27186/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 ACC9FC3261\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  3 Jul 2026 15:38:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D3D7165FDF;\n\tFri,  3 Jul 2026 17:38:33 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4BB9965FD0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  3 Jul 2026 17:38:24 +0200 (CEST)","from pb-laptop.local (185.221.140.128.nat.pool.zt.hu\n\t[185.221.140.128])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4170CDF3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  3 Jul 2026 17:37:38 +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=\"OgfttVzu\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1783093058;\n\tbh=i4goCozmdZQvtFjLSpkj3E1ghO59Uy5NOL7ZrJ7hOMw=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=OgfttVzusZ8QMTLHgv0VxMbxROaDpm5ZNmsCt19EGx5g6ro/FSTstE0shlgsHo+Bd\n\tn4J6s/7h8Pz4cvVtkZxDHtURvZ0b9+1ExOWU296/QdTZlYm6JL/PN3mXfFws2Fg1Rr\n\tZznHfIZbEXRqE8vclSHNIz+yoXfCRcnCD7RnfxMM=","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Subject":"[RFC PATCH v1 07/17] ipa: rkisp1: updateControls(): Use sensor info\n\tfrom context","Date":"Fri,  3 Jul 2026 17:38:09 +0200","Message-ID":"<20260703153819.1088752-8-barnabas.pocze@ideasonboard.com>","X-Mailer":"git-send-email 2.54.0","In-Reply-To":"<20260703153819.1088752-1-barnabas.pocze@ideasonboard.com>","References":"<20260703153819.1088752-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>\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","v1","07/17"]}