{"id":11558,"url":"https://patchwork.libcamera.org/api/1.1/patches/11558/?format=json","web_url":"https://patchwork.libcamera.org/patch/11558/","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":"<20210312054727.852622-8-kieran.bingham@ideasonboard.com>","date":"2021-03-12T05:47:26","name":"[libcamera-devel,v2,7/8] libcamera: pipeline: ipu3: Ensure no requests are pending at stop()","commit_ref":null,"pull_url":null,"state":"changes-requested","archived":false,"hash":"e5be43c06a03ac7625e189a9a36cb78e1810ee2c","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/1.1/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":{"id":11,"url":"https://patchwork.libcamera.org/api/1.1/users/11/?format=json","username":"kbingham","first_name":"Kieran","last_name":"Bingham","email":"kieran.bingham@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/patch/11558/mbox/","series":[{"id":1785,"url":"https://patchwork.libcamera.org/api/1.1/series/1785/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1785","date":"2021-03-12T05:47:19","name":"IPU3 Stability","version":2,"mbox":"https://patchwork.libcamera.org/series/1785/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/11558/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/11558/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 4CCF0BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Mar 2021 05:47:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 050A568C71;\n\tFri, 12 Mar 2021 06:47:39 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E8F5868C72\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Mar 2021 06:47:33 +0100 (CET)","from localhost.localdomain\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 844FEB60;\n\tFri, 12 Mar 2021 06:47:33 +0100 (CET)"],"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=\"vlqRx/UM\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615528053;\n\tbh=kgO76cnZq5+HAIHE0rd6caDxMO6D5eBzGOa4V+mF1I0=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=vlqRx/UMZuICbXi8UYEgObYXyiV2YjzYBUIfLwKFAiFy142C4L9NmmpwTNNRtDiEp\n\tPa40Khc/XeV9lrWEa/EkHCFzqhqWl1iQY/9htXURvTFST1og1F2q/CSvTm6wHERYhO\n\tK+TJza6+rjn39UyREiscnvfXzDxhkiJAmlw/2Jmg=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Fri, 12 Mar 2021 05:47:26 +0000","Message-Id":"<20210312054727.852622-8-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20210312054727.852622-1-kieran.bingham@ideasonboard.com>","References":"<20210312054727.852622-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v2 7/8] libcamera: pipeline: ipu3: Ensure\n\tno requests are pending at stop()","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>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The Pipeline handlers are responsible for making sure that all work\nis completed during the stop call, and all requests and resources\nshould be released back to the application.\n\nAdd an assertion to guarantee that there are no pending requests\nbefore returning from ::stop()\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n---\nRFC? Ideally this should be handled by the base pipeline handler so that\nthe same guarantee applies to all pipeline handlers. But we don't\ncurrently call into the base class during stop.\n\n src/libcamera/pipeline/ipu3/ipu3.cpp | 8 ++++++++\n 1 file changed, 8 insertions(+)","diff":"diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 7ab3a5bfdccb..c5facaea16dd 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -771,6 +771,14 @@ void PipelineHandlerIPU3::stop(Camera *camera)\n \tif (ret)\n \t\tLOG(IPU3, Warning) << \"Failed to stop camera \" << camera->id();\n \n+\t/*\n+\t * All requests must have completed before releaseing buffers.\n+\t * \\todo: Ensure all pipeline handlers guarantee queuedRequests is emtpy\n+\t * at the end of stop().\n+\t */\n+\tif (!data->queuedRequests_.empty())\n+\t\tLOG(IPU3, Fatal) << \"There are still requests to complete.\";\n+\n \tfreeBuffers(camera);\n }\n \n","prefixes":["libcamera-devel","v2","7/8"]}