Patch Detail
Show a patch.
GET /api/1.1/patches/11661/?format=api
{ "id": 11661, "url": "https://patchwork.libcamera.org/api/1.1/patches/11661/?format=api", "web_url": "https://patchwork.libcamera.org/patch/11661/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20210323122739.680560-5-naush@raspberrypi.com>", "date": "2021-03-23T12:27:36", "name": "[libcamera-devel,v2,4/7] ipa: raspberrypi: Move the controller initialise to ipa::init()", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "6261cd54a483261c47a9cbc5c9f71c24182c2709", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/11661/mbox/", "series": [ { "id": 1821, "url": "https://patchwork.libcamera.org/api/1.1/series/1821/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1821", "date": "2021-03-23T12:27:32", "name": "Raspberry Pi: ipa::init() restructuring", "version": 2, "mbox": "https://patchwork.libcamera.org/series/1821/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/11661/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/11661/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 CFF56C32E5\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Mar 2021 12:27:53 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6F61168D73;\n\tTue, 23 Mar 2021 13:27:53 +0100 (CET)", "from mail-ej1-x635.google.com (mail-ej1-x635.google.com\n\t[IPv6:2a00:1450:4864:20::635])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2D3A368D63\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Mar 2021 13:27:48 +0100 (CET)", "by mail-ej1-x635.google.com with SMTP id e14so8560356ejz.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Mar 2021 05:27:48 -0700 (PDT)", "from naush-laptop.patuck.local ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tu13sm11082295ejy.31.2021.03.23.05.27.46\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 23 Mar 2021 05:27:47 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"ntxIWY3i\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=/lMzWKO1kPu2+n0bhmCmtBZy0p0aK+9qkfid0q6hd3E=;\n\tb=ntxIWY3iu1T0tWci61AcB08K0wl8bYzuJLuC5KHCwOdyMZSdwJdF4WSeFuoJsvo5Dn\n\tJrxVzkcwjtMBWZ02cr93EzDQEzNY0Bf6T2KQPWnOnRxD7PI/fvTOSFGZiubWxsEEdjfm\n\tBsJqKxmugSqLxNhhQBSLVvYhZe4L9kVQVN7IqTgTvx8wLTRixNgor1xPdtJAwyvyinxs\n\twF8X0iOjRhSc55voX6eNKmyNOIGJZOnzJzutAWFF55KeF4GzD7uNvMxfylNDoMBsJBdE\n\t2YmsAWsc1VfsbyA4MSQ07vBZBngeWJ4yMkJc1ipLRCBxP5ty1Xi418OkoX6zmXIaGG1r\n\t0Qnw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=/lMzWKO1kPu2+n0bhmCmtBZy0p0aK+9qkfid0q6hd3E=;\n\tb=CiPIsHPh/oO5lmpy5Re6SIy1ru6KPfzTVbJhTQyb8J7TtsZYG7zk7ig1UVbX39WD3P\n\tae8zvQItwt6/HFhIpyk/Kobd8Vjke/SrUnurP/Dibbu1z8/jM+akZaySUImK22RRVUxX\n\t0LcU7G30+V5ZdAxQLTnYwC5OhdqfBuY2pHcYE85ClWfn4hIrhISV6jPQTXCRPAQ/ZID+\n\tM5wCx26Teqks5TfjrTaPmQ3ehOm9krwEDkk6fbMcP2qVsWAQ3QNT1HB2bUoC/TlRoEPt\n\taEhX4BQdDVx2jXpSQcWDPQci7/VPyPcLnJGMicSGe++mW+FzArfDhg9ICkJnYBOw64/4\n\tx5eA==", "X-Gm-Message-State": "AOAM533gXh80zC18e+jyZK8mp7JJVGxTT8rEyaNB20OKkoNAfXY4uayW\n\t1WMb4Rbgwm63UN4twJ9iVvatHZwnERL16g==", "X-Google-Smtp-Source": "ABdhPJyyjk17+UfqkHVkicBXIfmSAiAewY+FPJC6lKxbJyxddI/F3yI1hd4khs032ELUBeNtF9eLUw==", "X-Received": "by 2002:a17:906:6882:: with SMTP id\n\tn2mr4676131ejr.50.1616502467615; \n\tTue, 23 Mar 2021 05:27:47 -0700 (PDT)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 23 Mar 2021 12:27:36 +0000", "Message-Id": "<20210323122739.680560-5-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210323122739.680560-1-naush@raspberrypi.com>", "References": "<20210323122739.680560-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v2 4/7] ipa: raspberrypi: Move the\n\tcontroller initialise to ipa::init()", "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>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The controller initialise is a one-off operation, so move it from\nipa::configure() to ipa::init().\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nTested-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/raspberrypi/raspberrypi.cpp | 22 +++++++---------------\n 1 file changed, 7 insertions(+), 15 deletions(-)", "diff": "diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex a5b4b3110abf..bd20b144f520 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -67,9 +67,8 @@ class IPARPi : public ipa::RPi::IPARPiInterface\n {\n public:\n \tIPARPi()\n-\t\t: lastMode_({}), controller_(), controllerInit_(false),\n-\t\t frameCount_(0), checkCount_(0), mistrustCount_(0),\n-\t\t lsTable_(nullptr), firstStart_(true)\n+\t\t: lastMode_({}), controller_(), frameCount_(0), checkCount_(0),\n+\t\t mistrustCount_(0), lsTable_(nullptr), firstStart_(true)\n \t{\n \t}\n \n@@ -127,9 +126,6 @@ private:\n \tControlInfoMap ispCtrls_;\n \tControlList libcameraMetadata_;\n \n-\t/* IPA configuration. */\n-\tstd::string tuningFile_;\n-\n \t/* Camera sensor params. */\n \tCameraMode mode_;\n \tCameraMode lastMode_;\n@@ -137,7 +133,6 @@ private:\n \t/* Raspberry Pi controller specific defines. */\n \tstd::unique_ptr<RPiController::CamHelper> helper_;\n \tRPiController::Controller controller_;\n-\tbool controllerInit_;\n \tRPiController::Metadata rpiMetadata_;\n \n \t/*\n@@ -166,8 +161,6 @@ private:\n \n int IPARPi::init(const IPASettings &settings, ipa::RPi::SensorConfig *sensorConfig)\n {\n-\ttuningFile_ = settings.configurationFile;\n-\n \t/*\n \t * Load the \"helper\" for this sensor. This tells us all the device specific stuff\n \t * that the kernel driver doesn't. We only do this the first time; we don't need\n@@ -193,6 +186,10 @@ int IPARPi::init(const IPASettings &settings, ipa::RPi::SensorConfig *sensorConf\n \tsensorConfig->vblankDelay = vblankDelay;\n \tsensorConfig->sensorMetadata = sensorMetadata;\n \n+\t/* Load the tuning file for this sensor. */\n+\tcontroller_.Read(settings.configurationFile.c_str());\n+\tcontroller_.Initialise();\n+\n \treturn 0;\n }\n \n@@ -372,12 +369,7 @@ int IPARPi::configure(const CameraSensorInfo &sensorInfo,\n \t/* Pass the camera mode to the CamHelper to setup algorithms. */\n \thelper_->SetCameraMode(mode_);\n \n-\tif (!controllerInit_) {\n-\t\t/* Load the tuning file for this sensor. */\n-\t\tcontroller_.Read(tuningFile_.c_str());\n-\t\tcontroller_.Initialise();\n-\t\tcontrollerInit_ = true;\n-\n+\tif (firstStart_) {\n \t\t/* Supply initial values for frame durations. */\n \t\tapplyFrameDurations(defaultMinFrameDuration, defaultMaxFrameDuration);\n \n", "prefixes": [ "libcamera-devel", "v2", "4/7" ] }