Show a patch.

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

{
    "id": 11357,
    "url": "https://patchwork.libcamera.org/api/patches/11357/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11357/",
    "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": "<20210222105222.393677-2-jacopo@jmondi.org>",
    "date": "2021-02-22T10:52:18",
    "name": "[libcamera-devel,v3,1/5] libcamera: ipu3: Initialize controls using sensor resolution",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "6c4953dd9eaf098f2da6ebfc8b9fb3757a04a724",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/11357/mbox/",
    "series": [
        {
            "id": 1717,
            "url": "https://patchwork.libcamera.org/api/series/1717/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1717",
            "date": "2021-02-22T10:52:17",
            "name": "android: Report frame durations",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/1717/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11357/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11357/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 655DCBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 22 Feb 2021 10:52:01 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E5CCE68A10;\n\tMon, 22 Feb 2021 11:51:59 +0100 (CET)",
            "from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[217.70.178.231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5DC89602F3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 22 Feb 2021 11:51:58 +0100 (CET)",
            "from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay11.mail.gandi.net (Postfix) with ESMTPSA id 2A8F6100017\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 22 Feb 2021 10:51:57 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 22 Feb 2021 11:52:18 +0100",
        "Message-Id": "<20210222105222.393677-2-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.30.0",
        "In-Reply-To": "<20210222105222.393677-1-jacopo@jmondi.org>",
        "References": "<20210222105222.393677-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v3 1/5] libcamera: ipu3: Initialize\n\tcontrols using sensor resolution",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The controls' limits initialized by the IPU3 pipeline handler depend\non the sensor configuration. In order to compute controls using a known\nstate apply to the sensor a configuration equal to its own resolution.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 26 +++++++++++++-------------\n 1 file changed, 13 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex b8a655ce0b68..f867b5913b27 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -805,10 +805,21 @@ bool PipelineHandlerIPU3::match(DeviceEnumerator *enumerator)\n  */\n int PipelineHandlerIPU3::initControls(IPU3CameraData *data)\n {\n+\t/*\n+\t * \\todo The here intialized controls depend on sensor configuration.\n+\t *\n+\t * Initialize the sensor using its resolution and compute the control\n+\t * limits.\n+\t */\n \tCameraSensor *sensor = data->cio2_.sensor();\n-\tCameraSensorInfo sensorInfo{};\n+\tV4L2SubdeviceFormat sensorFormat = {};\n+\tsensorFormat.size = sensor->resolution();\n+\tint ret = sensor->setFormat(&sensorFormat);\n+\tif (ret)\n+\t\treturn ret;\n \n-\tint ret = sensor->sensorInfo(&sensorInfo);\n+\tCameraSensorInfo sensorInfo{};\n+\tret = sensor->sensorInfo(&sensorInfo);\n \tif (ret)\n \t\treturn ret;\n \n@@ -851,17 +862,6 @@ int PipelineHandlerIPU3::initControls(IPU3CameraData *data)\n \t * sensor's full frame as ImgU input).\n \t */\n \n-\t/* Re-fetch the sensor info updated to use the largest resolution. */\n-\tV4L2SubdeviceFormat sensorFormat = {};\n-\tsensorFormat.size = sensor->resolution();\n-\tret = sensor->setFormat(&sensorFormat);\n-\tif (ret)\n-\t\treturn ret;\n-\n-\tret = sensor->sensorInfo(&sensorInfo);\n-\tif (ret)\n-\t\treturn ret;\n-\n \t/*\n \t * The maximum scaler crop rectangle is the analogue crop used to\n \t * produce the maximum frame size.\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "1/5"
    ]
}