Patch Detail
Show a patch.
GET /api/patches/14446/?format=api
{ "id": 14446, "url": "https://patchwork.libcamera.org/api/patches/14446/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14446/", "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": "<20211101091510.23204-12-naush@raspberrypi.com>", "date": "2021-11-01T09:15:10", "name": "[libcamera-devel,v5,11/11] pipeline: raspberrypi: Account for a missing Unicam embedded data node", "commit_ref": "460da2b58069acd88c7eed98f0d9662bc353bea6", "pull_url": null, "state": "accepted", "archived": false, "hash": "909b2b7762d7d82ab66ce1ceb7d4499f243542bf", "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/14446/mbox/", "series": [ { "id": 2684, "url": "https://patchwork.libcamera.org/api/series/2684/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2684", "date": "2021-11-01T09:14:59", "name": "Raspberry Pi: Conversion to media controller", "version": 5, "mbox": "https://patchwork.libcamera.org/series/2684/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14446/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14446/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 BB872C3251\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 1 Nov 2021 09:15:26 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 76FC9600C8;\n\tMon, 1 Nov 2021 10:15:26 +0100 (CET)", "from mail-wr1-x429.google.com (mail-wr1-x429.google.com\n\t[IPv6:2a00:1450:4864:20::429])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 62EEC6032D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 1 Nov 2021 10:15:21 +0100 (CET)", "by mail-wr1-x429.google.com with SMTP id d5so11876486wrc.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 01 Nov 2021 02:15:21 -0700 (PDT)", "from naush-laptop.pitowers.org\n\t([2a00:1098:3142:14:3a2b:9d8c:92b9:ece6])\n\tby smtp.gmail.com with ESMTPSA id\n\tw10sm13168849wrq.88.2021.11.01.02.15.20\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 01 Nov 2021 02:15:20 -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=\"oyRw+diQ\"; 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=3PIdxG9cdt0Y7XN4FXtc4NokkaMhwWrDugoWY42qyGY=;\n\tb=oyRw+diQOzvtWIHI+OIvYBxfEBug1YYOLmoFv6W6EXza/qc2cqL+KWgYiDONNDKypd\n\tUfaE1ZmJzO1HjVw8oKRM3tGJy9vrxmpTgrfGmS3weYEZfElDkikDgItiK8ktz09syVyo\n\ttdP1936BIO8ubLvgBeIYVvP72q1eu+V70AZod32Ed8xQvYhpVR3xIi4KnDQM5rEFKZsV\n\tWs8De6VoqKq1klogyDxqmZfqTSFHpN2ypZP6cYor5FbZ0RnYfj91IuWvefEF+2vlbZPU\n\tmS/xHF/eVpi4iGXfaOVEgraVCM06O/zMwdiVvYQIpuQ8ayw5pebCulX9Zbk1NMKN9Qdn\n\tzTgQ==", "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=3PIdxG9cdt0Y7XN4FXtc4NokkaMhwWrDugoWY42qyGY=;\n\tb=yGVKV7tVtJIpcUJRPKkpp9OHVwVqwNNIAjLbaPXj5nOTXaESG9ne0STG5sGxJJFfk3\n\tA56pkZUReziynPZ5GtIZWpMB2KZ9WhiOj+CjPpWJnVrHLVTCIyjkXAUDiBhd6p9aJ/KC\n\tR6BNwqs6G5GGZkpeo43ogE5ZKcYgJAMNOE3Y5dPi1W3ABmnV0oCVNtqUHM1Jzot1esO2\n\tzS4BgbVws4UinAmfak3K4fcqKHQT9pETBCM1wY3iv4F1uDA8L5dU/5XIxE2wGQxPCa8J\n\tuikFJBcmUruooOvsWP29SoSY5dKv47XpJNskmEthwSltnyAod6jq+1LI9ZGD1afxSW4O\n\tX2cQ==", "X-Gm-Message-State": "AOAM532kgm0IfoUZwLCJzDBk3ZM47qM7WaSc3ZhNnIntJOWeFv53Ye4b\n\tiI2UtXQ8I28c6h24usAcqnN7gIsaS54GHJjZ", "X-Google-Smtp-Source": "ABdhPJyBNvaO5VGrxE9bfIdhcfmLbPZd0K1rfUItdQl8+lZ6zLL+ozGHMlMGHL28QLcSN/nIWnp9pg==", "X-Received": "by 2002:a5d:4a46:: with SMTP id\n\tv6mr35426304wrs.262.1635758120902; \n\tMon, 01 Nov 2021 02:15:20 -0700 (PDT)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 1 Nov 2021 09:15:10 +0000", "Message-Id": "<20211101091510.23204-12-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20211101091510.23204-1-naush@raspberrypi.com>", "References": "<20211101091510.23204-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v5 11/11] pipeline: raspberrypi: Account\n\tfor a 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 registers 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 usage in these cases.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n .../pipeline/raspberrypi/raspberrypi.cpp | 18 +++++++++++++++---\n 1 file changed, 15 insertions(+), 3 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 996743cf48ef..44760093f7ab 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -995,7 +995,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@@ -1016,9 +1015,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@@ -1028,7 +1034,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@@ -1056,6 +1061,13 @@ 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\tif (embeddedEntity)\n+\t\t\tdata->unicam_[Unicam::Embedded].dev()->bufferReady.disconnect();\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", "v5", "11/11" ] }