Show a patch.

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

{
    "id": 19420,
    "url": "https://patchwork.libcamera.org/api/patches/19420/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/19420/",
    "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": "<20240120211508.14742-1-mail@eliasnaur.com>",
    "date": "2024-01-20T21:14:49",
    "name": "[libcamera-devel] pipeline: rpi: always initialize the embedded buffer in tryRunPipeline",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "be8c3c6570400a0b1e6aec178908f5da3b30d08c",
    "submitter": {
        "id": 159,
        "url": "https://patchwork.libcamera.org/api/people/159/?format=api",
        "name": "Elias Naur",
        "email": "mail@eliasnaur.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/19420/mbox/",
    "series": [
        {
            "id": 4148,
            "url": "https://patchwork.libcamera.org/api/series/4148/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4148",
            "date": "2024-01-20T21:14:49",
            "name": "[libcamera-devel] pipeline: rpi: always initialize the embedded buffer in tryRunPipeline",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4148/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/19420/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/19420/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 3FC4DBDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 20 Jan 2024 21:15:32 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8ED9962916;\n\tSat, 20 Jan 2024 22:15:31 +0100 (CET)",
            "from mail-oa1-x2a.google.com (mail-oa1-x2a.google.com\n\t[IPv6:2001:4860:4864:20::2a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EAE5361D41\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 20 Jan 2024 22:15:29 +0100 (CET)",
            "by mail-oa1-x2a.google.com with SMTP id\n\t586e51a60fabf-2107f19e331so1083784fac.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 20 Jan 2024 13:15:29 -0800 (PST)",
            "from localhost.localdomain ([189.174.206.139])\n\tby smtp.gmail.com with ESMTPSA id\n\tqa12-20020a056871e70c00b00210d2c251cbsm1044294oac.39.2024.01.20.13.15.26\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSat, 20 Jan 2024 13:15:27 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1705785331;\n\tbh=5w8+Ux43VxLY7wW1ujYiyz8fIq2Z9WTQXpq/Q4/cvX0=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=Qe+mKceSE0djg9+vSiIpfsr7DSTNMT91PtL45FxiUCunzsCVfIr0qTB595mE6kPhh\n\tcHK6RXEr1lqScKccFS0m/g7pawnn4ILBo1P1mw0mPGv3HxpC4SSKtDfINd5TGeIj1m\n\tPeNjLOQ1yTl3aRB8uNn2apHcOEuGFc5lYcUQBNsA4vl7sO1pDhQKyTwSNjtgGHZbxq\n\tl15RUDrmHkveLTE25iQCDUlDzsXqO0C/LSupFRtd2XM8gJSYLGvDTzB7C0KmqXRi0V\n\tStwCNLBuWLRvNs87MHupGLgunlh+SGwPmEC9LHT0ilklyh3Ex3uySjhQoHVHBZIeyG\n\tRZu/hiTo4JyEQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=eliasnaur.com; s=google; t=1705785328; x=1706390128;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=G2Qh4/5taZGzucpEjTWccjVQvAYbubX/HU96THPsdbU=;\n\tb=1JVfQCCPuXWKfSWVKKmx0Yi6vdbsNzi56N0c1whO51rp7mLlkp3TMhOYf2MayQ+uFm\n\tEB7ZadZ/2HFYblI7UF/QDrezOp7M0TSPz8tVcXMh5fXpQr9QBIA/PIoSlHNNhXz+kaXz\n\ttYal1CdfCjRyqcFC3t6RO4D6bS/xtgbaChbPgoUHPv4OTe95J6B1NHmZWQsuQ85ENyAX\n\tkEqCd8y3nK0XjwaQtJ2My0Df0BZ1BikGp7Ki5Domnq/PhxWkgeak8PuoT+UK1C6R9coY\n\teMza96vBQpwCKv/b9yQQ1qv4P85KNbget4OnDaG0OFgBSCUAWaRMULQhczk7pcfXsVuL\n\tlh2g=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=eliasnaur.com\n\theader.i=@eliasnaur.com\n\theader.b=\"1JVfQCCP\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1705785328; x=1706390128;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=G2Qh4/5taZGzucpEjTWccjVQvAYbubX/HU96THPsdbU=;\n\tb=KAwL8DKGFasI3xkJNZZtvkxlRPy2FB+Zbt8ltdffGidxjrc9bdjeDyjiGA7YxejHtS\n\tll3Xu1iT1qiJ15Gd8L74RSG23GqavU+tvg/MP8AqyniqHoKNCxacNw7xcaL5/nNeC+og\n\tD61Ncvs7yIM95jSNY7NhSj1rs5kV+poxextyen5HWLPEKN7sGDZkpbixt4Jy7kkYuBio\n\ttWWOohvFTp0AeVVUbwWJVelBOSa14qKMLt0KiBtCjnwdjjCbRkQ5fqtFrRrCKd9DEUKm\n\tYp1mX/++E4z/NK/2FvOtUrc69M3xuhxh+HIfECFk5NhURKLdz/LV9HTknMRTH/XYfbcl\n\tL+Zw==",
        "X-Gm-Message-State": "AOJu0Ywqi69r9rOCKoaZs8fu8i9Fi2UkTMAk+cNibhtMgYPNMAR9+BEv\n\ttM7cKY0LnsahO8wzTf+d0mE0NZyHo5yOyVdIzb4aU+gTLslo8wIjFKCF2lAOuUIHRo/mp/g6g+1\n\tHwQ==",
        "X-Google-Smtp-Source": "AGHT+IFiLB1dp5BhAgIhD2wOOml9kO0aeMsGL80ReRVk3yz4kFRvd2MKWbR0rzTAbLkr6QAWTuMriw==",
        "X-Received": "by 2002:a05:6870:56a7:b0:210:8057:6d5b with SMTP id\n\tp39-20020a05687056a700b0021080576d5bmr1375548oao.119.1705785327898; \n\tSat, 20 Jan 2024 13:15:27 -0800 (PST)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat, 20 Jan 2024 16:14:49 -0500",
        "Message-ID": "<20240120211508.14742-1-mail@eliasnaur.com>",
        "X-Mailer": "git-send-email 2.42.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] pipeline: rpi: always initialize the\n\tembedded buffer in tryRunPipeline",
        "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": "Elias Naur via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Elias Naur <mail@eliasnaur.com>",
        "Cc": "Elias Naur <mail@eliasnaur.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Vc4CameraData::findMatchBuffers may return successfully without setting\nthe embedded buffer. Make sure to initialize the buffer and id to avoid\naccessing garbage data.\n\nWithout this change, libcamera v0.2.0 usually crashes with an assertion\nerror:\n\n ipa_base.cpp:397 assertion \"it != buffers_.end()\" failed in prepareIsp()\n\nSigned-off-by: Elias Naur <mail@eliasnaur.com>\n---\n src/libcamera/pipeline/rpi/vc4/vc4.cpp | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\nindex 26102ea7..d76389f3 100644\n--- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n+++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n@@ -906,7 +906,7 @@ void Vc4CameraData::setCameraTimeout(uint32_t maxFrameLengthMs)\n \n void Vc4CameraData::tryRunPipeline()\n {\n-\tFrameBuffer *embeddedBuffer;\n+\tFrameBuffer *embeddedBuffer = nullptr;\n \tBayerFrame bayerFrame;\n \n \t/* If any of our request or buffer queues are empty, we cannot proceed. */\n@@ -945,6 +945,7 @@ void Vc4CameraData::tryRunPipeline()\n \tparams.requestControls = request->controls();\n \tparams.ipaContext = request->sequence();\n \tparams.delayContext = bayerFrame.delayContext;\n+\tparams.buffers.embedded = 0;\n \n \tif (embeddedBuffer) {\n \t\tunsigned int embeddedId = unicam_[Unicam::Embedded].getBufferId(embeddedBuffer);\n",
    "prefixes": [
        "libcamera-devel"
    ]
}