Show a patch.

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

{
    "id": 16852,
    "url": "https://patchwork.libcamera.org/api/patches/16852/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16852/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20220727222149.30627-5-laurent.pinchart@ideasonboard.com>",
    "date": "2022-07-27T22:21:44",
    "name": "[libcamera-devel,v5,4/9] include: linux: Update rkisp1 kernel header for DPCC configuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "cdf093f6c557941c39ebcfaeb31d036236bd45f0",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/16852/mbox/",
    "series": [
        {
            "id": 3338,
            "url": "https://patchwork.libcamera.org/api/series/3338/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3338",
            "date": "2022-07-27T22:21:40",
            "name": "ipa: rkisp1: Add GSL, LSC, DPCC, Filter and CProc algorithms",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/3338/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16852/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16852/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 748CFBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 27 Jul 2022 22:22:03 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1146E63328;\n\tThu, 28 Jul 2022 00:22:03 +0200 (CEST)",
            "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 163436331B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Jul 2022 00:21:57 +0200 (CEST)",
            "from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9A3816D4;\n\tThu, 28 Jul 2022 00:21:56 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658960523;\n\tbh=Xso8yAif70+FoqGe1qd5tH1uVxULaEXqaICfL7w9BGU=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=mhqCXt4RagM0U7vQKSa/OAcH2EMGT7FtpavzRRHKaC8eCplaZQZFEDDU43v+VEVxo\n\t+DpOoMT5LqfjYZxal/BDKmIcmw6KNpLhO4LOqwG0yYFOPIjfX2drD7X/9MQcPLJwke\n\tKQ9GrY5budzplNyQ909eapfDgPoOoi74X3ZpgkMlOwXIvBTVS8LVyLusngvqZM9vkY\n\tSlL8BGOcuoptxSTMmqOM9LYXHa+EpLb9A86uft/I3U60ftu7ctqptXFKVTyXjTqxfm\n\tHu3uXLRdf9U6+F1ovAs+8HMD/WSZYXQFAeA14CAoTCsJVoJFBqozfpNx8yL//QcsdQ\n\tqSMuFghxEhzNw==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1658960516;\n\tbh=Xso8yAif70+FoqGe1qd5tH1uVxULaEXqaICfL7w9BGU=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Rr0hHQBfgsWiLLo5HmXiZ9s2X7ShsfGZuN0qOu+LioF02sQfgE2a18LAKjb4kyG62\n\t1mNp+9B4DpQa9VvDAIlGUSyUy1aLzzh/NwRNOPhP4m0nXoOvysVisDm2MGbyfEx6Br\n\t+K4zBuTWvEzgGLEdOHqernz+XqyXJzlqQHne6Jv0="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Rr0hHQBf\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 28 Jul 2022 01:21:44 +0300",
        "Message-Id": "<20220727222149.30627-5-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.35.1",
        "In-Reply-To": "<20220727222149.30627-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20220727222149.30627-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v5 4/9] include: linux: Update rkisp1\n\tkernel header for DPCC configuration",
        "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>",
        "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Florian Sylvestre <fsylvestre@baylibre.com>\n\nTo improve the kernel interface, a proposal has been made to the\nlinux-kernel [1] to improve the configuration of the Defective\nPixel Cluster Correction (DPCC).\n\n[1]\nhttps://lore.kernel.org/linux-media/20220616160456.21549-1-laurent.pinchart@ideasonboard.com/\n\nUpdate the local copy of the rkisp1-config.h to match the proposal.\n\nSigned-off-by: Florian Sylvestre <fsylvestre@baylibre.com>\nAcked-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/linux/rkisp1-config.h | 77 +++++++++++++++++++++++++++--------\n 1 file changed, 61 insertions(+), 16 deletions(-)",
    "diff": "diff --git a/include/linux/rkisp1-config.h b/include/linux/rkisp1-config.h\nindex 012293e3fab3..ec7cde8cd2e3 100644\n--- a/include/linux/rkisp1-config.h\n+++ b/include/linux/rkisp1-config.h\n@@ -117,7 +117,46 @@\n /*\n  * Defect Pixel Cluster Correction\n  */\n-#define RKISP1_CIF_ISP_DPCC_METHODS_MAX       3\n+#define RKISP1_CIF_ISP_DPCC_METHODS_MAX\t\t\t\t3\n+\n+#define RKISP1_CIF_ISP_DPCC_MODE_STAGE1_ENABLE\t\t\t(1U << 2)\n+\n+#define RKISP1_CIF_ISP_DPCC_OUTPUT_MODE_STAGE1_INCL_G_CENTER\t(1U << 0)\n+#define RKISP1_CIF_ISP_DPCC_OUTPUT_MODE_STAGE1_INCL_RB_CENTER\t(1U << 1)\n+#define RKISP1_CIF_ISP_DPCC_OUTPUT_MODE_STAGE1_G_3X3\t\t(1U << 2)\n+#define RKISP1_CIF_ISP_DPCC_OUTPUT_MODE_STAGE1_RB_3X3\t\t(1U << 3)\n+\n+/* 0-2 for sets 1-3 */\n+#define RKISP1_CIF_ISP_DPCC_SET_USE_STAGE1_USE_SET(n)\t\t((n) << 0)\n+#define RKISP1_CIF_ISP_DPCC_SET_USE_STAGE1_USE_FIX_SET\t\t(1U << 3)\n+\n+#define RKISP1_CIF_ISP_DPCC_METHODS_SET_PG_GREEN_ENABLE\t\t(1U << 0)\n+#define RKISP1_CIF_ISP_DPCC_METHODS_SET_LC_GREEN_ENABLE\t\t(1U << 1)\n+#define RKISP1_CIF_ISP_DPCC_METHODS_SET_RO_GREEN_ENABLE\t\t(1U << 2)\n+#define RKISP1_CIF_ISP_DPCC_METHODS_SET_RND_GREEN_ENABLE\t(1U << 3)\n+#define RKISP1_CIF_ISP_DPCC_METHODS_SET_RG_GREEN_ENABLE\t\t(1U << 4)\n+#define RKISP1_CIF_ISP_DPCC_METHODS_SET_PG_RED_BLUE_ENABLE\t(1U << 8)\n+#define RKISP1_CIF_ISP_DPCC_METHODS_SET_LC_RED_BLUE_ENABLE\t(1U << 9)\n+#define RKISP1_CIF_ISP_DPCC_METHODS_SET_RO_RED_BLUE_ENABLE\t(1U << 10)\n+#define RKISP1_CIF_ISP_DPCC_METHODS_SET_RND_RED_BLUE_ENABLE\t(1U << 11)\n+#define RKISP1_CIF_ISP_DPCC_METHODS_SET_RG_RED_BLUE_ENABLE\t(1U << 12)\n+\n+#define RKISP1_CIF_ISP_DPCC_LINE_THRESH_G(v)\t\t\t((v) << 0)\n+#define RKISP1_CIF_ISP_DPCC_LINE_THRESH_RB(v)\t\t\t((v) << 8)\n+#define RKISP1_CIF_ISP_DPCC_LINE_MAD_FAC_G(v)\t\t\t((v) << 0)\n+#define RKISP1_CIF_ISP_DPCC_LINE_MAD_FAC_RB(v)\t\t\t((v) << 8)\n+#define RKISP1_CIF_ISP_DPCC_PG_FAC_G(v)\t\t\t\t((v) << 0)\n+#define RKISP1_CIF_ISP_DPCC_PG_FAC_RB(v)\t\t\t((v) << 8)\n+#define RKISP1_CIF_ISP_DPCC_RND_THRESH_G(v)\t\t\t((v) << 0)\n+#define RKISP1_CIF_ISP_DPCC_RND_THRESH_RB(v)\t\t\t((v) << 8)\n+#define RKISP1_CIF_ISP_DPCC_RG_FAC_G(v)\t\t\t\t((v) << 0)\n+#define RKISP1_CIF_ISP_DPCC_RG_FAC_RB(v)\t\t\t((v) << 8)\n+\n+#define RKISP1_CIF_ISP_DPCC_RO_LIMITS_n_G(n, v)\t\t\t((v) << ((n) * 4))\n+#define RKISP1_CIF_ISP_DPCC_RO_LIMITS_n_RB(n, v)\t\t((v) << ((n) * 4 + 2))\n+\n+#define RKISP1_CIF_ISP_DPCC_RND_OFFS_n_G(n, v)\t\t\t((v) << ((n) * 4))\n+#define RKISP1_CIF_ISP_DPCC_RND_OFFS_n_RB(n, v)\t\t\t((v) << ((n) * 4 + 2))\n \n /*\n  * Denoising pre filter\n@@ -249,16 +288,20 @@ struct rkisp1_cif_isp_bls_config {\n };\n \n /**\n- * struct rkisp1_cif_isp_dpcc_methods_config - Methods Configuration used by DPCC\n+ * struct rkisp1_cif_isp_dpcc_methods_config - DPCC methods set configuration\n  *\n- * Methods Configuration used by Defect Pixel Cluster Correction\n+ * This structure stores the configuration of one set of methods for the DPCC\n+ * algorithm. Multiple methods can be selected in each set (independently for\n+ * the Green and Red/Blue components) through the @method field, the result is\n+ * the logical AND of all enabled methods. The remaining fields set thresholds\n+ * and factors for each method.\n  *\n- * @method: Method enable bits\n- * @line_thresh: Line threshold\n- * @line_mad_fac: Line MAD factor\n- * @pg_fac: Peak gradient factor\n- * @rnd_thresh: Rank Neighbor Difference threshold\n- * @rg_fac: Rank gradient factor\n+ * @method: Method enable bits (RKISP1_CIF_ISP_DPCC_METHODS_SET_*)\n+ * @line_thresh: Line threshold (RKISP1_CIF_ISP_DPCC_LINE_THRESH_*)\n+ * @line_mad_fac: Line Mean Absolute Difference factor (RKISP1_CIF_ISP_DPCC_LINE_MAD_FAC_*)\n+ * @pg_fac: Peak gradient factor (RKISP1_CIF_ISP_DPCC_PG_FAC_*)\n+ * @rnd_thresh: Rank Neighbor Difference threshold (RKISP1_CIF_ISP_DPCC_RND_THRESH_*)\n+ * @rg_fac: Rank gradient factor (RKISP1_CIF_ISP_DPCC_RG_FAC_*)\n  */\n struct rkisp1_cif_isp_dpcc_methods_config {\n \t__u32 method;\n@@ -272,14 +315,16 @@ struct rkisp1_cif_isp_dpcc_methods_config {\n /**\n  * struct rkisp1_cif_isp_dpcc_config - Configuration used by DPCC\n  *\n- * Configuration used by Defect Pixel Cluster Correction\n+ * Configuration used by Defect Pixel Cluster Correction. Three sets of methods\n+ * can be configured and selected through the @set_use field. The result is the\n+ * logical OR of all enabled sets.\n  *\n- * @mode: dpcc output mode\n- * @output_mode: whether use hard coded methods\n- * @set_use: stage1 methods set\n- * @methods: methods config\n- * @ro_limits: rank order limits\n- * @rnd_offs: differential rank offsets for rank neighbor difference\n+ * @mode: DPCC mode (RKISP1_CIF_ISP_DPCC_MODE_*)\n+ * @output_mode: Interpolation output mode (RKISP1_CIF_ISP_DPCC_OUTPUT_MODE_*)\n+ * @set_use: Methods sets selection (RKISP1_CIF_ISP_DPCC_SET_USE_*)\n+ * @methods: Methods sets configuration\n+ * @ro_limits: Rank order limits (RKISP1_CIF_ISP_DPCC_RO_LIMITS_*)\n+ * @rnd_offs: Differential rank offsets for rank neighbor difference (RKISP1_CIF_ISP_DPCC_RND_OFFS_*)\n  */\n struct rkisp1_cif_isp_dpcc_config {\n \t__u32 mode;\n",
    "prefixes": [
        "libcamera-devel",
        "v5",
        "4/9"
    ]
}