Show a patch.

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

{
    "id": 21020,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/21020/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/21020/",
    "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": "<20240826161709.524293-2-jacopo.mondi@ideasonboard.com>",
    "date": "2024-08-26T16:17:00",
    "name": "[v3,1/9] include: rkisp1: Update header for extensible parameters",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "eae1a0ec0464fa45f6af29ab0bf9b0396e588cee",
    "submitter": {
        "id": 143,
        "url": "https://patchwork.libcamera.org/api/1.1/people/143/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo.mondi@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/21020/mbox/",
    "series": [
        {
            "id": 4541,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4541/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4541",
            "date": "2024-08-26T16:16:59",
            "name": "rkisp1: Support BLS on i.MX8MP",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/4541/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/21020/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/21020/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 73F2AC324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 26 Aug 2024 16:17:25 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EC56463420;\n\tMon, 26 Aug 2024 18:17:20 +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 D21316190C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Aug 2024 18:17:17 +0200 (CEST)",
            "from ideasonboard.com (mob-5-90-142-90.net.vodafone.it\n\t[5.90.142.90])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 01D066CA;\n\tMon, 26 Aug 2024 18:16:10 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"TlDyfSgY\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1724688971;\n\tbh=7T+Z0rG/H7EjNWCQJPKTOBJqNGry5HArOJ1puqIbUac=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=TlDyfSgYjqf/1Os9Whu9BkhXVs4yWdf2QimCVVp7M7mxXLZxCtJU5A3OQubu9H/lT\n\tO3X98+KClZtoqHGrdtUFoJfvITIeeHc7w/ZkMSYiPZbFJoSNfYKsiSuQ6kI+B/xh3D\n\t7pFuGjiyZ157GEEBQLVY2RGKSh79diE+yGi1JHbQ=",
        "From": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tPaul Elder <paul.elder@ideasonboard.com>,\n\tStefan Klug <stefan.klug@ideasonboard.com>",
        "Subject": "[PATCH v3 1/9] include: rkisp1: Update header for extensible\n\tparameters",
        "Date": "Mon, 26 Aug 2024 18:17:00 +0200",
        "Message-ID": "<20240826161709.524293-2-jacopo.mondi@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.45.2",
        "In-Reply-To": "<20240826161709.524293-1-jacopo.mondi@ideasonboard.com>",
        "References": "<20240826161709.524293-1-jacopo.mondi@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "Update the rkisp1-config.h header with the definitions for the\nextensible parameters format.\n\nThe header has been generated from the most recent linux-media staging\ntree master branch, at revision:\nea2e2ea551ab (\"media: dt-bindings: qcom,sc7280-venus: Allow one IOMMU entry\")\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nAcked-by: Paul Elder <paul.elder@ideasonboard.com>\nAcked-by: Stefan Klug <stefan.klug@ideasonboard.com>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n include/linux/rkisp1-config.h | 578 ++++++++++++++++++++++++++++++++++\n 1 file changed, 578 insertions(+)",
    "diff": "diff --git a/include/linux/rkisp1-config.h b/include/linux/rkisp1-config.h\nindex f87c6bd49a5b..edbc6cb65d1c 100644\n--- a/include/linux/rkisp1-config.h\n+++ b/include/linux/rkisp1-config.h\n@@ -164,6 +164,11 @@\n #define RKISP1_CIF_ISP_DPF_MAX_NLF_COEFFS      17\n #define RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS  6\n \n+/*\n+ * Compand\n+ */\n+#define RKISP1_CIF_ISP_COMPAND_NUM_POINTS\t64\n+\n /*\n  * Measurement types\n  */\n@@ -851,6 +856,39 @@ struct rkisp1_params_cfg {\n \tstruct rkisp1_cif_isp_isp_other_cfg others;\n };\n \n+/**\n+ * struct rkisp1_cif_isp_compand_bls_config - Rockchip ISP1 Companding parameters (BLS)\n+ * @r: Fixed subtraction value for Bayer pattern R\n+ * @gr: Fixed subtraction value for Bayer pattern Gr\n+ * @gb: Fixed subtraction value for Bayer pattern Gb\n+ * @b: Fixed subtraction value for Bayer pattern B\n+ *\n+ * The values will be subtracted from the sensor values. Note that unlike the\n+ * dedicated BLS block, the BLS values in the compander are 20-bit unsigned.\n+ */\n+struct rkisp1_cif_isp_compand_bls_config {\n+\t__u32 r;\n+\t__u32 gr;\n+\t__u32 gb;\n+\t__u32 b;\n+};\n+\n+/**\n+ * struct rkisp1_cif_isp_compand_curve_config - Rockchip ISP1 Companding\n+ * parameters (expand and compression curves)\n+ * @px: Compand curve x-values. Each value stores the distance from the\n+ *      previous x-value, expressed as log2 of the distance on 5 bits.\n+ * @x: Compand curve x-values. The functionality of these parameters are\n+ *     unknown due to do a lack of hardware documentation, but these are left\n+ *     here for future compatibility purposes.\n+ * @y: Compand curve y-values\n+ */\n+struct rkisp1_cif_isp_compand_curve_config {\n+\t__u8 px[RKISP1_CIF_ISP_COMPAND_NUM_POINTS];\n+\t__u32 x[RKISP1_CIF_ISP_COMPAND_NUM_POINTS];\n+\t__u32 y[RKISP1_CIF_ISP_COMPAND_NUM_POINTS];\n+};\n+\n /*---------- PART2: Measurement Statistics ------------*/\n \n /**\n@@ -996,4 +1034,544 @@ struct rkisp1_stat_buffer {\n \tstruct rkisp1_cif_isp_stat params;\n };\n \n+/*---------- PART3: Extensible Configuration Parameters  ------------*/\n+\n+/**\n+ * enum rkisp1_ext_params_block_type - RkISP1 extensible params block type\n+ *\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS: Black level subtraction\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_DPCC: Defect pixel cluster correction\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_SDG: Sensor de-gamma\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_GAIN: Auto white balance gains\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_FLT: ISP filtering\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_BDM: Bayer de-mosaic\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_CTK: Cross-talk correction\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_GOC: Gamma out correction\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_DPF: De-noise pre-filter\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_DPF_STRENGTH: De-noise pre-filter strength\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_CPROC: Color processing\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_IE: Image effects\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_LSC: Lens shading correction\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_MEAS: Auto white balance statistics\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_HST_MEAS: Histogram statistics\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_AEC_MEAS: Auto exposure statistics\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_AFC_MEAS: Auto-focus statistics\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS: BLS in the compand block\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND: Companding expand curve\n+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS: Companding compress curve\n+ */\n+enum rkisp1_ext_params_block_type {\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_BLS,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_DPCC,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_SDG,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_GAIN,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_FLT,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_BDM,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_CTK,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_GOC,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_DPF,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_DPF_STRENGTH,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_CPROC,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_IE,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_LSC,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_MEAS,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_HST_MEAS,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_AEC_MEAS,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_AFC_MEAS,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND,\n+\tRKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS,\n+};\n+\n+#define RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE\t(1U << 0)\n+#define RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE\t(1U << 1)\n+\n+/**\n+ * struct rkisp1_ext_params_block_header - RkISP1 extensible parameters block\n+ *\t\t\t\t\t   header\n+ *\n+ * This structure represents the common part of all the ISP configuration\n+ * blocks. Each parameters block shall embed an instance of this structure type\n+ * as its first member, followed by the block-specific configuration data. The\n+ * driver inspects this common header to discern the block type and its size and\n+ * properly handle the block content by casting it to the correct block-specific\n+ * type.\n+ *\n+ * The @type field is one of the values enumerated by\n+ * :c:type:`rkisp1_ext_params_block_type` and specifies how the data should be\n+ * interpreted by the driver. The @size field specifies the size of the\n+ * parameters block and is used by the driver for validation purposes.\n+ *\n+ * The @flags field is a bitmask of per-block flags RKISP1_EXT_PARAMS_FL_*.\n+ *\n+ * When userspace wants to configure and enable an ISP block it shall fully\n+ * populate the block configuration and set the\n+ * RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE bit in the @flags field.\n+ *\n+ * When userspace simply wants to disable an ISP block the\n+ * RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE bit should be set in @flags field. The\n+ * driver ignores the rest of the block configuration structure in this case.\n+ *\n+ * If a new configuration of an ISP block has to be applied userspace shall\n+ * fully populate the ISP block configuration and omit setting the\n+ * RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE and RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE bits\n+ * in the @flags field.\n+ *\n+ * Setting both the RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE and\n+ * RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE bits in the @flags field is not allowed\n+ * and not accepted by the driver.\n+ *\n+ * Userspace is responsible for correctly populating the parameters block header\n+ * fields (@type, @flags and @size) and the block-specific parameters.\n+ *\n+ * For example:\n+ *\n+ * .. code-block:: c\n+ *\n+ *\tvoid populate_bls(struct rkisp1_ext_params_block_header *block) {\n+ *\t\tstruct rkisp1_ext_params_bls_config *bls =\n+ *\t\t\t(struct rkisp1_ext_params_bls_config *)block;\n+ *\n+ *\t\tbls->header.type = RKISP1_EXT_PARAMS_BLOCK_ID_BLS;\n+ *\t\tbls->header.flags = RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE;\n+ *\t\tbls->header.size = sizeof(*bls);\n+ *\n+ *\t\tbls->config.enable_auto = 0;\n+ *\t\tbls->config.fixed_val.r = blackLevelRed_;\n+ *\t\tbls->config.fixed_val.gr = blackLevelGreenR_;\n+ *\t\tbls->config.fixed_val.gb = blackLevelGreenB_;\n+ *\t\tbls->config.fixed_val.b = blackLevelBlue_;\n+ *\t}\n+ *\n+ * @type: The parameters block type, see\n+ *\t  :c:type:`rkisp1_ext_params_block_type`\n+ * @flags: A bitmask of block flags\n+ * @size: Size (in bytes) of the parameters block, including this header\n+ */\n+struct rkisp1_ext_params_block_header {\n+\t__u16 type;\n+\t__u16 flags;\n+\t__u32 size;\n+};\n+\n+/**\n+ * struct rkisp1_ext_params_bls_config - RkISP1 extensible params BLS config\n+ *\n+ * RkISP1 extensible parameters Black Level Subtraction configuration block.\n+ * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: Black Level Subtraction configuration, see\n+ *\t    :c:type:`rkisp1_cif_isp_bls_config`\n+ */\n+struct rkisp1_ext_params_bls_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_bls_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_dpcc_config - RkISP1 extensible params DPCC config\n+ *\n+ * RkISP1 extensible parameters Defective Pixel Cluster Correction configuration\n+ * block. Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_DPCC`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: Defective Pixel Cluster Correction configuration, see\n+ *\t    :c:type:`rkisp1_cif_isp_dpcc_config`\n+ */\n+struct rkisp1_ext_params_dpcc_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_dpcc_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_sdg_config - RkISP1 extensible params SDG config\n+ *\n+ * RkISP1 extensible parameters Sensor Degamma configuration block. Identified\n+ * by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_SDG`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: Sensor Degamma configuration, see\n+ *\t    :c:type:`rkisp1_cif_isp_sdg_config`\n+ */\n+struct rkisp1_ext_params_sdg_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_sdg_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_lsc_config - RkISP1 extensible params LSC config\n+ *\n+ * RkISP1 extensible parameters Lens Shading Correction configuration block.\n+ * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_LSC`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: Lens Shading Correction configuration, see\n+ *\t    :c:type:`rkisp1_cif_isp_lsc_config`\n+ */\n+struct rkisp1_ext_params_lsc_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_lsc_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_awb_gain_config - RkISP1 extensible params AWB\n+ *\t\t\t\t\t      gain config\n+ *\n+ * RkISP1 extensible parameters Auto-White Balance Gains configuration block.\n+ * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_GAIN`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: Auto-White Balance Gains configuration, see\n+ *\t    :c:type:`rkisp1_cif_isp_awb_gain_config`\n+ */\n+struct rkisp1_ext_params_awb_gain_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_awb_gain_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_flt_config - RkISP1 extensible params FLT config\n+ *\n+ * RkISP1 extensible parameters Filter configuration block. Identified by\n+ * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_FLT`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: Filter configuration, see :c:type:`rkisp1_cif_isp_flt_config`\n+ */\n+struct rkisp1_ext_params_flt_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_flt_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_bdm_config - RkISP1 extensible params BDM config\n+ *\n+ * RkISP1 extensible parameters Demosaicing configuration block. Identified by\n+ * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_BDM`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: Demosaicing configuration, see :c:type:`rkisp1_cif_isp_bdm_config`\n+ */\n+struct rkisp1_ext_params_bdm_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_bdm_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_ctk_config - RkISP1 extensible params CTK config\n+ *\n+ * RkISP1 extensible parameters Cross-Talk configuration block. Identified by\n+ * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_CTK`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: Cross-Talk configuration, see :c:type:`rkisp1_cif_isp_ctk_config`\n+ */\n+struct rkisp1_ext_params_ctk_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_ctk_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_goc_config - RkISP1 extensible params GOC config\n+ *\n+ * RkISP1 extensible parameters Gamma-Out configuration block. Identified by\n+ * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_GOC`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: Gamma-Out configuration, see :c:type:`rkisp1_cif_isp_goc_config`\n+ */\n+struct rkisp1_ext_params_goc_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_goc_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_dpf_config - RkISP1 extensible params DPF config\n+ *\n+ * RkISP1 extensible parameters De-noise Pre-Filter configuration block.\n+ * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_DPF`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: De-noise Pre-Filter configuration, see\n+ *\t    :c:type:`rkisp1_cif_isp_dpf_config`\n+ */\n+struct rkisp1_ext_params_dpf_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_dpf_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_dpf_strength_config - RkISP1 extensible params DPF\n+ *\t\t\t\t\t\t  strength config\n+ *\n+ * RkISP1 extensible parameters De-noise Pre-Filter strength configuration\n+ * block. Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_DPF_STRENGTH`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: De-noise Pre-Filter strength configuration, see\n+ *\t    :c:type:`rkisp1_cif_isp_dpf_strength_config`\n+ */\n+struct rkisp1_ext_params_dpf_strength_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_dpf_strength_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_cproc_config - RkISP1 extensible params CPROC config\n+ *\n+ * RkISP1 extensible parameters Color Processing configuration block.\n+ * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_CPROC`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: Color processing configuration, see\n+ *\t    :c:type:`rkisp1_cif_isp_cproc_config`\n+ */\n+struct rkisp1_ext_params_cproc_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_cproc_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_ie_config - RkISP1 extensible params IE config\n+ *\n+ * RkISP1 extensible parameters Image Effect configuration block. Identified by\n+ * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_IE`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: Image Effect configuration, see :c:type:`rkisp1_cif_isp_ie_config`\n+ */\n+struct rkisp1_ext_params_ie_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_ie_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_awb_meas_config - RkISP1 extensible params AWB\n+ *\t\t\t\t\t      Meas config\n+ *\n+ * RkISP1 extensible parameters Auto-White Balance Measurement configuration\n+ * block. Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_MEAS`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: Auto-White Balance measure configuration, see\n+ *\t    :c:type:`rkisp1_cif_isp_awb_meas_config`\n+ */\n+struct rkisp1_ext_params_awb_meas_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_awb_meas_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_hst_config - RkISP1 extensible params Histogram config\n+ *\n+ * RkISP1 extensible parameters Histogram statistics configuration block.\n+ * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_HST_MEAS`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: Histogram statistics configuration, see\n+ *\t    :c:type:`rkisp1_cif_isp_hst_config`\n+ */\n+struct rkisp1_ext_params_hst_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_hst_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_aec_config - RkISP1 extensible params AEC config\n+ *\n+ * RkISP1 extensible parameters Auto-Exposure statistics configuration block.\n+ * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_AEC_MEAS`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: Auto-Exposure statistics configuration, see\n+ *\t    :c:type:`rkisp1_cif_isp_aec_config`\n+ */\n+struct rkisp1_ext_params_aec_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_aec_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_afc_config - RkISP1 extensible params AFC config\n+ *\n+ * RkISP1 extensible parameters Auto-Focus statistics configuration block.\n+ * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_AFC_MEAS`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: Auto-Focus statistics configuration, see\n+ *\t    :c:type:`rkisp1_cif_isp_afc_config`\n+ */\n+struct rkisp1_ext_params_afc_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_afc_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_compand_bls_config - RkISP1 extensible params\n+ * Compand BLS config\n+ *\n+ * RkISP1 extensible parameters Companding configuration block (black level\n+ * subtraction). Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: Companding BLS configuration, see\n+ *\t    :c:type:`rkisp1_cif_isp_compand_bls_config`\n+ */\n+struct rkisp1_ext_params_compand_bls_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_compand_bls_config config;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct rkisp1_ext_params_compand_curve_config - RkISP1 extensible params\n+ * Compand curve config\n+ *\n+ * RkISP1 extensible parameters Companding configuration block (expand and\n+ * compression curves). Identified by\n+ * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND` or\n+ * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS`.\n+ *\n+ * @header: The RkISP1 extensible parameters header, see\n+ *\t    :c:type:`rkisp1_ext_params_block_header`\n+ * @config: Companding curve configuration, see\n+ *\t    :c:type:`rkisp1_cif_isp_compand_curve_config`\n+ */\n+struct rkisp1_ext_params_compand_curve_config {\n+\tstruct rkisp1_ext_params_block_header header;\n+\tstruct rkisp1_cif_isp_compand_curve_config config;\n+} __attribute__((aligned(8)));\n+\n+/*\n+ * The rkisp1_ext_params_compand_curve_config structure is counted twice as it\n+ * is used for both the COMPAND_EXPAND and COMPAND_COMPRESS block types.\n+ */\n+#define RKISP1_EXT_PARAMS_MAX_SIZE\t\t\t\t\t\\\n+\t(sizeof(struct rkisp1_ext_params_bls_config)\t\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_dpcc_config)\t\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_sdg_config)\t\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_lsc_config)\t\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_awb_gain_config)\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_flt_config)\t\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_bdm_config)\t\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_ctk_config)\t\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_goc_config)\t\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_dpf_config)\t\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_dpf_strength_config)\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_cproc_config)\t\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_ie_config)\t\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_awb_meas_config)\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_hst_config)\t\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_aec_config)\t\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_afc_config)\t\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_compand_bls_config)\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_compand_curve_config)\t\t+\\\n+\tsizeof(struct rkisp1_ext_params_compand_curve_config))\n+\n+/**\n+ * enum rksip1_ext_param_buffer_version - RkISP1 extensible parameters version\n+ *\n+ * @RKISP1_EXT_PARAM_BUFFER_V1: First version of RkISP1 extensible parameters\n+ */\n+enum rksip1_ext_param_buffer_version {\n+\tRKISP1_EXT_PARAM_BUFFER_V1 = 1,\n+};\n+\n+/**\n+ * struct rkisp1_ext_params_cfg - RkISP1 extensible parameters configuration\n+ *\n+ * This struct contains the configuration parameters of the RkISP1 ISP\n+ * algorithms, serialized by userspace into a data buffer. Each configuration\n+ * parameter block is represented by a block-specific structure which contains a\n+ * :c:type:`rkisp1_ext_params_block_header` entry as first member. Userspace\n+ * populates the @data buffer with configuration parameters for the blocks that\n+ * it intends to configure. As a consequence, the data buffer effective size\n+ * changes according to the number of ISP blocks that userspace intends to\n+ * configure and is set by userspace in the @data_size field.\n+ *\n+ * The parameters buffer is versioned by the @version field to allow modifying\n+ * and extending its definition. Userspace shall populate the @version field to\n+ * inform the driver about the version it intends to use. The driver will parse\n+ * and handle the @data buffer according to the data layout specific to the\n+ * indicated version and return an error if the desired version is not\n+ * supported.\n+ *\n+ * Currently the single RKISP1_EXT_PARAM_BUFFER_V1 version is supported.\n+ * When a new format version will be added, a mechanism for userspace to query\n+ * the supported format versions will be implemented in the form of a read-only\n+ * V4L2 control. If such control is not available, userspace should assume only\n+ * RKISP1_EXT_PARAM_BUFFER_V1 is supported by the driver.\n+ *\n+ * For each ISP block that userspace wants to configure, a block-specific\n+ * structure is appended to the @data buffer, one after the other without gaps\n+ * in between nor overlaps. Userspace shall populate the @data_size field with\n+ * the effective size, in bytes, of the @data buffer.\n+ *\n+ * The expected memory layout of the parameters buffer is::\n+ *\n+ *\t+-------------------- struct rkisp1_ext_params_cfg -------------------+\n+ *\t| version = RKISP_EXT_PARAMS_BUFFER_V1;                               |\n+ *\t| data_size = sizeof(struct rkisp1_ext_params_bls_config)             |\n+ *\t|           + sizeof(struct rkisp1_ext_params_dpcc_config);           |\n+ *\t| +------------------------- data  ---------------------------------+ |\n+ *\t| | +------------- struct rkisp1_ext_params_bls_config -----------+ | |\n+ *\t| | | +-------- struct rkisp1_ext_params_block_header  ---------+ | | |\n+ *\t| | | | type = RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS;                | | | |\n+ *\t| | | | flags = RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE;              | | | |\n+ *\t| | | | size = sizeof(struct rkisp1_ext_params_bls_config);     | | | |\n+ *\t| | | +---------------------------------------------------------+ | | |\n+ *\t| | | +---------- struct rkisp1_cif_isp_bls_config -------------+ | | |\n+ *\t| | | | enable_auto = 0;                                        | | | |\n+ *\t| | | | fixed_val.r = 256;                                      | | | |\n+ *\t| | | | fixed_val.gr = 256;                                     | | | |\n+ *\t| | | | fixed_val.gb = 256;                                     | | | |\n+ *\t| | | | fixed_val.b = 256;                                      | | | |\n+ *\t| | | +---------------------------------------------------------+ | | |\n+ *\t| | +------------ struct rkisp1_ext_params_dpcc_config -----------+ | |\n+ *\t| | | +-------- struct rkisp1_ext_params_block_header  ---------+ | | |\n+ *\t| | | | type = RKISP1_EXT_PARAMS_BLOCK_TYPE_DPCC;               | | | |\n+ *\t| | | | flags = RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE;              | | | |\n+ *\t| | | | size = sizeof(struct rkisp1_ext_params_dpcc_config);    | | | |\n+ *\t| | | +---------------------------------------------------------+ | | |\n+ *\t| | | +---------- struct rkisp1_cif_isp_dpcc_config ------------+ | | |\n+ *\t| | | | mode = RKISP1_CIF_ISP_DPCC_MODE_STAGE1_ENABLE;          | | | |\n+ *\t| | | | output_mode =                                           | | | |\n+ *\t| | | |   RKISP1_CIF_ISP_DPCC_OUTPUT_MODE_STAGE1_INCL_G_CENTER; | | | |\n+ *\t| | | | set_use = ... ;                                         | | | |\n+ *\t| | | | ...  = ... ;                                            | | | |\n+ *\t| | | +---------------------------------------------------------+ | | |\n+ *\t| | +-------------------------------------------------------------+ | |\n+ *\t| +-----------------------------------------------------------------+ |\n+ *\t+---------------------------------------------------------------------+\n+ *\n+ * @version: The RkISP1 extensible parameters buffer version, see\n+ *\t     :c:type:`rksip1_ext_param_buffer_version`\n+ * @data_size: The RkISP1 configuration data effective size, excluding this\n+ *\t       header\n+ * @data: The RkISP1 extensible configuration data blocks\n+ */\n+struct rkisp1_ext_params_cfg {\n+\t__u32 version;\n+\t__u32 data_size;\n+\t__u8 data[RKISP1_EXT_PARAMS_MAX_SIZE];\n+};\n+\n #endif /* _RKISP1_CONFIG_H */\n",
    "prefixes": [
        "v3",
        "1/9"
    ]
}