Patch Detail
Show a patch.
GET /api/1.1/patches/11605/?format=api
{ "id": 11605, "url": "https://patchwork.libcamera.org/api/1.1/patches/11605/?format=api", "web_url": "https://patchwork.libcamera.org/patch/11605/", "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": "<20210317100211.1067585-7-naush@raspberrypi.com>", "date": "2021-03-17T10:02:10", "name": "[libcamera-devel,6/7] ipa: raspberrypi: Rationalise parameters to ipa::start()", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "476b33b66038756c1d1c01441e4d130b67ae71b4", "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/11605/mbox/", "series": [ { "id": 1799, "url": "https://patchwork.libcamera.org/api/1.1/series/1799/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1799", "date": "2021-03-17T10:02:06", "name": "Raspberry Pi: ipa::init() restructuring", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1799/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/11605/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/11605/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 13F46BD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 17 Mar 2021 10:02:29 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9BC3C68D61;\n\tWed, 17 Mar 2021 11:02:28 +0100 (CET)", "from mail-ed1-x536.google.com (mail-ed1-x536.google.com\n\t[IPv6:2a00:1450:4864:20::536])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 53ACA68D70\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Mar 2021 11:02:23 +0100 (CET)", "by mail-ed1-x536.google.com with SMTP id w18so1525489edc.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Mar 2021 03:02:23 -0700 (PDT)", "from naush-laptop.patuck.local ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tp24sm12061179edt.5.2021.03.17.03.02.22\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 17 Mar 2021 03:02:22 -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=\"U6tAdZ88\"; 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=vf26R/+BQ3DxH+cRVpdFU3E7Pa4DtHwiBHbuzqa+d8k=;\n\tb=U6tAdZ88sclQsDuAal/9H6SHg2iGpiL92wvZt8QC1U2Jr7pfnl3qCWdD1DVn9kXfml\n\tOeZVFKjJrCvmP/DNuNSTXc1h4qvY3sLUzhQrt17csMJ/UkAGtZ7XqjgYbL6AiJqk0Ejv\n\tMO9BXmrGifsrQ9WwIACDi4FWjbI03u1LrQyYaJkCVD8tdOGiPgjpTrr0t6GYOnoGTNdF\n\t5qfv24BR/sqn71ThimGQ+r8M+v7c2toMXGInx6fZ9wApiHwLWZ+pMdCtSUQCsx1OYTkE\n\t4yEYXMxPynsJmDrckeOxLWlu7ldNhFfpLjWEjimma3NUcHBdmHox2yQ9718WQwMsw1y+\n\tGU3g==", "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=vf26R/+BQ3DxH+cRVpdFU3E7Pa4DtHwiBHbuzqa+d8k=;\n\tb=sflj0XYvH0ovrATqFtRwsLApWAjlpDiQaCj9rATrlB6SNU4roUw0h/k1Zc5GtvR57F\n\tTMaHb5RCu+u7y5ikkqfQ5pzqa38ozlnVtUtEznD/6qk1gNF+Ff7oFFft239E/HFxaBMB\n\t5HvT0pQSWQRBGeNpzJfxW9lNXUJ7x+/U4sHREuk+kVwpQuNRheaxjKV1sN8JTG/XHJ3q\n\te48o6Szwi4C3Kwtr6OtcsFVgzcF5FFIJ5QYezdHkYAjV7ZSiAlQuZJIw1ejnGaMlhsGp\n\tYhY1BuFo093tosmYKQHHBV4e0kIH2FbZt1LThEHRY5pogMjk/qUdazvV2mAOkh26meD7\n\toJ3w==", "X-Gm-Message-State": "AOAM532J+9CVlqL1AGOI/l/KoBjOXdEyRd0gPfjN3SMWa53unDZROGJW\n\tZDanpbAuhDk/5UwyBBhQdgx1iYoBax2J9A==", "X-Google-Smtp-Source": "ABdhPJxvpWiQbZuW1k1PvbY5dhWOM/pbtqGeCg+6abkp7bCMIqP2g8zGe5edQ8G1x05wogEOF18EDg==", "X-Received": "by 2002:aa7:d4cb:: with SMTP id\n\tt11mr40516083edr.202.1615975342767; \n\tWed, 17 Mar 2021 03:02:22 -0700 (PDT)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 17 Mar 2021 10:02:10 +0000", "Message-Id": "<20210317100211.1067585-7-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210317100211.1067585-1-naush@raspberrypi.com>", "References": "<20210317100211.1067585-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH 6/7] ipa: raspberrypi: Rationalise\n\tparameters to ipa::start()", "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": "Separate out the in and out parameters in ipa::start() as they are not\nthe same. This function now takes in a ControlList and returns out a\nstruct StartConfig which holds a ControlList and drop frame count for\nthe pipeline handler to action.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n include/libcamera/ipa/raspberrypi.mojom | 4 ++--\n src/ipa/raspberrypi/raspberrypi.cpp | 16 +++++++---------\n .../pipeline/raspberrypi/raspberrypi.cpp | 16 +++++++---------\n 3 files changed, 16 insertions(+), 20 deletions(-)", "diff": "diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\nindex a713c88eee19..7549397a27c4 100644\n--- a/include/libcamera/ipa/raspberrypi.mojom\n+++ b/include/libcamera/ipa/raspberrypi.mojom\n@@ -40,14 +40,14 @@ struct ConfigOutput {\n \tControlList controls;\n };\n \n-struct StartControls {\n+struct StartConfig {\n \tControlList controls;\n \tint32 dropFrameCount;\n };\n \n interface IPARPiInterface {\n \tinit(IPASettings settings) => (int32 ret, SensorConfig sensorConfig);\n-\tstart(StartControls controls) => (StartControls result);\n+\tstart(ControlList controls) => (StartConfig startConfig);\n \tstop();\n \n \t/**\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 2ca64bcdb80a..417a7922c3bd 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -79,8 +79,7 @@ public:\n \t}\n \n \tint init(const IPASettings &settings, ipa::RPi::SensorConfig *sensorConfig) override;\n-\tvoid start(const ipa::RPi::StartControls &data,\n-\t\t ipa::RPi::StartControls *result) override;\n+\tvoid start(const ControlList &controls, ipa::RPi::StartConfig *startConfig) override;\n \tvoid stop() override {}\n \n \tint configure(const CameraSensorInfo &sensorInfo,\n@@ -192,15 +191,14 @@ int IPARPi::init(const IPASettings &settings, ipa::RPi::SensorConfig *sensorConf\n \treturn 0;\n }\n \n-void IPARPi::start(const ipa::RPi::StartControls &data,\n-\t\t ipa::RPi::StartControls *result)\n+void IPARPi::start(const ControlList &controls, ipa::RPi::StartConfig *startConfig)\n {\n \tRPiController::Metadata metadata;\n \n-\tASSERT(result);\n-\tif (!data.controls.empty()) {\n+\tASSERT(startConfig);\n+\tif (!controls.empty()) {\n \t\t/* We have been given some controls to action before start. */\n-\t\tqueueRequest(data.controls);\n+\t\tqueueRequest(controls);\n \t}\n \n \tcontroller_.SwitchMode(mode_, &metadata);\n@@ -215,7 +213,7 @@ void IPARPi::start(const ipa::RPi::StartControls &data,\n \tif (agcStatus.shutter_time != 0.0 && agcStatus.analogue_gain != 0.0) {\n \t\tControlList ctrls(sensorCtrls_);\n \t\tapplyAGC(&agcStatus, ctrls);\n-\t\tresult->controls = std::move(ctrls);\n+\t\tstartConfig->controls = std::move(ctrls);\n \t}\n \n \t/*\n@@ -262,7 +260,7 @@ void IPARPi::start(const ipa::RPi::StartControls &data,\n \t\tmistrustCount_ = helper_->MistrustFramesModeSwitch();\n \t}\n \n-\tresult->dropFrameCount = dropFrame;\n+\tstartConfig->dropFrameCount = dropFrame;\n \n \tfirstStart_ = false;\n }\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex cd8a10a5747f..16568d56f31c 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -815,20 +815,18 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)\n \t\tdata->applyScalerCrop(*controls);\n \n \t/* Start the IPA. */\n-\tipa::RPi::StartControls ipaData;\n-\tipa::RPi::StartControls result;\n+\tControlList startControls;\n+\tipa::RPi::StartConfig startConfig;\n \tif (controls)\n-\t\tipaData.controls = *controls;\n-\tdata->ipa_->start(ipaData, &result);\n+\t\tstartControls = *controls;\n+\tdata->ipa_->start(startControls, &startConfig);\n \n \t/* Apply any gain/exposure settings that the IPA may have passed back. */\n-\tif (!result.controls.empty()) {\n-\t\tControlList &ctrls = result.controls;\n-\t\tdata->unicam_[Unicam::Image].dev()->setControls(&ctrls);\n-\t}\n+\tif (!startConfig.controls.empty())\n+\t\tdata->unicam_[Unicam::Image].dev()->setControls(&startConfig.controls);\n \n \t/* Configure the number of dropped frames required on startup. */\n-\tdata->dropFrameCount_ = result.dropFrameCount;\n+\tdata->dropFrameCount_ = startConfig.dropFrameCount;\n \n \t/* We need to set the dropFrameCount_ before queueing buffers. */\n \tret = queueAllBuffers(camera);\n", "prefixes": [ "libcamera-devel", "6/7" ] }