Show a patch.

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

{
    "id": 14088,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/14088/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14088/",
    "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": "<20211011151154.72856-5-jacopo@jmondi.org>",
    "date": "2021-10-11T15:11:42",
    "name": "[libcamera-devel,v3,04/16] libcamera: ipu3: Split controls init/update",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "e3d7dbd70b5a5fbbc6b43f588317d353a3d10aeb",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/14088/mbox/",
    "series": [
        {
            "id": 2613,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2613/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2613",
            "date": "2021-10-11T15:11:38",
            "name": "IPU3 control info update and HAL frame durations",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/2613/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14088/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14088/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 6B315C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Oct 2021 15:11:18 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4288868F4B;\n\tMon, 11 Oct 2021 17:11:18 +0200 (CEST)",
            "from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CE4E468F53\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Oct 2021 17:11:13 +0200 (CEST)",
            "(Authenticated sender: jacopo@jmondi.org)\n\tby relay4-d.mail.gandi.net (Postfix) with ESMTPSA id E0832E0003;\n\tMon, 11 Oct 2021 15:11:12 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 11 Oct 2021 17:11:42 +0200",
        "Message-Id": "<20211011151154.72856-5-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.33.0",
        "In-Reply-To": "<20211011151154.72856-1-jacopo@jmondi.org>",
        "References": "<20211011151154.72856-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 04/16] libcamera: ipu3: Split controls\n\tinit/update",
        "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": "In order to prepare for updating the Camera controls limits when a new\ncamera configuration is applied, split the initControls() function in\ntwo:\n- updateControls() to actually compute controls values\n- initControls() to initialize the sensor configuration and call\n  updateControls\n\nUpdate the functions documentation accordingly.\n\nNo functional changes intended.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 33 ++++++++++++++++++++++++----\n 1 file changed, 29 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 6449fa543191..1033153360b8 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -148,6 +148,7 @@ private:\n \t}\n \n \tint initControls(IPU3CameraData *data);\n+\tint updateControls(IPU3CameraData *data);\n \tint registerCameras();\n \n \tint allocateBuffers(Camera *camera);\n@@ -926,9 +927,11 @@ bool PipelineHandlerIPU3::match(DeviceEnumerator *enumerator)\n  * \\brief Initialize the camera controls\n  * \\param[in] data The camera data\n  *\n- * Initialize the camera controls as the union of the static pipeline handler\n- * controls (IPU3Controls) and controls created dynamically from the sensor\n- * capabilities.\n+ * Initialize the camera controls by calculating controls which the pipeline\n+ * is reponsible for and merge them with the controls computed by the IPA.\n+ *\n+ * This function needs data->ipaControls_ to be initialized by the IPA init()\n+ * function at camera creation time. Always call this function after IPA init().\n  *\n  * \\return 0 on success or a negative error code otherwise\n  */\n@@ -949,8 +952,30 @@ int PipelineHandlerIPU3::initControls(IPU3CameraData *data)\n \tif (ret)\n \t\treturn ret;\n \n+\treturn updateControls(data);\n+}\n+\n+/**\n+ * \\brief Update the camera controls\n+ * \\param[in] data The camera data\n+ *\n+ * Compute the camera controls by calculating controls which the pipeline\n+ * is reponsible for and merge them with the controls computed by the IPA.\n+ *\n+ * This function needs data->ipaControls_ to be refreshed when a new\n+ * configuration is applied to the camera by the IPA configure() function.\n+ *\n+ * Always call this function after IPA configure() to make sure to have a\n+ * properly refreshed IPA controls list.\n+ *\n+ * \\return 0 on success or a negative error code otherwise\n+ */\n+int PipelineHandlerIPU3::updateControls(IPU3CameraData *data)\n+{\n+\tCameraSensor *sensor = data->cio2_.sensor();\n \tIPACameraSensorInfo sensorInfo{};\n-\tret = sensor->sensorInfo(&sensorInfo);\n+\n+\tint ret = sensor->sensorInfo(&sensorInfo);\n \tif (ret)\n \t\treturn ret;\n \n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "04/16"
    ]
}