Patch Detail
Show a patch.
GET /api/patches/11716/?format=api
{ "id": 11716, "url": "https://patchwork.libcamera.org/api/patches/11716/?format=api", "web_url": "https://patchwork.libcamera.org/patch/11716/", "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": "<20210325134231.1400051-9-kieran.bingham@ideasonboard.com>", "date": "2021-03-25T13:42:26", "name": "[libcamera-devel,v3,06/11] libcamera: camera: Validate requests are completed in Running state", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "719e652a9f3a7213abb9fa7a389c9c45ce08f7fc", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": { "id": 11, "url": "https://patchwork.libcamera.org/api/users/11/?format=api", "username": "kbingham", "first_name": "Kieran", "last_name": "Bingham", "email": "kieran.bingham@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/patch/11716/mbox/", "series": [ { "id": 1832, "url": "https://patchwork.libcamera.org/api/series/1832/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1832", "date": "2021-03-25T13:42:18", "name": "[libcamera-devel,v3,01/11] utils: ipc: proxy: Track IPA with a state machine", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1832/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/11716/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/11716/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 3382DC32E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 25 Mar 2021 13:42:48 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E66BB68D7E;\n\tThu, 25 Mar 2021 14:42:47 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 17F9668D66\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 25 Mar 2021 14:42:38 +0100 (CET)", "from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net\n\t[86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id AC2F7560;\n\tThu, 25 Mar 2021 14:42:37 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"A7soGS87\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1616679757;\n\tbh=3phRjmHWCr/7dGInyNkMdaCLwsrOcGcBRQnA3ggRd3Y=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=A7soGS874I1jwxt6MIfuTt6rh51m4qieuJKGwB6HzqwfIUq0KXlg7Wkp8iW1ww7dc\n\tdnLQ/EvrnhtWnqbgKjkDNAiishOlzjOsn2GQtML9Wc4VBrvsRbj0PCfcuHd01cnVku\n\t2teM3a8kMpfxk/HCBm7ZEtAskUqSOtX9kTvmX4Q4=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "libcamera devel <libcamera-devel@lists.libcamera.org>", "Date": "Thu, 25 Mar 2021 13:42:26 +0000", "Message-Id": "<20210325134231.1400051-9-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210325134231.1400051-1-kieran.bingham@ideasonboard.com>", "References": "<20210325134231.1400051-1-kieran.bingham@ideasonboard.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v3 06/11] libcamera: camera: Validate\n\trequests are completed in Running 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>", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "All requests must have completed before the Camera has fully stopped.\n\nRequests completing when the camera is not running represent an internal\npipeline handler bug.\n\nTrap this event with a fatal error.\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/camera.cpp | 11 +++++++++--\n 1 file changed, 9 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\nindex 84edbb8f494d..b86bff4745b2 100644\n--- a/src/libcamera/camera.cpp\n+++ b/src/libcamera/camera.cpp\n@@ -1062,11 +1062,11 @@ int Camera::stop()\n \n \tLOG(Camera, Debug) << \"Stopping capture\";\n \n-\td->setState(Private::CameraConfigured);\n-\n \td->pipe_->invokeMethod(&PipelineHandler::stop, ConnectionTypeBlocking,\n \t\t\t this);\n \n+\td->setState(Private::CameraConfigured);\n+\n \treturn 0;\n }\n \n@@ -1079,6 +1079,13 @@ int Camera::stop()\n */\n void Camera::requestComplete(Request *request)\n {\n+\tPrivate *const d = LIBCAMERA_D_PTR();\n+\n+\t/* Disconnected cameras are still able to complete requests. */\n+\tint ret = d->isAccessAllowed(Private::CameraRunning);\n+\tif (ret < 0 && ret != -ENODEV)\n+\t\tLOG(Camera, Fatal) << \"Trying to complete a request when stopped\";\n+\n \trequestCompleted.emit(request);\n }\n \n", "prefixes": [ "libcamera-devel", "v3", "06/11" ] }