From patchwork Tue Mar 23 12:27:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 11657 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 572DAC32E5 for ; Tue, 23 Mar 2021 12:27:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A4FC168D69; Tue, 23 Mar 2021 13:27:46 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="PlXxlejr"; dkim-atps=neutral Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A3450602D7 for ; Tue, 23 Mar 2021 13:27:44 +0100 (CET) Received: by mail-ej1-x630.google.com with SMTP id r12so26781319ejr.5 for ; Tue, 23 Mar 2021 05:27:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BgpKwQy11y6CbftuqD1UOEhWakCKj0/dCDczGF4YMJo=; b=PlXxlejrCnIzA57nF2UNNCRm0WxT75IqKBUiNHKZhe1hTsxW0toP4tRN5+kpR76r0a dovOwxBt0q8htIR3ZI7EBZI3LLJgO4FdueWum2iPklP7+cTNg3K0ZW3Q8/1aSOGEP2G6 wP6Jih5VaGjrmDf2spluEZ8kA4RJmqj4wjjZYS2KuRr1oGdDXX7/xc3wxa1wdbP3QojI 7Umrr/7wcORa+vo2oUbx6gt1WCi3uBA/hhtd/sSjHrpv6sI/QeBYI00JKpBkZsa0VQSS lDM25DTE8NSv/YLtHrtde2m/p7UdFGlbgCI8OgWDuBQ1EfJd0VWJqW83VzvHZ4O7H7m4 houg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BgpKwQy11y6CbftuqD1UOEhWakCKj0/dCDczGF4YMJo=; b=auS1yMhepQa0cEh/q29GJ2/KOy2wkx7yUwyfcWqXjJQyNlPwHaPiI1Yi5v97WJKkRl Q3ebCgyXhtj+coZ+lFuIIRcjGsfYFa7DwqNYTZNxj6yeRXU6N8pRwFVzWcz861k5bOJX I4MrzvSWwAAm6PYPFDzr1Wv1iiXxYZB5CiDuPzF7fzeXMMdPlh/bAFGHCaDJnHq/28GD tvx/7883nhfPZbFNwbDaYTagXfZ4B8SXPWRjeqJc8+QocINQSuE2DEgLVCMT6QgDvgxL jt2w8F+Zq5ngI2ImYm56RH1sb0iiGwSpbrZGVR2tP+0e207h6uc02cG9FMrwrsxMifIb 7xjg== X-Gm-Message-State: AOAM532ujWVAA5VHDHndoGsFVhhTULrNzGoQEBJW1WbyVjtY7efC0yIZ TMKubJzYbrmbcgufEizrWmTov3UVrzPfkA== X-Google-Smtp-Source: ABdhPJwIRpGi1ExJFYvm7J2I47h9+rwtDbx7ua+WeRx16QZvXIsCZjqPgJnejfExOLuFU0UWLGedAg== X-Received: by 2002:a17:906:cd05:: with SMTP id oz5mr4724408ejb.345.1616502463874; Tue, 23 Mar 2021 05:27:43 -0700 (PDT) Received: from naush-laptop.patuck.local ([88.97.76.4]) by smtp.gmail.com with ESMTPSA id u13sm11082295ejy.31.2021.03.23.05.27.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Mar 2021 05:27:43 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Tue, 23 Mar 2021 12:27:32 +0000 Message-Id: <20210323122739.680560-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/7] Raspberry Pi: ipa::init() restructuring 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi, Here is version 2 of this series. I have applied all the changes suggested by Laurent, except for the following in patch 2/7: > > + /* > > + * Setup our delayed control writer with the sensor default > > + * gain and exposure delays. Mark VBLANK for priority write. > > + */ > > + std::unordered_map > params = { > > + { V4L2_CID_ANALOGUE_GAIN, { sensorConfig.gainDelay, false > } }, > > + { V4L2_CID_EXPOSURE, { sensorConfig.exposureDelay, false } > }, > > + { V4L2_CID_VBLANK, { sensorConfig.vblankDelay, true } } > > + }; > > + data->delayedCtrls_ = > std::make_unique(data->unicam_[Unicam::Image].dev(), > params); > > + data->sensorMetadata_ = sensorConfig.sensorMetadata; > > + > > As this code deals with RPiCameraData only, could you move it to > RPiCameraData::loadIPA() ? That way you won't have to prefix everything > with data->, and you'll avoid passing sensorConfig to loadIPA(). As explained in the original reply, I put this block here instead of loadIPA() as the DelayedControls helper needs the device node already opened in order to validate the controls that are passed in via params. If I were to move this to loadIPA(), it would split the opening of unicam_[Unicam::Image] and unicam_[Unicam::Embedded] into two separate locations, which I thought might be undesirable. Regards, Naush Naushir Patuck (7): ipa: Add sensor model string to IPASettings pipeline: ipa: raspberrypi: Open the CamHelper on ipa::init() pipeline: raspberrypi: Conditionally open the embedded data node ipa: raspberrypi: Move the controller initialise to ipa::init() ipa: raspberrypi: Remove unused member variable ipa: raspberrypi: Rationalise parameters to ipa::start() ipa: raspberrypi: Rationalise parameters to ipa::configure() include/libcamera/ipa/core.mojom | 8 ++ include/libcamera/ipa/raspberrypi.mojom | 27 ++-- src/ipa/raspberrypi/raspberrypi.cpp | 110 +++++++--------- src/libcamera/pipeline/ipu3/ipu3.cpp | 3 +- .../pipeline/raspberrypi/raspberrypi.cpp | 124 +++++++----------- src/libcamera/pipeline/vimc/vimc.cpp | 2 +- test/ipa/ipa_interface_test.cpp | 2 +- 7 files changed, 116 insertions(+), 160 deletions(-)