{"id":14171,"url":"https://patchwork.libcamera.org/api/1.1/patches/14171/?format=json","web_url":"https://patchwork.libcamera.org/patch/14171/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20211018132923.476242-11-umang.jain@ideasonboard.com>","date":"2021-10-18T13:29:22","name":"[libcamera-devel,10/11] android: camera_stream: Don't close fence if wait times out","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"5c4aaf4f9cdbd5333b3b08bc66a627fcf0a99208","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/1.1/people/86/?format=json","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"delegate":{"id":12,"url":"https://patchwork.libcamera.org/api/1.1/users/12/?format=json","username":"uajain","first_name":"Umang","last_name":"Jain","email":"umang.jain@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/patch/14171/mbox/","series":[{"id":2636,"url":"https://patchwork.libcamera.org/api/1.1/series/2636/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2636","date":"2021-10-18T13:29:12","name":"android: Overhaul request handling","version":1,"mbox":"https://patchwork.libcamera.org/series/2636/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/14171/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/14171/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 ACA70C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 Oct 2021 13:29:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6B0F268F64;\n\tMon, 18 Oct 2021 15:29:50 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BDDC768F60\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Oct 2021 15:29:48 +0200 (CEST)","from perceval.ideasonboard.com (unknown [103.238.109.14])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D01A28C6;\n\tMon, 18 Oct 2021 15:29:47 +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=\"AOsD7tvU\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634563788;\n\tbh=Pna2DOMPVmcbBo9n3dA7+M7H4FWppL8o3I67I00q8y0=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=AOsD7tvUJmuuiu3ExM8hGEpukl0OtUObX2d5UBLCkdiScWTPv9gWqOCVqYh5R+YYu\n\t5jgC+3EbkJtJOXh3J3XEV6l0D0FCzb43J9DiNR1x12QGMgN1SuIRw+SgPY97mfKb9B\n\thV/fJQxyaC8NySsIy6I09dBitdTVxNYZj5mT85oI=","From":"Umang Jain <umang.jain@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 18 Oct 2021 18:59:22 +0530","Message-Id":"<20211018132923.476242-11-umang.jain@ideasonboard.com>","X-Mailer":"git-send-email 2.31.1","In-Reply-To":"<20211018132923.476242-1-umang.jain@ideasonboard.com>","References":"<20211018132923.476242-1-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 10/11] android: camera_stream: Don't close\n\tfence if wait times out","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":"From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nThe camera HAL APIs requires that any acquire fence that hasn't been\nwaited on to be sent back to the framework as a release fence. The\nCameraDevice already copies the acquire fence to the release fence when\nsignaling request completion, but the CameraStream incorrectly closes\nthe fence when a wait times out and sets it to -1. Fix it.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/android/camera_stream.cpp | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)","diff":"diff --git a/src/android/camera_stream.cpp b/src/android/camera_stream.cpp\nindex 9b5cd0c4..8e6ccb83 100644\n--- a/src/android/camera_stream.cpp\n+++ b/src/android/camera_stream.cpp\n@@ -147,16 +147,16 @@ int CameraStream::process(const FrameBuffer &source,\n \t\t\t  Camera3RequestDescriptor *request)\n {\n \t/* Handle waiting on fences on the destination buffer. */\n-\tint fence = dest.fence;\n-\tif (fence != -1) {\n-\t\tint ret = waitFence(fence);\n-\t\t::close(fence);\n-\t\tdest.fence = -1;\n+\tif (dest.fence != -1) {\n+\t\tint ret = waitFence(dest.fence);\n \t\tif (ret < 0) {\n \t\t\tLOG(HAL, Error) << \"Failed waiting for fence: \"\n-\t\t\t\t\t<< fence << \": \" << strerror(-ret);\n+\t\t\t\t\t<< dest.fence << \": \" << strerror(-ret);\n \t\t\treturn ret;\n \t\t}\n+\n+\t\t::close(dest.fence);\n+\t\tdest.fence = -1;\n \t}\n \n \tif (!postProcessor_)\n","prefixes":["libcamera-devel","10/11"]}