Patch Detail
Show a patch.
GET /api/1.1/patches/13723/?format=api
{ "id": 13723, "url": "https://patchwork.libcamera.org/api/1.1/patches/13723/?format=api", "web_url": "https://patchwork.libcamera.org/patch/13723/", "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": "<20210907145459.270129-1-umang.jain@ideasonboard.com>", "date": "2021-09-07T14:54:59", "name": "[libcamera-devel] android: mm: cros_camera_buffer: Log failure error on cleanup", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "4dd21e13740cb45dac2fee537cd6d7ba49e836cb", "submitter": { "id": 86, "url": "https://patchwork.libcamera.org/api/1.1/people/86/?format=api", "name": "Umang Jain", "email": "umang.jain@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/13723/mbox/", "series": [ { "id": 2489, "url": "https://patchwork.libcamera.org/api/1.1/series/2489/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2489", "date": "2021-09-07T14:54:59", "name": "[libcamera-devel] android: mm: cros_camera_buffer: Log failure error on cleanup", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2489/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/13723/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/13723/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 6C388BE175\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 7 Sep 2021 14:55:08 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DDFB660251;\n\tTue, 7 Sep 2021 16:55:07 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3AC9A60251\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 7 Sep 2021 16:55:06 +0200 (CEST)", "from perceval.ideasonboard.com (unknown [103.251.226.180])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 258DB24F;\n\tTue, 7 Sep 2021 16:55:04 +0200 (CEST)" ], "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=\"ggZFp6vX\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1631026505;\n\tbh=HgSWKStKEvtiQrOm2jARuliM2eIyFnnKeDkcMfw7Sl8=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=ggZFp6vX8ocS/a0/piPDLAveqX014irT/x77BvKs0tFhJ2PRuK1ioqo27yc34hOKL\n\tk0gaMDMkHdkI6SEmHSd3VP9nyumT7h3Mqz3DOHlA2ikT7n4ekbKbkCyYCrgspqoSoS\n\tMyqFLbs/+eTQkuctOv+TOw7wYeKjzJpWe50+CKRk=", "From": "Umang Jain <umang.jain@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 7 Sep 2021 20:24:59 +0530", "Message-Id": "<20210907145459.270129-1-umang.jain@ideasonboard.com>", "X-Mailer": "git-send-email 2.31.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] android: mm: cros_camera_buffer: Log\n\tfailure error on cleanup", "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": "Failure can still happen by CameraBufferManager during Unlock() and/or\nDeregister() of camera3Buffer handles. We should be logging those\nerrors as well.\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\n---\nI have been able to spot one of the failure which is happening on my\nin-developement async post-processing. It is due a failure in\nDeregister(). It is intermittent and non-fatal as far as I can see.\n\nHaving a failure log in HAL, apart from https://paste.debian.net/1210728/\nhelps to know the exact place from where the error is originating from\nlibcamera HAL.\n---\n src/android/mm/cros_camera_buffer.cpp | 19 +++++++++++++++----\n 1 file changed, 15 insertions(+), 4 deletions(-)", "diff": "diff --git a/src/android/mm/cros_camera_buffer.cpp b/src/android/mm/cros_camera_buffer.cpp\nindex ec45e04c..307914c3 100644\n--- a/src/android/mm/cros_camera_buffer.cpp\n+++ b/src/android/mm/cros_camera_buffer.cpp\n@@ -73,10 +73,20 @@ CameraBuffer::Private::Private([[maybe_unused]] CameraBuffer *cameraBuffer,\n \n CameraBuffer::Private::~Private()\n {\n-\tif (mapped_)\n-\t\tbufferManager_->Unlock(handle_);\n-\tif (registered_)\n-\t\tbufferManager_->Deregister(handle_);\n+\tint ret;\n+\tif (mapped_) {\n+\t\tret = bufferManager_->Unlock(handle_);\n+\t\tif (ret != 0)\n+\t\t\tLOG(HAL, Error) << \"Failed to unlock buffer: \"\n+\t\t\t\t\t<< strerror(-ret);\n+\t}\n+\n+\tif (registered_) {\n+\t\tret = bufferManager_->Deregister(handle_);\n+\t\tif (ret != 0)\n+\t\t\tLOG(HAL, Error) << \"Failed to deregister buffer: \"\n+\t\t\t\t\t<< strerror(-ret);\n+\t}\n }\n \n unsigned int CameraBuffer::Private::numPlanes() const\n@@ -138,6 +148,7 @@ size_t CameraBuffer::Private::jpegBufferSize([[maybe_unused]] size_t maxJpegBuff\n void CameraBuffer::Private::map()\n {\n \tint ret;\n+\tLOG(HAL, Error) << \"GEtting mapped : \" << numPlanes_;\n \tswitch (numPlanes_) {\n \tcase 1: {\n \t\tret = bufferManager_->Lock(handle_, 0, 0, 0, 0, 0, &mem.addr);\n", "prefixes": [ "libcamera-devel" ] }