{"id":16469,"url":"https://patchwork.libcamera.org/api/1.1/patches/16469/?format=json","web_url":"https://patchwork.libcamera.org/patch/16469/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20220630133902.321099-13-jacopo@jmondi.org>","date":"2022-06-30T13:38:51","name":"[libcamera-devel,v3,12/23] libcamera: ipu3: Drop DelayedControls","commit_ref":null,"pull_url":null,"state":"not-applicable","archived":true,"hash":"d448a964cabae358e07f31dd7ee193c78b926197","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/16469/mbox/","series":[{"id":3238,"url":"https://patchwork.libcamera.org/api/1.1/series/3238/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3238","date":"2022-06-30T13:38:39","name":"Internal controls, sensor delays and IPA rework","version":3,"mbox":"https://patchwork.libcamera.org/series/3238/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16469/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16469/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 9FCAFC3273\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 Jun 2022 13:39:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 59BD3656A8;\n\tThu, 30 Jun 2022 15:39:40 +0200 (CEST)","from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::221])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 332BD65699\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Jun 2022 15:39:34 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id DCA2F240015;\n\tThu, 30 Jun 2022 13:39:32 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656596380;\n\tbh=n67kfmPtKbblafw6iA5kXJUSwapYI5FBnoFF2b5ESug=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=JqRoca3wxQfkWeQDn5JJTnJR5gXzGe1MnbJPRoaNgEhwspcoPWolUFo26xWA9QtbP\n\tU1LJSYaPakQ8gaShQlhF2zyysXKnF57eKFt2C0OnstqjSTik6VVLyWdGKk9tVQ3aBs\n\t2v/HKi3myAgsndFJU/IOClVq0nr/K/NZqnidqUr5XEY4Hg+j0eUidOIerviklqbOU1\n\tKWl0CqBASYNtvF32qOwBs4HaaQbGSp5G1t+ZpLiVXV01IQWMH1QjYy6SBnb1hZEXum\n\t3Ue2iQfMBF7L3jiiNK4I0B/0q/dZDrHjUnh8NAGHeIsKHmdXJ8oRr42q/m0tLn4gHn\n\t6RAr3RqxltOeA==","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 30 Jun 2022 15:38:51 +0200","Message-Id":"<20220630133902.321099-13-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.36.1","In-Reply-To":"<20220630133902.321099-1-jacopo@jmondi.org>","References":"<20220630133902.321099-1-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 12/23] libcamera: ipu3: Drop\n\tDelayedControls","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Now that the CameraSensor class exposes the DelayedControl interface\nuse the sensor to operate controls.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 17 ++++++-----------\n 1 file changed, 6 insertions(+), 11 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 85e5f8a70408..a5a35b6585c6 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -26,7 +26,6 @@\n #include \"libcamera/internal/camera.h\"\n #include \"libcamera/internal/camera_lens.h\"\n #include \"libcamera/internal/camera_sensor.h\"\n-#include \"libcamera/internal/delayed_controls.h\"\n #include \"libcamera/internal/device_enumerator.h\"\n #include \"libcamera/internal/framebuffer.h\"\n #include \"libcamera/internal/ipa_manager.h\"\n@@ -74,7 +73,6 @@ public:\n \tbool supportsFlips_;\n \tTransform rotationTransform_;\n \n-\tstd::unique_ptr<DelayedControls> delayedCtrls_;\n \tIPU3Frames frameInfos_;\n \n \tstd::unique_ptr<ipa::ipu3::IPAProxyIPU3> ipa_;\n@@ -785,8 +783,6 @@ int PipelineHandlerIPU3::start(Camera *camera, [[maybe_unused]] const ControlLis\n \tif (ret)\n \t\tgoto error;\n \n-\tdata->delayedCtrls_->reset();\n-\n \t/*\n \t * Start the ImgU video devices, buffers will be queued to the\n \t * ImgU output and viewfinder when requests will be queued.\n@@ -1136,9 +1132,6 @@ int PipelineHandlerIPU3::registerCameras()\n \t\t\t{ V4L2_CID_EXPOSURE, { 2, false } },\n \t\t};\n \n-\t\tdata->delayedCtrls_ =\n-\t\t\tstd::make_unique<DelayedControls>(cio2->sensor()->device(),\n-\t\t\t\t\t\t\t  params);\n \t\tdata->cio2_.frameStart().connect(data.get(),\n \t\t\t\t\t\t &IPU3CameraData::frameStart);\n \n@@ -1258,9 +1251,11 @@ void IPU3CameraData::setSensorControls([[maybe_unused]] unsigned int id,\n \t\t\t\t       const ControlList &sensorControls,\n \t\t\t\t       const ControlList &lensControls)\n {\n-\tdelayedCtrls_->push(sensorControls);\n+\tCameraSensor *sensor = cio2_.sensor();\n+\n+\tsensor->pushControls(sensorControls);\n \n-\tCameraLens *focusLens = cio2_.sensor()->focusLens();\n+\tCameraLens *focusLens = sensor->focusLens();\n \tif (!focusLens)\n \t\treturn;\n \n@@ -1375,7 +1370,7 @@ void IPU3CameraData::cio2BufferReady(FrameBuffer *buffer)\n \trequest->metadata().set(controls::SensorTimestamp,\n \t\t\t\tbuffer->metadata().timestamp);\n \n-\tinfo->effectiveSensorControls = delayedCtrls_->get(buffer->metadata().sequence);\n+\tinfo->effectiveSensorControls = cio2_.sensor()->getControls(buffer->metadata().sequence);\n \n \tif (request->findBuffer(&rawStream_))\n \t\tpipe()->completeBuffer(request, buffer);\n@@ -1441,7 +1436,7 @@ void IPU3CameraData::statBufferReady(FrameBuffer *buffer)\n  */\n void IPU3CameraData::frameStart(uint32_t sequence)\n {\n-\tdelayedCtrls_->applyControls(sequence);\n+\tcio2_.sensor()->frameStart(sequence);\n \n \tif (processingRequests_.empty())\n \t\treturn;\n","prefixes":["libcamera-devel","v3","12/23"]}