Show a patch.

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

{
    "id": 14770,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/14770/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14770/",
    "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-12-jeanmichel.hautbois@ideasonboard.com>",
    "date": "2021-11-25T05:42:59",
    "name": "[libcamera-devel,v5,11/11] ipa: rkisp1: agc: Introduce prepare call",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "9904f0ce3ada171969c9d4d26ffc5f5cac952b4c",
    "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/14770/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/14770/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14770/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 3FCBDC3252\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 25 Nov 2021 05:43:17 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E541B60492;\n\tThu, 25 Nov 2021 06:43:16 +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 01B9A60228\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 25 Nov 2021 06:43:06 +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 ABEB4A24;\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=\"ANxkv7lL\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1637818985;\n\tbh=4V9e984NDrpDeJPFUtWLq2BuCoOwQmXmXW8XZi+CqZE=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=ANxkv7lL3wBCMVpNuUxdXIgu0iyj3eb+WNHEDDZGJvnawCkA+l4/h2oNZLgvLShwx\n\tBCNj8CCcmMLxkfGmiDwA86jOmme9GT2oMqWrS1pcpLcOIxxFeqQB8la1XxM1BvQZoB\n\t5NWpBEDu/qcjdoDqndODg7R0OVaMrYNSojUaJd+8=",
        "From": "Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 25 Nov 2021 06:42:59 +0100",
        "Message-Id": "<20211125054259.24792-12-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 11/11] ipa: rkisp1: agc: Introduce\n\tprepare call",
        "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": "When a new parameter buffer needs to be queued, we need to specify which\nalgorithm is activated or not in the ISP. Add a simple prepare function\nin AGC for that, which may later evolve to take the exposure locking\ninto account. For that function to be called, we also need to add the\nloop on the algorithms in IPARkISP1::queueRequest.\n\nWe no longer disable the AE algorithm based on the controls::AeEnable,\nwhich will be handled in a different manner 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 src/ipa/rkisp1/algorithms/agc.cpp |  7 +++++++\n src/ipa/rkisp1/algorithms/agc.h   |  1 +\n src/ipa/rkisp1/rkisp1.cpp         | 12 +++---------\n 3 files changed, 11 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp\nindex 31a3276f..c1bdb20a 100644\n--- a/src/ipa/rkisp1/algorithms/agc.cpp\n+++ b/src/ipa/rkisp1/algorithms/agc.cpp\n@@ -270,6 +270,13 @@ void Agc::process(IPAContext &context, const rkisp1_stat_buffer *stats)\n \tframeCount_++;\n }\n \n+void Agc::prepare([[maybe_unused]] IPAContext &context,\n+\t\t  rkisp1_params_cfg *params)\n+{\n+\tparams->module_ens |= RKISP1_CIF_ISP_MODULE_AEC;\n+\tparams->module_en_update |= RKISP1_CIF_ISP_MODULE_AEC;\n+}\n+\n } /* namespace ipa::rkisp1::algorithms */\n \n } /* namespace libcamera */\ndiff --git a/src/ipa/rkisp1/algorithms/agc.h b/src/ipa/rkisp1/algorithms/agc.h\nindex 8ec172d7..717818f6 100644\n--- a/src/ipa/rkisp1/algorithms/agc.h\n+++ b/src/ipa/rkisp1/algorithms/agc.h\n@@ -28,6 +28,7 @@ public:\n \t~Agc() = default;\n \n \tint configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;\n+\tvoid prepare(IPAContext &context, rkisp1_params_cfg *params) override;\n \tvoid process(IPAContext &context, const rkisp1_stat_buffer *stats) override;\n \n private:\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 1710f9a3..949fa818 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -272,19 +272,13 @@ void IPARkISP1::processEvent(const RkISP1Event &event)\n }\n \n void IPARkISP1::queueRequest(unsigned int frame, rkisp1_params_cfg *params,\n-\t\t\t     const ControlList &controls)\n+\t\t\t     [[maybe_unused]] const ControlList &controls)\n {\n \t/* Prepare parameters buffer. */\n \tmemset(params, 0, sizeof(*params));\n \n-\t/* Auto Exposure on/off. */\n-\tif (controls.contains(controls::AeEnable)) {\n-\t\tautoExposure_ = controls.get(controls::AeEnable);\n-\t\tif (autoExposure_)\n-\t\t\tparams->module_ens = RKISP1_CIF_ISP_MODULE_AEC;\n-\n-\t\tparams->module_en_update = RKISP1_CIF_ISP_MODULE_AEC;\n-\t}\n+\tfor (auto const &algo : algorithms_)\n+\t\talgo->prepare(context_, params);\n \n \tRkISP1Action op;\n \top.op = ActionParamFilled;\n",
    "prefixes": [
        "libcamera-devel",
        "v5",
        "11/11"
    ]
}