Show a patch.

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

{
    "id": 18292,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/18292/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18292/",
    "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": "<20230221164504.120738-4-jacopo.mondi@ideasonboard.com>",
    "date": "2023-02-21T16:45:04",
    "name": "[libcamera-devel,3/3] libcamera: rkisp1: Reserve main path for StillCapture",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "93c9cbbf5eeda2270670d7254a9149c643a3d159",
    "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/18292/mbox/",
    "series": [
        {
            "id": 3760,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3760/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3760",
            "date": "2023-02-21T16:45:01",
            "name": "libcamera: rkisp1: Fix generateConfiguration",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3760/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18292/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18292/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 9E92FC329D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Feb 2023 16:45:25 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3432862656;\n\tTue, 21 Feb 2023 17:45:25 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D1F866264C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Feb 2023 17:45:22 +0100 (CET)",
            "from uno.homenet.telecomitalia.it\n\t(host-87-16-53-160.retail.telecomitalia.it [87.16.53.160])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 25F0980A;\n\tTue, 21 Feb 2023 17:45:22 +0100 (CET)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1676997925;\n\tbh=xMSBikLF+V4AF0eVUPM2TQhcjRD1TgaaxnkoKUwYyNw=;\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:Cc:\n\tFrom;\n\tb=0pNtrFemVto4yCS0kzwlMGC0uXJiYyaFvyw0v033bC06bBE9cPK83k2Aw5xhkIAvs\n\tAaHxQh5z4hxCq5lsc+nk08DdwkH9YhFi3Wi8cpMn/HUN+rS61yZfZldwiMYPeF5YC/\n\tJAJz86s0/lugPFFuQQypoW0oNwbegzHNr95h7dMGIXR+VEUKZ4ELOyJKPN45mLXW9w\n\tTDaE8rJT761U7C1pVaN4gRdYmLS5isjyG3MgIvA9DMWcFdV9dGrK9Jtjv+Xn95oY0l\n\tBtUAMy4w5LdwIVyAk+fdpXWXGvlNaUiDzAG5PK5/zwymizS4CgY4VpvrjbsYI6i9EP\n\tM7O2rzLQoYyyw==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1676997922;\n\tbh=xMSBikLF+V4AF0eVUPM2TQhcjRD1TgaaxnkoKUwYyNw=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=vYBYBLLoiDyeHxK5AbvuVsfkRmBX/tE2I4axRe2qoAM2U/JI0Kden7KeW/vUojePO\n\tXvr1tTcp+UWx/qpEZWEx9z671dZPNFdJ6G/KTxRsNi9WHCH+WrhPxeieUnhb97Na+c\n\tva5fs91+pFNKxeZTUjNfWg0rqzHf4gbRTS7a79vU="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"vYBYBLLo\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 21 Feb 2023 17:45:04 +0100",
        "Message-Id": "<20230221164504.120738-4-jacopo.mondi@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.39.0",
        "In-Reply-To": "<20230221164504.120738-1-jacopo.mondi@ideasonboard.com>",
        "References": "<20230221164504.120738-1-jacopo.mondi@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 3/3] libcamera: rkisp1: Reserve main path\n\tfor StillCapture",
        "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": "Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>, libcamera@luigi311.com",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The main output path can produce images in higher resolution and\nshould be reserved for the StillCapture role when a configuration\nis generated.\n\nBefore this change if StillCapture was not requested first it got\nassigned to the self-path and thus down-scaled to 1920x1920.\n\nWith this change, StillCapture can be asked last and it would take\nprecedence over other streams for the usage of the main path.\n\n$ cam -c1 --stream role=viewfinder --stream role=still\nCamera camera.cpp:969 streams configuration: (0) 1920x1080-NV12 (1) 4208x3120-NV12\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 15 ++++++++++++++-\n 1 file changed, 14 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 05a7ba03b2d2..23ff859e3835 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -626,6 +626,16 @@ PipelineHandlerRkISP1::generateConfiguration(Camera *camera,\n \tif (roles.empty())\n \t\treturn config;\n \n+\t/* If still capture is requested, reserve the main path for it. */\n+\tbool reserveMainPath = false;\n+\tfor (const StreamRole role : roles) {\n+\t\tif (role != StreamRole::StillCapture)\n+\t\t\tcontinue;\n+\n+\t\treserveMainPath = true;\n+\t\tbreak;\n+\t}\n+\n \t/*\n \t * As the ISP can't output different color spaces for the main and self\n \t * path, pick a sensible default color space based on the role of the\n@@ -644,6 +654,9 @@ PipelineHandlerRkISP1::generateConfiguration(Camera *camera,\n \t\t\tif (!colorSpace)\n \t\t\t\tcolorSpace = ColorSpace::Sycc;\n \n+\t\t\t/* Unlock usage of main path which was reserved. */\n+\t\t\treserveMainPath = false;\n+\n \t\t\tsize = data->sensor_->resolution();\n \t\t\tbreak;\n \n@@ -685,7 +698,7 @@ PipelineHandlerRkISP1::generateConfiguration(Camera *camera,\n \n \t\tRkISP1Path *path;\n \n-\t\tif (useMainPath) {\n+\t\tif (useMainPath && !reserveMainPath) {\n \t\t\tpath = data->mainPath_;\n \t\t\tmainPathAvailable = false;\n \t\t} else {\n",
    "prefixes": [
        "libcamera-devel",
        "3/3"
    ]
}