Show a patch.

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

{
    "id": 14757,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/14757/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14757/",
    "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": "<20211124134019.110765-10-jeanmichel.hautbois@ideasonboard.com>",
    "date": "2021-11-24T13:40:17",
    "name": "[libcamera-devel,v4,09/11] ipa: rkisp1: agc: Introduce HW revision in IPAContext",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "a2fdf86f0d9e814b745e88229138fbb3699d2f2a",
    "submitter": {
        "id": 75,
        "url": "https://patchwork.libcamera.org/api/1.1/people/75/?format=api",
        "name": "Jean-Michel Hautbois",
        "email": "jeanmichel.hautbois@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/14757/mbox/",
    "series": [
        {
            "id": 2751,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2751/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2751",
            "date": "2021-11-24T13:40:08",
            "name": "Introduce AGC for RkISP1",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/2751/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14757/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14757/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 96F8DC324F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 24 Nov 2021 13:40:35 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4993D60376;\n\tWed, 24 Nov 2021 14:40:35 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D201C603C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 24 Nov 2021 14:40:24 +0100 (CET)",
            "from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:968b:bd0c:97fc:7c17])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 747EBD78;\n\tWed, 24 Nov 2021 14:40:24 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"gRAa1csR\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1637761224;\n\tbh=5FSzPQNYzFfSyh/qQNs3zUgsEWwHmrY0ZPfviu87fvY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=gRAa1csRvCkffEm+i7SFs4461dsRQKY9OaWyKU1U1cr+2sftlWoTe5ANo7X/TuLd2\n\tizEoJmS/NvSJiq17Blhb+Pa+5mHUpBV1pAOKGwfH4biIgKthfeIXGO2cAzKH2FEn6d\n\tGijfMfFMVvbMqULllJG7oM8VX16MVePt0E6WeHA0=",
        "From": "Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed, 24 Nov 2021 14:40:17 +0100",
        "Message-Id": "<20211124134019.110765-10-jeanmichel.hautbois@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.32.0",
        "In-Reply-To": "<20211124134019.110765-1-jeanmichel.hautbois@ideasonboard.com>",
        "References": "<20211124134019.110765-1-jeanmichel.hautbois@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4 09/11] ipa: rkisp1: agc: Introduce HW\n\trevision in IPAContext",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The ISP can use 25 or 81 cells depending on its revision. Remove the\ncached value in IPARkISP1 and use IPASessionConfiguration to store it\nand pass it to AGC later.\n\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n---\nv4:\n\t- Only store HW revision, and use it in next patch\n---\n src/ipa/rkisp1/ipa_context.cpp | 8 ++++++++\n src/ipa/rkisp1/ipa_context.h   | 5 +++++\n src/ipa/rkisp1/rkisp1.cpp      | 7 +++++++\n 3 files changed, 20 insertions(+)",
    "diff": "diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp\nindex 819b2c73..6b53dfdf 100644\n--- a/src/ipa/rkisp1/ipa_context.cpp\n+++ b/src/ipa/rkisp1/ipa_context.cpp\n@@ -55,4 +55,12 @@ namespace libcamera::ipa::rkisp1 {\n  * are run. This needs to be turned into real per-frame data storage.\n  */\n \n+/**\n+ * \\var IPASessionConfiguration::hw\n+ * \\brief RkISP1-specific hardware information\n+ *\n+ * \\var IPASessionConfiguration::hw.revision\n+ * \\brief Hardware revision of the ISP\n+ */\n+\n } /* namespace libcamera::ipa::rkisp1 */\ndiff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\nindex a02b7667..f9ac6833 100644\n--- a/src/ipa/rkisp1/ipa_context.h\n+++ b/src/ipa/rkisp1/ipa_context.h\n@@ -7,11 +7,16 @@\n  */\n #pragma once\n \n+#include <linux/rkisp1-config.h>\n+\n namespace libcamera {\n \n namespace ipa::rkisp1 {\n \n struct IPASessionConfiguration {\n+\tstruct {\n+\t\trkisp1_cif_isp_version revision;\n+\t} hw;\n };\n \n struct IPAFrameContext {\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 2b073258..59676a70 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -74,6 +74,7 @@ private:\n \tuint32_t maxGain_;\n \n \t/* revision-specific data */\n+\trkisp1_cif_isp_version hwRevision_;\n \tunsigned int hwAeMeanMax_;\n \tunsigned int hwHistBinNMax_;\n \tunsigned int hwGammaOutMaxSamples_;\n@@ -114,6 +115,9 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision)\n \n \tLOG(IPARkISP1, Debug) << \"Hardware revision is \" << hwRevision;\n \n+\t/* Cache the value to set it in configure. */\n+\thwRevision_ = static_cast<rkisp1_cif_isp_version>(hwRevision);\n+\n \tcamHelper_ = CameraSensorHelperFactory::create(settings.sensorModel);\n \tif (!camHelper_) {\n \t\tLOG(IPARkISP1, Error)\n@@ -176,6 +180,9 @@ int IPARkISP1::configure([[maybe_unused]] const IPACameraSensorInfo &info,\n \t/* Clean context at configuration */\n \tcontext_ = {};\n \n+\t/* Set the hardware revision for the algorithms. */\n+\tcontext_.configuration.hw.revision = hwRevision_;\n+\n \treturn 0;\n }\n \n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "09/11"
    ]
}