Patch Detail
Show a patch.
GET /api/1.1/patches/14264/?format=api
{ "id": 14264, "url": "https://patchwork.libcamera.org/api/1.1/patches/14264/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14264/", "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": "<20211022143907.3089419-6-naush@raspberrypi.com>", "date": "2021-10-22T14:39:06", "name": "[libcamera-devel,v2,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/14264/mbox/", "series": [ { "id": 2650, "url": "https://patchwork.libcamera.org/api/1.1/series/2650/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2650", "date": "2021-10-22T14:39:01", "name": "Raspberry Pi: Conversion to media controller", "version": 2, "mbox": "https://patchwork.libcamera.org/series/2650/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14264/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14264/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 08617C324E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 22 Oct 2021 14:40:20 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3211F68F6D;\n\tFri, 22 Oct 2021 16:40:19 +0200 (CEST)", "from mail-wr1-x432.google.com (mail-wr1-x432.google.com\n\t[IPv6:2a00:1450:4864:20::432])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2D5CB68F5D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Oct 2021 16:40:17 +0200 (CEST)", "by mail-wr1-x432.google.com with SMTP id s19so906097wra.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Oct 2021 07:40:17 -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\tr205sm8577878wma.3.2021.10.22.07.40.15\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 22 Oct 2021 07:40:16 -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=\"q7YqgHEM\"; 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=oT0OVsIP0543VwfoaGee+9LOY2F+eiYz5IwkYiOUns4=;\n\tb=q7YqgHEMj/J3BS236OdPF/tJ60SGyIjPvxcKveLXkdNWo0/ch48uiBf9z2i9YLdB6G\n\tQgZIvQb+Xm390yL99GX0F88QWWalOI1r6l70IJ3fdf3kAd663z4qy9ljUSeJ5YuEWl1O\n\tWpq/pfMSjc9ffecDz29skYvF8rRGjbqYTOSE8k9TlJqyhCJMjD7Js9fPVDDN5KPfSxrs\n\tgeYIeF97k8PWG3TMsmXMUhGu4uvFX6blw2L903b0H90gHwwAYvC1QHRZzpcHHidcJTx8\n\tPI2fw6Um9mVBfWL2PPbatxcIT3SBLCubvtyMKTRT2/3oAn7sVaL4MzFj4RPsIgw+KTqu\n\tWk/Q==", "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=oT0OVsIP0543VwfoaGee+9LOY2F+eiYz5IwkYiOUns4=;\n\tb=zXly+czC72UICxSnpquKxdZLzxqX++rmOJcr7iyn17l5Qzykwva+TQyXnL5xhkYv0k\n\t+ztSitJb8RvmF/encf3dKLHjQJA0Hvv/+OwHdDfYhZxFyb41a9PZqem3iynS1n1Pwnib\n\t5NbpCn7YNnxR0lXg3JjOyxbNKalTa0P333Os8eL+QV/1Y2id/PtE0hiYD4Wdr/gkTRp6\n\tZ5sGf4noveZ2/lY2ZHJfPg7GT0e/GzqNSy/L8J+jYUcyH+L0OvQkLPOBHp/n0PdbDOSE\n\tDF7XM+rtrS2CA15OLlWaG/5BY4hgx+dyySCK6pyD5FZKYlx/hiS07mUbbjgQwveOz2+V\n\tS8Iw==", "X-Gm-Message-State": "AOAM530zpm7D+jqG7q7QWaROE3yeO4Yf0SDoLxgCBBVaXm3qOsLHcbyn\n\tRdW/zDg1/ILzVp23tddMaBxVtQEU2A2jt6J+", "X-Google-Smtp-Source": "ABdhPJxBWHWBAws4MWXrxpRETB9RmJWtoQzUOHOyht9pcxoSEqi/hzOOZ4jAOZoP6rZlNOt/qaQc6A==", "X-Received": "by 2002:a05:6000:1289:: with SMTP id\n\tf9mr355000wrx.192.1634913616642; \n\tFri, 22 Oct 2021 07:40:16 -0700 (PDT)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 22 Oct 2021 15:39:06 +0100", "Message-Id": "<20211022143907.3089419-6-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20211022143907.3089419-1-naush@raspberrypi.com>", "References": "<20211022143907.3089419-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 5/6] pipeline: raspberrypi: Account for\n\ta missing 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>\nReview-by: David Plowman <david.plowman@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 2b70b877e70a..c5e9607c7d95 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -984,7 +984,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@@ -1005,9 +1004,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@@ -1017,7 +1023,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@@ -1045,6 +1050,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", "v2", "5/6" ] }