Show a patch.

GET /api/1.1/patches/11670/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 11670,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/11670/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11670/",
    "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": "<20210323143610.787760-5-naush@raspberrypi.com>",
    "date": "2021-03-23T14:36:07",
    "name": "[libcamera-devel,v3,4/7] ipa: raspberrypi: Move the controller initialise to ipa::init()",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "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/11670/mbox/",
    "series": [
        {
            "id": 1823,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1823/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1823",
            "date": "2021-03-23T14:36:03",
            "name": "Raspberry Pi: ipa::init() restructuring",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/1823/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11670/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11670/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 29EB1C32E5\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Mar 2021 14:36:25 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D5FAD68D80;\n\tTue, 23 Mar 2021 15:36:24 +0100 (CET)",
            "from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com\n\t[IPv6:2a00:1450:4864:20::52a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8349768D65\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Mar 2021 15:36:20 +0100 (CET)",
            "by mail-ed1-x52a.google.com with SMTP id x21so23712149eds.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Mar 2021 07:36:20 -0700 (PDT)",
            "from naush-laptop.patuck.local ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tn6sm11282430eji.37.2021.03.23.07.36.18\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 23 Mar 2021 07:36:19 -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=\"n+E7eQtY\"; 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=n+E7eQtYUmboT8Z61aR9leUd7Ky0h+5jiZpOaTlOj0/yDq/SQ6UezkTtV6WkzGMFTv\n\tFvaXOMT+p7MWxyar/vWZPCPe9Zv7JbDNbaGtLNMs4gHt8U9+DtJOtSqwpbBZHsao0w5x\n\tOXJ6LToeK1GbhDB2O2j6QSkgjUIEXeC5zYkyGN9c9od++22ON7X3H8hvRnI39X24MlYI\n\t9843moZ0hYeebKjzel+D0a42RbxfPqfVuws8a0Jsgx1RUWHNCzNS9p4IZHlCWzeycwMm\n\t2/Dk4wbeRpXrPgkU/gamOPcG1nHiXUdc77uhjiozUPLdxWL4piX9fJhTOmIr6ZeQAuj+\n\tgBXw==",
        "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=RV8g38QOZBGQX2hy+rh3e8PlRG//tmN01GKlj7/MWkhiiIqwdGq1GsRmjaIoHAjznR\n\t21Bq4zV1RNDP/qu4gUfYImjg6tdB0RpIFokCBKc1KristUH+LCsqGJXBfIosS77EjZcz\n\tNDb7tbRDynhCbigdQ0VHiCPa3sFnept8qSL+C4Uej33StXJ5IH383Z0ETv+LW2T41Ynn\n\tBKjLm/9Z2gfzjGxfMM1jcNl1QxYtzrrbJ51AnTR0V6T/T01HbnAK63VF8jONW7BV9Ata\n\tAhY/IZAsXgB7kYGLhFAdJ7/42+AfvBTkxxbuqGPugDSXPg3B4CcXEhXckfu5gZinEJPH\n\tbqTA==",
        "X-Gm-Message-State": "AOAM532N5WFLmw88rZAevmnIS2d+jN9IGXK/l25scorlezR+CguYXArc\n\t0hqVTnQ6ls5AEOTImfZkePmiIF/cUJnS3g==",
        "X-Google-Smtp-Source": "ABdhPJxX6vy1i7F26zqLWIR5WHW7w1EH7+LblljPxe4iDiuGqQZfng0R2D7QVhaEOE9vPCYM6CAbGA==",
        "X-Received": "by 2002:a05:6402:c88:: with SMTP id\n\tcm8mr4952338edb.62.1616510179836; \n\tTue, 23 Mar 2021 07:36:19 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 23 Mar 2021 14:36:07 +0000",
        "Message-Id": "<20210323143610.787760-5-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210323143610.787760-1-naush@raspberrypi.com>",
        "References": "<20210323143610.787760-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v3 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",
        "v3",
        "4/7"
    ]
}