Patch Detail
Show a patch.
GET /api/1.1/patches/24719/?format=api
{ "id": 24719, "url": "https://patchwork.libcamera.org/api/1.1/patches/24719/?format=api", "web_url": "https://patchwork.libcamera.org/patch/24719/", "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": "<20251022080011.97665-1-stefan.klug@ideasonboard.com>", "date": "2025-10-22T07:59:11", "name": "libcamera: pipeline_handler: Fix requestComplete on waiting requests on stop", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "97653ab9d32bca5533018ef29aa1171ca00fd160", "submitter": { "id": 184, "url": "https://patchwork.libcamera.org/api/1.1/people/184/?format=api", "name": "Stefan Klug", "email": "stefan.klug@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/24719/mbox/", "series": [ { "id": 5516, "url": "https://patchwork.libcamera.org/api/1.1/series/5516/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5516", "date": "2025-10-22T07:59:11", "name": "libcamera: pipeline_handler: Fix requestComplete on waiting requests on stop", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5516/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/24719/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/24719/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 A59E3C3259\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 22 Oct 2025 08:00:21 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 92F886079B;\n\tWed, 22 Oct 2025 10:00:20 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 08ADF6069A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 22 Oct 2025 10:00:19 +0200 (CEST)", "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:743e:771f:a1ba:58db])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id C7D38605;\n\tWed, 22 Oct 2025 09:58:34 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"tVzQ9Jjf\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1761119914;\n\tbh=C0DPdxPgR2W1aIYpY3KkqRUmqkUJgw7ihACq4tcQq0E=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=tVzQ9Jjf2Nyrs/xNPyukZ4SSmmMYWZkwCbK7+1Hl3eMqqk33VOBHS5vwZQyPUD9pr\n\tWa68yy9qfCN/c1yEJer3XDPlgS9WnEnEWkUq84qlu0PnzjcCYtK47y3qYWoBvl1mdn\n\t4mzwpPLqSBBHAauNwbXqbOJLRnEjhTc6OxTBKOKk=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>", "Subject": "[PATCH] libcamera: pipeline_handler: Fix requestComplete on waiting\n\trequests on stop", "Date": "Wed, 22 Oct 2025 09:59:11 +0200", "Message-ID": "<20251022080011.97665-1-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.48.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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 requestComplete signal is not emitted when the camera is stopped and\nthe request is still in the waitingRequests_ queue. This was reported in\n[1]. Fix that by calling doQueueRequest() on the waiting requests after\nmarking them as cancelled. This ensures that the request is not queued\nto the device but gets added to the queuedRequests_ list. This list is\nthen iterated in completeRequest() and leads to the requestComplete\nsignal.\n\n[1] https://gitlab.freedesktop.org/camera/libcamera/-/issues/281\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\n src/libcamera/pipeline_handler.cpp | 10 +++++++++-\n 1 file changed, 9 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\nindex e5f9e55c9783..3aa814069382 100644\n--- a/src/libcamera/pipeline_handler.cpp\n+++ b/src/libcamera/pipeline_handler.cpp\n@@ -380,7 +380,15 @@ void PipelineHandler::stop(Camera *camera)\n \twhile (!waitingRequests.empty()) {\n \t\tRequest *request = waitingRequests.front();\n \t\twaitingRequests.pop();\n-\t\tcancelRequest(request);\n+\n+\t\t/*\n+\t\t * Cancel all requests by marking them as cancelled and calling\n+\t\t * doQueueRequest() instead of cancelRequest() to ensure the\n+\t\t * request is temporarily added to queuedRequests_ so it can\n+\t\t * then be properly completed in completeRequest().\n+\t\t */\n+\t\trequest->_d()->cancel();\n+\t\tdoQueueRequest(request);\n \t}\n \n \t/* Make sure no requests are pending. */\n", "prefixes": [] }