{"id":14466,"url":"https://patchwork.libcamera.org/api/patches/14466/?format=json","web_url":"https://patchwork.libcamera.org/patch/14466/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20211105152031.526267-1-jeanmichel.hautbois@ideasonboard.com>","date":"2021-11-05T15:20:31","name":"[libcamera-devel] ipa: ipu3: List the events in their order of calling","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"86951a9abd7862fd873399c489ff836f7e0d52b1","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/people/75/?format=json","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/14466/mbox/","series":[{"id":2693,"url":"https://patchwork.libcamera.org/api/series/2693/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2693","date":"2021-11-05T15:20:31","name":"[libcamera-devel] ipa: ipu3: List the events in their order of calling","version":1,"mbox":"https://patchwork.libcamera.org/series/2693/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/14466/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/14466/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 BB890BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  5 Nov 2021 15:20:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1A6556034E;\n\tFri,  5 Nov 2021 16:20:38 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 97C786032C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  5 Nov 2021 16:20:36 +0100 (CET)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:bd59:f4c6:2152:cf32])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 38ED91908;\n\tFri,  5 Nov 2021 16:20:36 +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=\"XS6Dt/q5\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1636125636;\n\tbh=dxTVpjFSRhJmmW+x8621UrAD+cIlVXHkGFFIYFDctig=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=XS6Dt/q5VzkJyCz6t0lowJlvU/HDIAZ/Z/fiVTXYa3/eS9IDSKDTUILy2uu6ZwZOE\n\tEwbBr5q4VxMmcEXTeNIKF11gIsNhyOtjX0/JBDj9fiDufZwnLBiXjKB1e4iQ44Ise3\n\tM2X0DgzQDMNgO4C2CHYNr8S+MkrE+PhUtQvOSnss=","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri,  5 Nov 2021 16:20:31 +0100","Message-Id":"<20211105152031.526267-1-jeanmichel.hautbois@ideasonboard.com>","X-Mailer":"git-send-email 2.32.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] ipa: ipu3: List the events in their order\n\tof calling","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":"This is a cleanup patch, no functionnal behaviour changes. It makes it\nclearer when an event is called.\n\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n---\n src/ipa/ipu3/ipu3.cpp | 27 +++++++++++++++++----------\n 1 file changed, 17 insertions(+), 10 deletions(-)","diff":"diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex 5c51607d..d97b2f9e 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -509,6 +509,13 @@ void IPAIPU3::unmapBuffers(const std::vector<unsigned int> &ids)\n /**\n  * \\brief Process an event generated by the pipeline handler\n  * \\param[in] event The event sent from pipeline handler\n+ *\n+ * The expected event handling over the lifetime of a Request has\n+ * the following sequence:\n+ *\n+ *   - EventProcessControls : Handle controls from a new Request\n+ *   - EventFillParams : Prepare the ISP to process the request\n+ *   - EventStatReady : Process statistics after ISP completion\n  */\n void IPAIPU3::processEvent(const IPU3Event &event)\n {\n@@ -517,32 +524,32 @@ void IPAIPU3::processEvent(const IPU3Event &event)\n \t\tprocessControls(event.frame, event.controls);\n \t\tbreak;\n \t}\n-\tcase EventStatReady: {\n+\tcase EventFillParams: {\n \t\tauto it = buffers_.find(event.bufferId);\n \t\tif (it == buffers_.end()) {\n-\t\t\tLOG(IPAIPU3, Error) << \"Could not find stats buffer!\";\n+\t\t\tLOG(IPAIPU3, Error) << \"Could not find param buffer!\";\n \t\t\treturn;\n \t\t}\n \n \t\tSpan<uint8_t> mem = it->second.planes()[0];\n-\t\tconst ipu3_uapi_stats_3a *stats =\n-\t\t\treinterpret_cast<ipu3_uapi_stats_3a *>(mem.data());\n+\t\tipu3_uapi_params *params =\n+\t\t\treinterpret_cast<ipu3_uapi_params *>(mem.data());\n \n-\t\tparseStatistics(event.frame, event.frameTimestamp, stats);\n+\t\tfillParams(event.frame, params);\n \t\tbreak;\n \t}\n-\tcase EventFillParams: {\n+\tcase EventStatReady: {\n \t\tauto it = buffers_.find(event.bufferId);\n \t\tif (it == buffers_.end()) {\n-\t\t\tLOG(IPAIPU3, Error) << \"Could not find param buffer!\";\n+\t\t\tLOG(IPAIPU3, Error) << \"Could not find stats buffer!\";\n \t\t\treturn;\n \t\t}\n \n \t\tSpan<uint8_t> mem = it->second.planes()[0];\n-\t\tipu3_uapi_params *params =\n-\t\t\treinterpret_cast<ipu3_uapi_params *>(mem.data());\n+\t\tconst ipu3_uapi_stats_3a *stats =\n+\t\t\treinterpret_cast<ipu3_uapi_stats_3a *>(mem.data());\n \n-\t\tfillParams(event.frame, params);\n+\t\tparseStatistics(event.frame, event.frameTimestamp, stats);\n \t\tbreak;\n \t}\n \tdefault:\n","prefixes":["libcamera-devel"]}