From patchwork Thu Jun 30 13:38:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 16469 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 9FCAFC3273 for ; Thu, 30 Jun 2022 13:39:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 59BD3656A8; Thu, 30 Jun 2022 15:39:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1656596380; bh=n67kfmPtKbblafw6iA5kXJUSwapYI5FBnoFF2b5ESug=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=JqRoca3wxQfkWeQDn5JJTnJR5gXzGe1MnbJPRoaNgEhwspcoPWolUFo26xWA9QtbP U1LJSYaPakQ8gaShQlhF2zyysXKnF57eKFt2C0OnstqjSTik6VVLyWdGKk9tVQ3aBs 2v/HKi3myAgsndFJU/IOClVq0nr/K/NZqnidqUr5XEY4Hg+j0eUidOIerviklqbOU1 KWl0CqBASYNtvF32qOwBs4HaaQbGSp5G1t+ZpLiVXV01IQWMH1QjYy6SBnb1hZEXum 3Ue2iQfMBF7L3jiiNK4I0B/0q/dZDrHjUnh8NAGHeIsKHmdXJ8oRr42q/m0tLn4gHn 6RAr3RqxltOeA== Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 332BD65699 for ; Thu, 30 Jun 2022 15:39:34 +0200 (CEST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id DCA2F240015; Thu, 30 Jun 2022 13:39:32 +0000 (UTC) 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 Subject: [libcamera-devel] [PATCH v3 12/23] libcamera: ipu3: Drop DelayedControls X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Now that the CameraSensor class exposes the DelayedControl interface use the sensor to operate controls. Signed-off-by: Jacopo Mondi --- src/libcamera/pipeline/ipu3/ipu3.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 85e5f8a70408..a5a35b6585c6 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -26,7 +26,6 @@ #include "libcamera/internal/camera.h" #include "libcamera/internal/camera_lens.h" #include "libcamera/internal/camera_sensor.h" -#include "libcamera/internal/delayed_controls.h" #include "libcamera/internal/device_enumerator.h" #include "libcamera/internal/framebuffer.h" #include "libcamera/internal/ipa_manager.h" @@ -74,7 +73,6 @@ public: bool supportsFlips_; Transform rotationTransform_; - std::unique_ptr delayedCtrls_; IPU3Frames frameInfos_; std::unique_ptr ipa_; @@ -785,8 +783,6 @@ int PipelineHandlerIPU3::start(Camera *camera, [[maybe_unused]] const ControlLis if (ret) goto error; - data->delayedCtrls_->reset(); - /* * Start the ImgU video devices, buffers will be queued to the * ImgU output and viewfinder when requests will be queued. @@ -1136,9 +1132,6 @@ int PipelineHandlerIPU3::registerCameras() { V4L2_CID_EXPOSURE, { 2, false } }, }; - data->delayedCtrls_ = - std::make_unique(cio2->sensor()->device(), - params); data->cio2_.frameStart().connect(data.get(), &IPU3CameraData::frameStart); @@ -1258,9 +1251,11 @@ void IPU3CameraData::setSensorControls([[maybe_unused]] unsigned int id, const ControlList &sensorControls, const ControlList &lensControls) { - delayedCtrls_->push(sensorControls); + CameraSensor *sensor = cio2_.sensor(); + + sensor->pushControls(sensorControls); - CameraLens *focusLens = cio2_.sensor()->focusLens(); + CameraLens *focusLens = sensor->focusLens(); if (!focusLens) return; @@ -1375,7 +1370,7 @@ void IPU3CameraData::cio2BufferReady(FrameBuffer *buffer) request->metadata().set(controls::SensorTimestamp, buffer->metadata().timestamp); - info->effectiveSensorControls = delayedCtrls_->get(buffer->metadata().sequence); + info->effectiveSensorControls = cio2_.sensor()->getControls(buffer->metadata().sequence); if (request->findBuffer(&rawStream_)) pipe()->completeBuffer(request, buffer); @@ -1441,7 +1436,7 @@ void IPU3CameraData::statBufferReady(FrameBuffer *buffer) */ void IPU3CameraData::frameStart(uint32_t sequence) { - delayedCtrls_->applyControls(sequence); + cio2_.sensor()->frameStart(sequence); if (processingRequests_.empty()) return;