Show a patch.

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

{
    "id": 17953,
    "url": "https://patchwork.libcamera.org/api/patches/17953/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17953/",
    "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": "<20221206135459.25521-11-naush@raspberrypi.com>",
    "date": "2022-12-06T13:54:56",
    "name": "[libcamera-devel,v3,10/13] pipeline: raspberrypi: Validate MandatoryRequestBuffer in queueRequestDevice()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "2d49d047ed065b29af84598198e31b7facc0bdfd",
    "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/17953/mbox/",
    "series": [
        {
            "id": 3659,
            "url": "https://patchwork.libcamera.org/api/series/3659/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3659",
            "date": "2022-12-06T13:54:46",
            "name": "Raspberry Pi: Platform configuration and buffer allocation improvements",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/3659/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17953/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17953/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 BAB83BE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  6 Dec 2022 13:55:18 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7883F63352;\n\tTue,  6 Dec 2022 14:55:18 +0100 (CET)",
            "from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com\n\t[IPv6:2a00:1450:4864:20::32b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5A9726334C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  6 Dec 2022 14:55:13 +0100 (CET)",
            "by mail-wm1-x32b.google.com with SMTP id bg10so11245671wmb.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 06 Dec 2022 05:55:13 -0800 (PST)",
            "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tq6-20020a05600c2e4600b003c6bd91caa5sm19444059wmf.17.2022.12.06.05.55.12\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 06 Dec 2022 05:55:12 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1670334918;\n\tbh=hPrH8CNehfseOHrZ0daJ77FFnMfBEWPFyMOoWal5a88=;\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=RQj/VU7gJ3IbZbJfylZsS8szrvbv826OVcuH0bGUEzU2L4e1J5q1rm14ISdiNZFua\n\taroJ+ogZQxKlYAiBtWbCXMHsnBQzEnEuMjSWCDlNjiGuqo7h5d1FxuScMG7fl1jBRd\n\tF1uOkgVaxt7gcRr8NLLzG8Xjo+jb4LWYsdSZ3DiKaXlYdVibPbLmLUgj2V/nHDtTZT\n\t9EnDDzFKgOP6b8oNQkZWkys1aozLabPrvaqaK2/rNH/ZXXKRq+ZIRvTe5Q7A9fZYi8\n\tahWi10ibgwYwEgWFe/p15EPvWmti56EN/zanwvXhX2ky2g2SRdrWVWQBsF9Vt1Ljts\n\te2XiTLpnstnTg==",
            "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=jEQWUxMvjV8vykabVTIkhCGKopOoqCK5oGxbLTvPt0k=;\n\tb=qgGzTBmOc8TeS4wbSSL5loqEfsatIqPuK+OcQTYhhwpDQDJJM6RPk5Ak16z9uCOPrL\n\tKR/TDwZs364V0YhgdipEamxNEyj9uKvvW54HcyPXUbB/zE8HoKN0VKmRb1BCNsFRRUK+\n\tf39hPIcXRXvXQqvUJA3z+1mVJDfyow8wmh0xdU4BAoeGUy/mijWHqSBxgVDEPlCUdpgp\n\tvg/uBFIo4fXkGc6CLBOE1u4Oviw4tul3Glj4X2znfsHRmF4U6untWhTmTfH+4gzRDGyL\n\tCfyy8wkRhfN/b4rgca76q4+5bAYjaivSu/qGCDf30xWDOn/lORrP/Vpd1wLuZiAhsOXU\n\tsrMg=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"qgGzTBmO\"; 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=jEQWUxMvjV8vykabVTIkhCGKopOoqCK5oGxbLTvPt0k=;\n\tb=wzQFIOD54S8Hna5O6GbSJ08FY7zQdTQHvdZSD80mh6OUr8GgKOUA5tHzfSMnULL+b/\n\t/efr5lB0BEcAzVB1na2+PnCnZ6/ohIrAxpKBTOH+5nBKnRfBofLMTdk4p2TlTGJh4/Oj\n\t10rV0+ffSKPOYEIZHDJNffZVLAJEjRYJaMZokmtlEESpofRvs/C6WHCr8cYBjV4TpyKz\n\t36UjKXAksIjeFF+2VkigHZvhh/42yZAO35bq9hWAzCqWZkloNgxgyXJd48+fh96Dgy3l\n\tIhQWfkh+5+xYsfOXTLJdT1PCAW23vNLpzg6CoU31d/gBb6Rgvz37MsVcfNr8/aTlP/VF\n\tDAcg==",
        "X-Gm-Message-State": "ANoB5pn7RA3QMES5yMtidlkaEYTV8rQFuvuNQPgbJo5zZe7uLcZDFNtp\n\t5ufl7gWzDQLCXFMhMSpkACi8AAzcNuKairkN",
        "X-Google-Smtp-Source": "AA0mqf4XmntPBf2M12w4EEAACuMKTyftKXQ1914ayPhZ8KXaf7/wgfVa7PQTFj7YzV2H0YNosYMFKQ==",
        "X-Received": "by 2002:a05:600c:3ba8:b0:3cf:59c9:4a4e with SMTP id\n\tn40-20020a05600c3ba800b003cf59c94a4emr52161844wms.17.1670334912832; \n\tTue, 06 Dec 2022 05:55:12 -0800 (PST)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  6 Dec 2022 13:54:56 +0000",
        "Message-Id": "<20221206135459.25521-11-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20221206135459.25521-1-naush@raspberrypi.com>",
        "References": "<20221206135459.25521-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 10/13] pipeline: raspberrypi: Validate\n\tMandatoryRequestBuffer in queueRequestDevice()",
        "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 some validation in queueRequestDevice() to ensure that a frame buffer is\nprovided in a Request if the MandatoryRequestBuffer flag has been set in\nthe StreamConfiguration for every configured stream.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 8 ++++++++\n 1 file changed, 8 insertions(+)",
    "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 371610be649a..b18e11bb438f 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -1162,6 +1162,14 @@ int PipelineHandlerRPi::queueRequestDevice(Camera *camera, Request *request)\n \t\t\tstream->setExternalBuffer(buffer);\n \t\t}\n \n+\t\tif (!buffer && (stream->configuration().hints &\n+\t\t\t\tStreamConfiguration::Hint::MandatoryRequestBuffer)) {\n+\t\t\tLOG(RPI, Error) << \"MandatoryRequestBuffer hint set for stream \"\n+\t\t\t\t\t<< stream->name()\n+\t\t\t\t\t<< \", but no request buffer provided\";\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\n \t\t/*\n \t\t * If no buffer is provided by the request for this stream, we\n \t\t * queue a nullptr to the stream to signify that it must use an\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "10/13"
    ]
}