Show a patch.

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

{
    "id": 14772,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/14772/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14772/",
    "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": "<20211125054259.24792-10-jeanmichel.hautbois@ideasonboard.com>",
    "date": "2021-11-25T05:42:57",
    "name": "[libcamera-devel,v5,09/11] ipa: rkisp1: agc: Introduce HW revision in IPAContext",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "3beedbab00ca22b6fac292065632e487a36a11ae",
    "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/14772/mbox/",
    "series": [
        {
            "id": 2752,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2752/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2752",
            "date": "2021-11-25T05:42:48",
            "name": "Introduce AGC for RkISP1",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/2752/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14772/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14772/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 BA4CAC3250\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 25 Nov 2021 05:43:18 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5BED7603F9;\n\tThu, 25 Nov 2021 06:43:18 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 996FE60398\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 25 Nov 2021 06:43:05 +0100 (CET)",
            "from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:d9a5:5e40:3323:d95])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 54FE71010;\n\tThu, 25 Nov 2021 06:43:05 +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=\"Oza+8R5l\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1637818985;\n\tbh=2fEa3PyQcdgXEzwUL/VwdXkZ9SIizmiHhEZ4ci3A55k=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Oza+8R5lP4ouXdeKnvxmU5Dlcw3LtddI7mI7TL0MKJ7/UoR1FyLzSlO42nyaLytcj\n\tfkZT84UhMjgshEs8DPVczDf+r5vZqTF/dn+qfAXuDuM4Mr2kBlfPeEECP3haYoMpfH\n\tLZfSvCcUPbLN4aWWEbwV5kytJ5DdZeUpjW9PqSnI=",
        "From": "Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 25 Nov 2021 06:42:57 +0100",
        "Message-Id": "<20211125054259.24792-10-jeanmichel.hautbois@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.32.0",
        "In-Reply-To": "<20211125054259.24792-1-jeanmichel.hautbois@ideasonboard.com>",
        "References": "<20211125054259.24792-1-jeanmichel.hautbois@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v5 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 919139dd..9342025b 100644\n--- a/src/ipa/rkisp1/ipa_context.h\n+++ b/src/ipa/rkisp1/ipa_context.h\n@@ -8,11 +8,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",
        "v5",
        "09/11"
    ]
}