Patch Detail
Show a patch.
GET /api/1.1/patches/17386/?format=api
{ "id": 17386, "url": "https://patchwork.libcamera.org/api/1.1/patches/17386/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17386/", "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": "<20220921080258.5268-3-naush@raspberrypi.com>", "date": "2022-09-21T08:02:58", "name": "[libcamera-devel,v2,2/2] pipeline: raspberrypi: Improve Unicam timeout handling", "commit_ref": "a64d17b9cff1b7361ebea31b7ae1dc1357493670", "pull_url": null, "state": "accepted", "archived": false, "hash": "c3ca6775c45d00046f828571719e5c0beb0b8b8c", "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/17386/mbox/", "series": [ { "id": 3495, "url": "https://patchwork.libcamera.org/api/1.1/series/3495/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3495", "date": "2022-09-21T08:02:56", "name": "Raspberry Pi: Timeout error handling", "version": 2, "mbox": "https://patchwork.libcamera.org/series/3495/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17386/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17386/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 2AA75C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 21 Sep 2022 08:03:08 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9BB5B621DE;\n\tWed, 21 Sep 2022 10:03:06 +0200 (CEST)", "from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com\n\t[IPv6:2a00:1450:4864:20::42e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E4F2461F80\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 Sep 2022 10:03:03 +0200 (CEST)", "by mail-wr1-x42e.google.com with SMTP id bq9so8510013wrb.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 Sep 2022 01:03:03 -0700 (PDT)", "from naush-laptop.localdomain (global-5-56.n-1.net.cam.ac.uk.\n\t[131.111.5.56]) by smtp.gmail.com with ESMTPSA id\n\tl36-20020a05600c08a400b003b4727d199asm1905782wmp.15.2022.09.21.01.03.02\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 21 Sep 2022 01:03:02 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1663747386;\n\tbh=JFuytqubwHW4jMyriYXD/uXre9j0FdOSmOh60kEISoU=;\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=mqpzfLZJUEbE0XfcBJ7rYjSsLXo3MP7sRxxz8YUuVO0srErEykd5H1lajJYGLxCrz\n\t06j9kEoXmpEDDaKvwiXw+tEWExRRyXK/SI49i/YywC6fWHB9pzSKor+NDUkNjYBc1U\n\tG1z0TGzJTu7cO91V1IBiKrD2P6ykJbR0erNhpEQXYdI5EB7eQhG9Gqbk5iMK5fizby\n\t0CANZQLD4j9YSBLrtWFlr7Y8tjrsBpmu6cmf+DQblLhsPz/HAp+98CnkPoamqW0405\n\t43K10P6i2/PkUpT2q0oamyHg/xUihfnuHiiISynAeQTdg8iUVqb67vYcD9AkNXRCQ2\n\tcaxvpGEnIDGsQ==", "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=ayQ2oRjuGzA/5I7cNI63lEToSCgSiCoOFJLWeh35i4c=;\n\tb=SmO5tnnGu+rRNZVl/UmvxVyont0dVvHDo0WN1eVrHfKc52xiJaDiYmQ9WpXZb5K4ho\n\tOPdsjxT8NO/m6JZ7fJtX2p+zcFsgpnzpqdN8CHJkWiPAWKeUAGtzxCYh/wlL3rKql8j7\n\tehklRyDGLi4QvaSp2dSRCJQGHg8fqkvxm+OgaB612ra8Ik5r26ZtZ8ELA4jmXQDCSYOS\n\t7HP0eDLxKZ+9NBoRN0edFHXrbPmUchxNW6Pjo3dYHoaJBa0GIITuxv/ada7HgyEXq9wc\n\tM0OHlO4k411B5BqDeifdcDLiFe2qCuBAqitjh8ipd6xPX5QiBQOIPRMPyIXxKkfBPbgW\n\twifg==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"SmO5tnnG\"; 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=ayQ2oRjuGzA/5I7cNI63lEToSCgSiCoOFJLWeh35i4c=;\n\tb=dk+6na5XyqWsB9+kbrtd3QgUQ+uIXxxxH8aCc8p/dBPwyQ9jBexcqj8QU+sbqu5q77\n\tgho8wDkDhOHymE1l6sstS3b70q2MTyQmISer4sx65Ss95l3quBRJ51oz363sRjS6KkWn\n\t5XLZRsY62kd7C87989ja5VmA2GtBY0s3+cYq7T+/rPkdbMNyjlg/xg864O0iXeFmgJF8\n\tT27KEev8ORon3LGDk5OgvgLXedkzwvDrP5Had49Kezb+TS0KeTjmESrLALpjScWKK4gB\n\tCXwFw57KJkpmij6upqsfghu02k97qLCLwvULcSqoB81N8Mjz14is2Heyk1jTfD6dnCL1\n\tGNvg==", "X-Gm-Message-State": "ACrzQf2X4awEnUG/+SmfmR/8KFMxy8klkM5GW7Kqa9TT7mPEygiutkrs\n\tpaeKjYI5qLOp8xHFKF0o9iaACV4C6YM8NKTC", "X-Google-Smtp-Source": "AMsMyM5d81YlqM8oxsi2cUkRY1NaOxKyg51LVs4qRuh78wkpjLT4vkK4H2T8OMntqShyl+JJUvGzaw==", "X-Received": "by 2002:a5d:64e5:0:b0:22a:3cae:93bf with SMTP id\n\tg5-20020a5d64e5000000b0022a3cae93bfmr16526808wri.323.1663747383214; \n\tWed, 21 Sep 2022 01:03:03 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 21 Sep 2022 09:02:58 +0100", "Message-Id": "<20220921080258.5268-3-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220921080258.5268-1-naush@raspberrypi.com>", "References": "<20220921080258.5268-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 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>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.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 5c8c89585200..dcd81650c32d 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -1823,6 +1823,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 devices 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", "v2", "2/2" ] }