Patch Detail
Show a patch.
GET /api/1.1/patches/17373/?format=api
{ "id": 17373, "url": "https://patchwork.libcamera.org/api/1.1/patches/17373/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17373/", "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": "<20220916100517.12446-3-naush@raspberrypi.com>", "date": "2022-09-16T10:05:17", "name": "[libcamera-devel,v1,2/2] pipeline: raspberrypi: Improve Unicam timeout handling", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "17243b9e55ed307a4951846416afa23589f9b355", "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/17373/mbox/", "series": [ { "id": 3488, "url": "https://patchwork.libcamera.org/api/1.1/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/17373/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17373/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 0D804C327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 16 Sep 2022 10:05:30 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A31E561FF4;\n\tFri, 16 Sep 2022 12:05:29 +0200 (CEST)", "from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com\n\t[IPv6:2a00:1450:4864:20::42a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B064361FB4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 Sep 2022 12:05:26 +0200 (CEST)", "by mail-wr1-x42a.google.com with SMTP id t7so35167877wrm.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 Sep 2022 03:05:26 -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.25\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 16 Sep 2022 03:05:25 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1663322729;\n\tbh=EzWkA6pk8E2g3hENOYf1fsFrzDirRIxhvEn2CQmvTgE=;\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=yObepkHa5Nczxe9YQLj7CGhKRG19HN+TCBGroGMsNKBq4Rsnf1DrdJMBcIxBhCwym\n\tA94wLuaLbfIEjgkLNDsyhnzn2baT9Y3wo9eM9mXeOJzCpScIsjm6es6DHzDE5tr+SK\n\tjtcnHjQhWlR0yjmAijRyEtTaZ1lKTqmsPy2GyP7s9s7yCEmX4i9n7bPs75wwofMsPr\n\tOLpbnViPpeATvQLWsfdD4VkjpjYYxXFszzIS20ckfRqkQVpIR5cLnsca0VVqnDqENO\n\tZJvmc/+aMTh0pOy8zIMmANuiaHA8XbTaoRXRl9F4KDa67Mf+1dmc1MJsrokMCCiVfZ\n\tSzqb8vPicTG6w==", "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=zBdSbHDzOYtFo6cBPiKh6r56tg2FXiywwgw/c3JyCU0=;\n\tb=sZufrU+Yx/28YbXGUlV8FkyiR7HIMoXyMqFoIGOgrV/FdMituA7Skx1Ed3+NAuN5fg\n\tyZ/kZCjR9gb/ACuuQaX/HWf6t12FAgL2E8VpMEKSDxSSv2JyN/jJ2QgtCIajMoD8stKR\n\t4Z4zL0ckJiP968Uh9bcG2kHmxMwI6rc3OW7rh/kxCWqi9Nfb31K1Q5eYgo0kEsQ0k4rk\n\tscopXNKowk0BY9gKRZtCbBhp5cOi4V+PDSgo2/oZreOoZy5FQ4dWGXe+2uLphW+t9f3F\n\tX1tTXC5enjFT7IU1us+kFKDfh3X9txr29jjg9DNdX68suwI9wQV7PmfJUvEUIhjumQfw\n\tYLTw==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"sZufrU+Y\"; 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=zBdSbHDzOYtFo6cBPiKh6r56tg2FXiywwgw/c3JyCU0=;\n\tb=tTqlcb525OP6VWHr/5QU6ELd0RviFUdePHReG74YT3BkMgCxTUTnQipeAwKdO0QlnV\n\t3tNZdqNDWqJTyT3E6rn+/kKU3OgVOqE4grSrvNRl61PDvfPtgCY+uWlv8lugOa5uLTYd\n\tSMrAfyj45WhF2Vx7cfES34tijP4BOtWSBWmB0mUjpi2kgwqlecTztvYKcJR/lOft/DA4\n\tapvQ9IgwT5V2FxEwVt6CChFwo+EO1eRmIi6H+lZbvfLFtNRuh103eUIOHS4Y73uThsRf\n\tozhgc2we9kB4Bn1SWtHQq9kDurpG5rWeif3YFDA+HMa1B6mpRnvxFv8xKNyuK3Mk0v+A\n\tNBSw==", "X-Gm-Message-State": "ACrzQf1XKKtDJtmWX5jfcY3lK7+S6Cads4xazEIh0B/SE15tXObeJitn\n\tZRzFWmaBtdo8yt1lK+uAXasFlaYrJLkr+bIr", "X-Google-Smtp-Source": "AMsMyM7nFZYGP9bG2pgnG/Xr+7eyb5EqVyjjhESZfIdeqjvu0m5JoUiXeR3k6NDYkCxSQ4vKddjNmA==", "X-Received": "by 2002:a05:6000:1048:b0:228:6898:aa50 with SMTP id\n\tc8-20020a056000104800b002286898aa50mr2277813wrx.233.1663322725996; \n\tFri, 16 Sep 2022 03:05:25 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 16 Sep 2022 11:05:17 +0100", "Message-Id": "<20220916100517.12446-3-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 2/2] pipeline: raspberrypi: Improve\n\tUnicam timeout handling", "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": "Currently, if a Unicam timeout is signalled, the pipeline handler only raises\nan error message. Update the error handling to put the pipeline handler in an\ninternal error state, disable all device streams, and return all outstanding\nrequests as cancelled. Any subsequent requests that come into the pipeline\nhandler will also be returned as cancelled.\n\nAny further error handling (e.g. a reset with camera stop()/start()) is up to\nthe application to perform as it requires.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 11 +++++++++++\n 1 file changed, 11 insertions(+)", "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex d429cb444d58..4464d4d07f15 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -1819,6 +1819,17 @@ void RPiCameraData::unicamTimeout()\n \tLOG(RPI, Error) << \"Unicam has timed out!\";\n \tLOG(RPI, Error) << \"Please check that your camera sensor connector is attached securely.\";\n \tLOG(RPI, Error) << \"Alternatively, try another cable and/or sensor.\";\n+\n+\tstate_ = RPiCameraData::State::Error;\n+\t/*\n+\t * To allow the application to attempt a recovery from this timeout,\n+\t * stop all device streaming, and return any outstanding requests as\n+\t * incomplete and cancelled.\n+\t */\n+\tfor (auto const stream : streams_)\n+\t\tstream->dev()->streamOff();\n+\n+\tclearIncompleteRequests();\n }\n \n void RPiCameraData::unicamBufferDequeue(FrameBuffer *buffer)\n", "prefixes": [ "libcamera-devel", "v1", "2/2" ] }