Show a patch.

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

{
    "id": 14257,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/14257/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14257/",
    "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": "<20211022115537.2964533-6-naush@raspberrypi.com>",
    "date": "2021-10-22T11:55:36",
    "name": "[libcamera-devel,5/6] pipeline: raspberrypi: Account for a missing Unicam embedded data node",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "a8df2b12cebc4f0ef3ec48a12ee8749d9de4779d",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/14257/mbox/",
    "series": [
        {
            "id": 2649,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2649/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2649",
            "date": "2021-10-22T11:55:31",
            "name": "Raspberry Pi: Conversion to media controller",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2649/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14257/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14257/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 EBBC3C324E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 22 Oct 2021 11:55:49 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 74ECC68F62;\n\tFri, 22 Oct 2021 13:55:49 +0200 (CEST)",
            "from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com\n\t[IPv6:2a00:1450:4864:20::42f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1C95E68F65\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Oct 2021 13:55:46 +0200 (CEST)",
            "by mail-wr1-x42f.google.com with SMTP id s19so125497wra.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Oct 2021 04:55:46 -0700 (PDT)",
            "from naush-laptop.pitowers.org\n\t([2a00:1098:3142:14:f00d:ddf0:61b0:a4cd])\n\tby smtp.gmail.com with ESMTPSA id\n\tl5sm7853364wru.24.2021.10.22.04.55.45\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 22 Oct 2021 04:55:45 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"AqcSBPs3\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=iRRAspqPBslKSGeN5NDTBveEOZheEHwOQC+2ZoH4+7E=;\n\tb=AqcSBPs36tN5sSMhDlH/tJw04bEQ0GxlvZfo30oAP8xLlRWF5gOkJifgieQqWrwG8T\n\tiv8vwNGOn+4sMMJE/I/cZznAXK+NJHucvfMFh9pZeJp+GZNOUZ9zpfGb9mZAiN4QkrA4\n\tfDrBSn/vlDqMVwzq0w3vXe8kkb6wo1Z9KQi9EP31FJSV37jMiuYmrQVC9bTwVgnINzMx\n\ta20/04zrafudsxP4vbQ25nFwdxIsqciefLd7V6aSb4AW/XmDqjCa5um4wdHDYH0yy5j1\n\tMMh6WMTKsWZerXkBY3SOU07DdN/Z9MAOs11vkG4rHGWfOWPqPXfFHinPRagsFBoRADYJ\n\tPsxw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=iRRAspqPBslKSGeN5NDTBveEOZheEHwOQC+2ZoH4+7E=;\n\tb=J4g7IihlL5gU9ktcoqX1cb+KILAL1scKg94P5wh0sPeCv+Gagbjtu6bVFviXt04QN3\n\tQtQR/qtPdkLPnax8Gc33447XfO5To3HnxbAvwi4k+PWS6Dneiwvvqb2717GgdQs0+VtG\n\t6K2rBhABMTXiX51jtC2jrTRRxPw+nmrD/XpwjGX3ENgE8TetRvtkYQp58K5OAolkQCI1\n\tfSsKZDbr8Hd215Evl3DNa6tegE5+cso8XBfIEtrwFE9H6Yi+JYGjokuqKjgO0VQ+XQvX\n\tT2yjw5FYtPDuFP741GKgUaXTVXYEmiWITDQgbuGp1Wem+9lrWAdoL+kr8xE4m3CcnG0C\n\tDXFQ==",
        "X-Gm-Message-State": "AOAM530HXPfEltQYhyYfICcikCZfcP2/aJKByyHX7PFQPl2CdQJJFhvg\n\tMr++bG/z1m9SHp2BYLzVSGoNigBv26iREgux",
        "X-Google-Smtp-Source": "ABdhPJyz3qLyQhi27q82+hd1kLIefBIivusjVAnyBtbjBgDrs49SvdRCuRPKYyarDDT6/Y3Njb3Ehg==",
        "X-Received": "by 2002:a5d:4a4d:: with SMTP id\n\tv13mr12399543wrs.353.1634903745615; \n\tFri, 22 Oct 2021 04:55:45 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 22 Oct 2021 12:55:36 +0100",
        "Message-Id": "<20211022115537.2964533-6-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20211022115537.2964533-1-naush@raspberrypi.com>",
        "References": "<20211022115537.2964533-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 5/6] pipeline: raspberrypi: Account for a\n\tmissing Unicam embedded data node",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The unicam driver no longer regesters an embedded data node if the sensor does\nnot provide this stream. Account for this in the pipeline handler match routine\nby not assuming it is always present.\n\nAdd a warning if Unicam and the CamHelper do not agree on the presense of sensor\nembedded data, and disable its useage in these cases.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n .../pipeline/raspberrypi/raspberrypi.cpp         | 16 +++++++++++++---\n 1 file changed, 13 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex fc190e39732a..5aaf24436f27 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -994,7 +994,6 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n \tDeviceMatch unicam(\"unicam\");\n \tDeviceMatch isp(\"bcm2835-isp\");\n \n-\tunicam.add(\"unicam-embedded\");\n \tunicam.add(\"unicam-image\");\n \n \tisp.add(\"bcm2835-isp0-output0\"); /* Input */\n@@ -1015,9 +1014,16 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n \t\treturn false;\n \n \t/* Locate and open the unicam video streams. */\n-\tdata->unicam_[Unicam::Embedded] = RPi::Stream(\"Unicam Embedded\", unicam_->getEntityByName(\"unicam-embedded\"));\n \tdata->unicam_[Unicam::Image] = RPi::Stream(\"Unicam Image\", unicam_->getEntityByName(\"unicam-image\"));\n \n+\t/* An embedded data node will not be present if the sensor does not support it. */\n+\tMediaEntity *embeddedEntity = unicam_->getEntityByName(\"unicam-embedded\");\n+\tif (embeddedEntity) {\n+\t\tdata->unicam_[Unicam::Embedded] = RPi::Stream(\"Unicam Embedded\", embeddedEntity);\n+\t\tdata->unicam_[Unicam::Embedded].dev()->bufferReady.connect(data.get(),\n+\t\t\t\t\t\t\t\t\t   &RPiCameraData::unicamBufferDequeue);\n+\t}\n+\n \t/* Tag the ISP input stream as an import stream. */\n \tdata->isp_[Isp::Input] = RPi::Stream(\"ISP Input\", isp_->getEntityByName(\"bcm2835-isp0-output0\"), true);\n \tdata->isp_[Isp::Output0] = RPi::Stream(\"ISP Output0\", isp_->getEntityByName(\"bcm2835-isp0-capture1\"));\n@@ -1027,7 +1033,6 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n \t/* Wire up all the buffer connections. */\n \tdata->unicam_[Unicam::Image].dev()->frameStart.connect(data.get(), &RPiCameraData::frameStarted);\n \tdata->unicam_[Unicam::Image].dev()->bufferReady.connect(data.get(), &RPiCameraData::unicamBufferDequeue);\n-\tdata->unicam_[Unicam::Embedded].dev()->bufferReady.connect(data.get(), &RPiCameraData::unicamBufferDequeue);\n \tdata->isp_[Isp::Input].dev()->bufferReady.connect(data.get(), &RPiCameraData::ispInputDequeue);\n \tdata->isp_[Isp::Output0].dev()->bufferReady.connect(data.get(), &RPiCameraData::ispOutputDequeue);\n \tdata->isp_[Isp::Output1].dev()->bufferReady.connect(data.get(), &RPiCameraData::ispOutputDequeue);\n@@ -1055,6 +1060,11 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n \t\treturn false;\n \t}\n \n+\tif (sensorConfig.sensorMetadata ^ !!embeddedEntity) {\n+\t\tLOG(RPI, Warning) << \"Mismatch between Unicam and CamHelper for embedded data usage!\";\n+\t\tsensorConfig.sensorMetadata = false;\n+\t}\n+\n \t/*\n \t * Open all Unicam and ISP streams. The exception is the embedded data\n \t * stream, which only gets opened below if the IPA reports that the sensor\n",
    "prefixes": [
        "libcamera-devel",
        "5/6"
    ]
}