Patch Detail
Show a patch.
GET /api/patches/17372/?format=api
{ "id": 17372, "url": "https://patchwork.libcamera.org/api/patches/17372/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17372/", "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": "<20220916100517.12446-2-naush@raspberrypi.com>", "date": "2022-09-16T10:05:16", "name": "[libcamera-devel,v1,1/2] pipeline: raspberrypi: Add an error state", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "f689839a8fa1f2657637111deccc04c898bb3581", "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/17372/mbox/", "series": [ { "id": 3488, "url": "https://patchwork.libcamera.org/api/series/3488/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3488", "date": "2022-09-16T10:05:15", "name": "Raspberry Pi: Timeout error handling", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3488/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17372/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17372/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 C90FAC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 16 Sep 2022 10:05:28 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1A4C561FB0;\n\tFri, 16 Sep 2022 12:05:27 +0200 (CEST)", "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 CDB0C6099B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 Sep 2022 12:05:25 +0200 (CEST)", "by mail-wr1-x429.google.com with SMTP id z6so2704807wrq.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 Sep 2022 03:05:25 -0700 (PDT)", "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\te13-20020adfa74d000000b002286231f479sm4632026wrd.50.2022.09.16.03.05.24\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 16 Sep 2022 03:05:24 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1663322727;\n\tbh=bdeiGJbr7u7LP9iu01w1eABMxGGF0KnxyR9VCC3RH8w=;\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=Lp4q8Nb3vF7xlhX/A56pU+sM51bEbZqlZwYsbgi/vkWwVDhHLInJxzTopHMGdH9rR\n\tBZ3Qmr40TQkhKfohMY/x3FIgNiJDy3rfb73EBH0SV2ks2XHE4XtJx9TZj+ArrRwnjz\n\tWofo/24Yi2Abf6qHiUpRZr1e8NjxcQ6wA26KDPs6gIdPmQdwhir7OLL3uFopytVNxT\n\tc1kfP4Kg0TegLmT/knZe/WC1A2oUKFZ9Abd9dP2dqirKbghBXuCVDpMx5BsNez205n\n\t18zeMN03AWNW3DX2wvx6peuVrOedUxOneDFVHTZX832+noLFT2jv0a8ygdZbSm/0Hj\n\tJH3L39yweK1rw==", "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\tbh=++Pp3uxOune9JHLV8GT78Y14hhcSIm7V/rRyxRBxhtE=;\n\tb=QH5QneBIvJoNtRKiCIXxr/XhHI/9IjblztCw09+GviQ8vJI5PyiHrN7IWc52KkDvt3\n\tQ5fcXmEqzjdYrOmBIwocZTN+pp5zAwquGUL8NKlmIWN2ygYNq2aBznvNMNDpn5T6j3f3\n\tIoCkDjjVAPxtmU2X6oJGJi6RI286TTsoAEA41/J+3wpY4ylB7llZGVg+fjtcHs6/cZeI\n\tJHZ/S8NkOLQ/lYRmsYp5mOrwJWxGPIapdcJRrfrXbZvbLWCB5U8FSPQofZ92YR0TQWpK\n\tGEhfBgo8jQH5GSFMYzLrJGKFghSDDRZHwnYBdg1VjfG9n5eQByTEYpsAoFpF2z7QTK8B\n\tJMSQ==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"QH5QneBI\"; 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;\n\tbh=++Pp3uxOune9JHLV8GT78Y14hhcSIm7V/rRyxRBxhtE=;\n\tb=L+k2HpmM2atdnflpOjw8zB61KZgK/Gb33Kqrwd0Qk0VA8wuTgmOjz9L0VL2/TclFqp\n\tWNUqQrgyQa9XunI6Q+3te1q3xyG5kIgJJz9c4i4pLtSWTB4Qesw0fEG9RmVmbT6ACfPP\n\ttKPF7CQjbHxibqXtjXP/FEg/jyW5r313HIj00ZDiISwySEbgjFQo7Yiu3Z4HxrIlbpyc\n\t4G4PNEoE7vTeB0rSUd5c33kzhQDvQbitfBO+l0r+xPGvusRCZIHaL+D3Rv06IEh8GE8v\n\tBD+5c2AmdbpfPVKxtK7llezB2u8+uQ8jEDE36PPtQ2VAmiKtKgljLz4b2DWKOV38l7b7\n\ttzcg==", "X-Gm-Message-State": "ACrzQf3OaWtqHK7f0eKPRqP1P04xueEYEGe4A+gutOqQgzYrricmlO6I\n\tAKGWMkorRp9QehD1ZvAciAOGsuQc6PCyHOBN", "X-Google-Smtp-Source": "AMsMyM5G7Gfi+aZnJs6Tv5eItK0g/17NJgVKvKayJgwirGE7tqIQkSJe8/iv1LEeDmGs/iuwRSl0Kw==", "X-Received": "by 2002:adf:d1ce:0:b0:22a:36d6:da05 with SMTP id\n\tb14-20020adfd1ce000000b0022a36d6da05mr2434562wrd.719.1663322725098; \n\tFri, 16 Sep 2022 03:05:25 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 16 Sep 2022 11:05:16 +0100", "Message-Id": "<20220916100517.12446-2-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220916100517.12446-1-naush@raspberrypi.com>", "References": "<20220916100517.12446-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v1 1/2] pipeline: raspberrypi: Add an\n\terror state", "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 an error state used internally in the Raspberry Pi pipeline handler.\nCurrently this state is never set, but will be in a subsequent commit when a\ndevice timeout has been signalled.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n .../pipeline/raspberrypi/raspberrypi.cpp | 18 ++++++++++--------\n 1 file changed, 10 insertions(+), 8 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex b4094898ca6c..d429cb444d58 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -253,7 +253,7 @@ public:\n \t * thread. So, we do not need to have any mutex to protect access to any\n \t * of the variables below.\n \t */\n-\tenum class State { Stopped, Idle, Busy, IpaComplete };\n+\tenum class State { Stopped, Idle, Busy, IpaComplete, Error };\n \tState state_;\n \n \tstruct BayerFrame {\n@@ -1109,7 +1109,8 @@ int PipelineHandlerRPi::queueRequestDevice(Camera *camera, Request *request)\n {\n \tRPiCameraData *data = cameraData(camera);\n \n-\tif (data->state_ == RPiCameraData::State::Stopped)\n+\tif (data->state_ == RPiCameraData::State::Stopped ||\n+\t data->state_ == RPiCameraData::State::Error)\n \t\treturn -EINVAL;\n \n \tLOG(RPI, Debug) << \"queueRequestDevice: New request.\";\n@@ -1708,7 +1709,7 @@ void RPiCameraData::enumerateVideoDevices(MediaLink *link)\n \n void RPiCameraData::statsMetadataComplete(uint32_t bufferId, const ControlList &controls)\n {\n-\tif (state_ == State::Stopped)\n+\tif (state_ == State::Stopped || state_ == State::Error)\n \t\treturn;\n \n \tFrameBuffer *buffer = isp_[Isp::Stats].getBuffers().at(bufferId);\n@@ -1744,7 +1745,7 @@ void RPiCameraData::statsMetadataComplete(uint32_t bufferId, const ControlList &\n \n void RPiCameraData::runIsp(uint32_t bufferId)\n {\n-\tif (state_ == State::Stopped)\n+\tif (state_ == State::Stopped || state_ == State::Error)\n \t\treturn;\n \n \tFrameBuffer *buffer = unicam_[Unicam::Image].getBuffers().at(bufferId);\n@@ -1759,7 +1760,7 @@ void RPiCameraData::runIsp(uint32_t bufferId)\n \n void RPiCameraData::embeddedComplete(uint32_t bufferId)\n {\n-\tif (state_ == State::Stopped)\n+\tif (state_ == State::Stopped || state_ == State::Error)\n \t\treturn;\n \n \tFrameBuffer *buffer = unicam_[Unicam::Embedded].getBuffers().at(bufferId);\n@@ -1825,7 +1826,7 @@ void RPiCameraData::unicamBufferDequeue(FrameBuffer *buffer)\n \tRPi::Stream *stream = nullptr;\n \tint index;\n \n-\tif (state_ == State::Stopped)\n+\tif (state_ == State::Stopped || state_ == State::Error)\n \t\treturn;\n \n \tfor (RPi::Stream &s : unicam_) {\n@@ -1864,7 +1865,7 @@ void RPiCameraData::unicamBufferDequeue(FrameBuffer *buffer)\n \n void RPiCameraData::ispInputDequeue(FrameBuffer *buffer)\n {\n-\tif (state_ == State::Stopped)\n+\tif (state_ == State::Stopped || state_ == State::Error)\n \t\treturn;\n \n \tLOG(RPI, Debug) << \"Stream ISP Input buffer complete\"\n@@ -1881,7 +1882,7 @@ void RPiCameraData::ispOutputDequeue(FrameBuffer *buffer)\n \tRPi::Stream *stream = nullptr;\n \tint index;\n \n-\tif (state_ == State::Stopped)\n+\tif (state_ == State::Stopped || state_ == State::Error)\n \t\treturn;\n \n \tfor (RPi::Stream &s : isp_) {\n@@ -1991,6 +1992,7 @@ void RPiCameraData::handleState()\n \tswitch (state_) {\n \tcase State::Stopped:\n \tcase State::Busy:\n+\tcase State::Error:\n \t\tbreak;\n \n \tcase State::IpaComplete:\n", "prefixes": [ "libcamera-devel", "v1", "1/2" ] }