Show a patch.

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

{
    "id": 17599,
    "url": "https://patchwork.libcamera.org/api/patches/17599/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17599/",
    "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": "<20221014131846.27169-4-naush@raspberrypi.com>",
    "date": "2022-10-14T13:18:39",
    "name": "[libcamera-devel,v1,03/10] pipeline: raspberrypi: Split out ISP Output0 buffer allocation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "3bc10d05dc5e2206c57846cdfba0adfae2f4496f",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/17599/mbox/",
    "series": [
        {
            "id": 3555,
            "url": "https://patchwork.libcamera.org/api/series/3555/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3555",
            "date": "2022-10-14T13:18:37",
            "name": "Raspberry Pi: Platform configuration and buffer allocation improvements",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3555/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17599/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17599/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 8CE22C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 14 Oct 2022 13:18:59 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9E61562DCE;\n\tFri, 14 Oct 2022 15:18:58 +0200 (CEST)",
            "from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com\n\t[IPv6:2a00:1450:4864:20::42d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7FEEE62D8E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 14 Oct 2022 15:18:54 +0200 (CEST)",
            "by mail-wr1-x42d.google.com with SMTP id b4so7572980wrs.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 14 Oct 2022 06:18:54 -0700 (PDT)",
            "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tg17-20020a05600c001100b003c6bbe910fdsm8282458wmc.9.2022.10.14.06.18.53\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 14 Oct 2022 06:18:53 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665753538;\n\tbh=DmRt7iDdF3iU70iACpSbId932K7vjHRoNGMzbP27ZSY=;\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=wZvTznotwubP99cXOEOK5QXH2b9ZxVPrVCR0rXNtwe1OdHO/AIkfcG20Ic636wIdS\n\tXhwPppqA1F74hnckIVN7eejWWAbC3BLQ5/BnZNeNZBr7rAUuOsvbYygYH03M30wxHM\n\t/EwZFT6YOtk3C/o0vHG27nDOMXC4elD9pJsyLibShpmbwkoO9kzOL8Ac7CW4/smA+x\n\tDMcffYZ75QcXg5V4iLVF3iNORLty1iVJYUEqVPLwD64HJzG5YJBKPFqdta0OgoZSIV\n\tJAGHyHPjeX0G+q6FyHTJRX/bJ/WmoHEwklK3T4YVuPlV7FKsMykSBVpe5TrQ1ySHgb\n\tLSEmmlJxeoe0A==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=jixBM/knBT5ddTo/kQAj1J1RKHqf2+VLhhPdXJMppwE=;\n\tb=gF5hn0SGw7VA8OeepQO46ofSnn3+1BuPEMrhwG8gk6dlgIL7gCrSucPYudJeInfpQC\n\tkkGz8IluVZn9SNkY6J3OMaO/pUmutYO78v7wPhBubLYHc0GIFPD7nTMU/k0jAIzq5kEz\n\t3SPZZ615W7tF++Heb4EFeRDHXeVv2EwrE9O6Tuo5f/67FS7rkfAF5ZDeY0horMfBof0Y\n\tM3/30X5etbUyNI1Nr11AJOSW4kbsxmPGTAQceELWLsVxiXQ9mmnRZhmuO9OqoPIN9+PJ\n\tVCKXTjwBEoFafP9cuZuxUUXAhfPK5mtMw9Rscsvfl1I953UdztrvEUD0NyPDiOcPjnsg\n\tjXoQ=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"gF5hn0SG\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=jixBM/knBT5ddTo/kQAj1J1RKHqf2+VLhhPdXJMppwE=;\n\tb=wY1M5PoerfgK8jxTnCphIhEKxLm42cza5i5eQiPHPx28xBZ2pbh3tMojRqB9NOxLMO\n\tDPfPs/uQxIK2KKG5sUWU6Ej5Je8KIxPfQhvrdCIEaTCfolgT+ahbJ6uZqzAtrDsOqUbk\n\tEmb5lxRJvyutthQvYI4qyHxH8CGf5YEdZ18FNOaSCGypdmlrCfpI+WuOBOitJ4olACmz\n\tERBQw06BRpbUvJZn64HCUnOro9oNYsjBXKzRlvTft1MXRtVDKA86kczHD+xKf756k7Ry\n\tCNDREK0B1etYZwbbowEPOKg9Iisstgw9yWfylAHUyIJ1bcPk16Kx+KIjmQphcVtnHhDj\n\tEWOw==",
        "X-Gm-Message-State": "ACrzQf28f3YlYeDv7sS+pKFwzkWREGWf0PjNTnV44c3//9uqFYyrDjDV\n\tmDs/8KgTuFmjBk08fxxOfAeCK/L5PUGYXQ==",
        "X-Google-Smtp-Source": "AMsMyM57oiF0CLza799DZ0gaJf4E3bwKce6VqG9nWwoYAit+QTPuf7HlQltmXEVow4xPmFsVzPDXhQ==",
        "X-Received": "by 2002:adf:fd4a:0:b0:22d:d3aa:e004 with SMTP id\n\th10-20020adffd4a000000b0022dd3aae004mr3362492wrs.173.1665753534058; \n\tFri, 14 Oct 2022 06:18:54 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 14 Oct 2022 14:18:39 +0100",
        "Message-Id": "<20221014131846.27169-4-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20221014131846.27169-1-naush@raspberrypi.com>",
        "References": "<20221014131846.27169-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v1 03/10] pipeline: raspberrypi: Split out\n\tISP Output0 buffer allocation",
        "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": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Naushir Patuck <naush@raspberrypi.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add a new config parameter numOutput0Buffers specifying the number of internally\nallocated ISP Output0 buffers. This parameter defaults to 1.\n\nSplit out the buffer allocation logic so that the buffer count for ISP Output0\ncan be different from the ISP Output1 and Statistics streams.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n .../pipeline/raspberrypi/raspberrypi.cpp        | 17 +++++++++++++----\n 1 file changed, 13 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 7d1e454cddcd..450029197b11 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -297,6 +297,7 @@ public:\n \tstruct Config {\n \t\tunsigned int minUnicamBuffers;\n \t\tunsigned int minTotalUnicamBuffers;\n+\t\tunsigned int numOutput0Buffers;\n \t};\n \n \tConfig config_;\n@@ -1401,6 +1402,7 @@ int PipelineHandlerRPi::configurePipelineHandler(RPiCameraData *data)\n \tconfig = {\n \t\t.minUnicamBuffers = 2,\n \t\t.minTotalUnicamBuffers = 4,\n+\t\t.numOutput0Buffers = 1,\n \t};\n \n \treturn 0;\n@@ -1485,12 +1487,19 @@ int PipelineHandlerRPi::prepareBuffers(Camera *camera)\n \t\t\t * so allocate the minimum required to avoid frame drops.\n \t\t\t */\n \t\t\tnumBuffers = minBuffers;\n-\t\t} else {\n+\t\t} else if (stream == &data->isp_[Isp::Output0]) {\n \t\t\t/*\n \t\t\t * Since the ISP runs synchronous with the IPA and requests,\n-\t\t\t * we only ever need one set of internal buffers. Any buffers\n-\t\t\t * the application wants to hold onto will already be exported\n-\t\t\t * through PipelineHandlerRPi::exportFrameBuffers().\n+\t\t\t * we only ever need a maximum of one internal buffer. Any\n+\t\t\t * buffers the application wants to hold onto will already\n+\t\t\t * be exported through PipelineHandlerRPi::exportFrameBuffers().\n+\t\t\t */\n+\t\t\tnumBuffers = std::min(1u, data->config_.numOutput0Buffers);\n+\t\t} else {\n+\t\t\t/*\n+\t\t\t * Same reasoning as above, we only ever need a maximum\n+\t\t\t * of one internal buffer for Output1 (required for colour\n+\t\t\t * denoise) and ISP statistics.\n \t\t\t */\n \t\t\tnumBuffers = 1;\n \t\t}\n",
    "prefixes": [
        "libcamera-devel",
        "v1",
        "03/10"
    ]
}