Show a patch.

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

{
    "id": 15429,
    "url": "https://patchwork.libcamera.org/api/patches/15429/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15429/",
    "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": "<20220307124633.115452-5-naush@raspberrypi.com>",
    "date": "2022-03-07T12:46:31",
    "name": "[libcamera-devel,v1,4/6] pipeline: raspberrypi: Add a reconfigured flag",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "b96e7aebe7c7c0ebf0a0dee532913656c3bb1e1a",
    "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/15429/mbox/",
    "series": [
        {
            "id": 2954,
            "url": "https://patchwork.libcamera.org/api/series/2954/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2954",
            "date": "2022-03-07T12:46:27",
            "name": "Raspberry Pi: Efficient start/stop/start sequences",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2954/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15429/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15429/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\r\n\t[92.243.16.209])\r\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 448D4BF415\r\n\tfor <parsemail@patchwork.libcamera.org>;\r\n\tMon,  7 Mar 2022 12:46:45 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\r\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E32B061188;\r\n\tMon,  7 Mar 2022 13:46:44 +0100 (CET)",
            "from mail-wm1-x333.google.com (mail-wm1-x333.google.com\r\n\t[IPv6:2a00:1450:4864:20::333])\r\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 120DB61188\r\n\tfor <libcamera-devel@lists.libcamera.org>;\r\n\tMon,  7 Mar 2022 13:46:42 +0100 (CET)",
            "by mail-wm1-x333.google.com with SMTP id\r\n\tn33-20020a05600c3ba100b003832caf7f3aso6574792wms.0\r\n\tfor <libcamera-devel@lists.libcamera.org>;\r\n\tMon, 07 Mar 2022 04:46:42 -0800 (PST)",
            "from naush-laptop.pitowers.org\r\n\t([2a00:1098:3142:14:c644:e9b3:de0b:54c5])\r\n\tby smtp.gmail.com with ESMTPSA id\r\n\tz6-20020a1cf406000000b0037c4e2d3baesm19759582wma.19.2022.03.07.04.46.40\r\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\r\n\tMon, 07 Mar 2022 04:46:40 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\r\n\ts=mail; t=1646657204;\r\n\tbh=6MgXuBq9A5ndq932NEyBE2cXkbnHy+qmvaaXMto9RgY=;\r\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\r\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\r\n\tFrom;\r\n\tb=YStwT8rIQMschB9lngTvWnJx7qyvOtT+eFkum81/VU4VH/N1c3Zbd0QsC0AcNxIn1\r\n\t+Llk/dcYdI3EPm6gV2nYVN0ba6dBMFvCDWJXZSTE6w7k33x13qzJ+BENbersD9u9kw\r\n\tCgvl5ggXTcHwN11TCLxkK7Nzr8FgHNvO4v9k01i8N/vk2lmHrJv/Nb+RaraIH9uY4P\r\n\t1FsaympICs8IUmIio0mBdt2AoOynNj5oepcnQKXfCmZTYDkJ0VnL5M2tp5dsIKToX9\r\n\tuRjfPYhdO1Qku50pAJAlQz/U/G1TcvTB/9KkOB8B3MFmXGD0ALZK7waX2ixSzDYq/G\r\n\tkOBjE1aTyMA+A==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\r\n\td=raspberrypi.com; s=google;\r\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\r\n\t:mime-version:content-transfer-encoding;\r\n\tbh=FwE3is+453vYZw7fiwo7M2TBoZaBxbvn3vvjqH/LPPA=;\r\n\tb=XTgw/cZzOJfhCziGhFlRnazkHr1DwSpYgM/pSzyDVV/+wUM4uoarDHqcRkIS+44zO+\r\n\tbWCIh0iufvkIh54eRjuAqsDgbSYdy0QOKL+ZJAmlhTMpU5gfyHTW1oeHSnok/FCuO7xE\r\n\thUdINGht/H/FJom2Yu/S8s79Um7oph3vDdvIC5cNPQwibFZ+klF7Mw8maD6Ug6ZUoZIP\r\n\typM1VqoHzmd8jUGS/1htueeatAn9WPsOTV81qACcJXGFUW9mvuRoe0e6dOvvkSEAsUXg\r\n\taol+lF6qixrWwN/NLuSKz4QZrqgp8up2agwpd9RZLURF+K0jFbucMkK/RB4MHI6V2se/\r\n\tVCuQ=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \r\n\tunprotected) header.d=raspberrypi.com\r\n\theader.i=@raspberrypi.com\r\n\theader.b=\"XTgw/cZz\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\r\n\td=1e100.net; s=20210112;\r\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r\n\t:references:mime-version:content-transfer-encoding;\r\n\tbh=FwE3is+453vYZw7fiwo7M2TBoZaBxbvn3vvjqH/LPPA=;\r\n\tb=mPe9axvR7Z9IxBYr/DSxK/zCMRJ1zSbbsaFCok3g9m1NGh8vH3Q2myQZ/pnji++Lh7\r\n\tgj8RgStcwdpBzoA36ppTCnm1RWMfLJ9AwYGhrQjaUoJUZHRQrP2d/6RbDaRn/ZvowIZ/\r\n\tV30rdqDC/or2oYtvelW23QzfuLuUzwxMCn2TMU+b7+JaLAJzLJjr0/qhIP2OzCK2N6j9\r\n\tH8s5zttmeLnFRYokquBfSNRurwoKJRm5+bQ3QEhR81H1a6XVQ93cOR7OSLGBnCEYrH2I\r\n\tuiIT2kG+y0TqEi8Wo2DXi5k6PoRt2fgD606TmXMUprcW4AYJQ31ZeyA72+lbeD+GLM49\r\n\te3ww==",
        "X-Gm-Message-State": "AOAM530KC0j+txggl+FqdDtihn5VCZjGaycurbOdYCblR7Vc6bl1N9XN\r\n\td9V4eFOZwbGGlxUqS84z+xR77z8zbHVUnw==",
        "X-Google-Smtp-Source": "ABdhPJwrUWK2VfOYlNyb/PwqsFEpFRS5QIuKNuBMqlVbsig02OwCrZCALIeENg/7AUau04GKA3pLpw==",
        "X-Received": "by 2002:a05:600c:3009:b0:381:194a:8cb5 with SMTP id\r\n\tj9-20020a05600c300900b00381194a8cb5mr8774892wmh.43.1646657201552; \r\n\tMon, 07 Mar 2022 04:46:41 -0800 (PST)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon,  7 Mar 2022 12:46:31 +0000",
        "Message-Id": "<20220307124633.115452-5-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220307124633.115452-1-naush@raspberrypi.com>",
        "References": "<20220307124633.115452-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v1 4/6] pipeline: raspberrypi: Add a\r\n\treconfigured flag",
        "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>,\r\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>,\r\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "From": "Naushir Patuck via libcamera-devel\r\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 flag to indicate a call to PipelineHandlerRPi::configure() has taken\nplace. This flag signals that buffer allocations need to be done on the next\ncall to PipelineHandlerRPi::start().\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n .../pipeline/raspberrypi/raspberrypi.cpp      | 21 ++++++++++++-------\n 1 file changed, 14 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\r\nindex 8bb9fc429912..b17ffa235ac7 100644\r\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\r\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\r\n@@ -185,7 +185,7 @@ public:\r\n \tRPiCameraData(PipelineHandler *pipe)\r\n \t\t: Camera::Private(pipe), state_(State::Stopped),\r\n \t\t  supportsFlips_(false), flipsAlterBayerOrder_(false),\r\n-\t\t  dropFrameCount_(0), ispOutputCount_(0)\r\n+\t\t  dropFrameCount_(0), reconfigured_(true), ispOutputCount_(0)\r\n \t{\r\n \t}\r\n \r\n@@ -284,6 +284,9 @@ public:\r\n \t */\r\n \tstd::optional<int32_t> notifyGainsUnity_;\r\n \r\n+\t/* Has this camera been reconfigured? */\r\n+\tbool reconfigured_;\r\n+\r\n private:\r\n \tvoid checkRequestCompleted();\r\n \tvoid fillRequestMetadata(const ControlList &bufferControls,\r\n@@ -961,6 +964,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\r\n \t\t\t\t<< \" on pad \" << sinkPad->index();\r\n \t}\r\n \r\n+\tdata->reconfigured_ = true;\r\n \treturn ret;\r\n }\r\n \r\n@@ -981,12 +985,15 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)\r\n \tRPiCameraData *data = cameraData(camera);\r\n \tint ret;\r\n \r\n-\t/* Allocate buffers for internal pipeline usage. */\r\n-\tret = prepareBuffers(camera);\r\n-\tif (ret) {\r\n-\t\tLOG(RPI, Error) << \"Failed to allocate buffers\";\r\n-\t\tstop(camera);\r\n-\t\treturn ret;\r\n+\tif (data->reconfigured_) {\r\n+\t\t/* Allocate buffers for internal pipeline usage. */\r\n+\t\tret = prepareBuffers(camera);\r\n+\t\tif (ret) {\r\n+\t\t\tLOG(RPI, Error) << \"Failed to allocate buffers\";\r\n+\t\t\tstop(camera);\r\n+\t\t\treturn ret;\r\n+\t\t}\r\n+\t\tdata->reconfigured_ = false;\r\n \t}\r\n \r\n \t/* Check if a ScalerCrop control was specified. */",
    "prefixes": [
        "libcamera-devel",
        "v1",
        "4/6"
    ]
}