[{"id":27942,"web_url":"https://patchwork.libcamera.org/comment/27942/","msgid":"<yjxnhw6fivmjy4srdyhqm4iodbt3hcgad7deak55wzexqhcolf@ccd6ojsyznuu>","date":"2023-10-12T08:21:39","subject":"Re: [libcamera-devel] [PATCH 05/20] mojom: pipeline: ipa: rpi: Add\n\tfields for PiSP objects","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Naush\n\nOn Fri, Oct 06, 2023 at 02:19:45PM +0100, Naushir Patuck via libcamera-devel wrote:\n> Add the PiSP Frontend and Backend SharedMemObject file descriptors to\n> the ipa::init() call. This will allow the pipeline handler to pass these\n> objects to the IPA after construction.\n>\n> Add a flag to indicate if buffer swaps are needed when starting the\n> ISP for the stitch block.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\n> ---\n>  include/libcamera/ipa/raspberrypi.mojom | 6 +++++-\n>  src/ipa/rpi/common/ipa_base.cpp         | 2 +-\n>  src/libcamera/pipeline/rpi/vc4/vc4.cpp  | 5 +++--\n>  3 files changed, 9 insertions(+), 4 deletions(-)\n>\n> diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\n> index ab4c4e2edca3..5986c4366c15 100644\n> --- a/include/libcamera/ipa/raspberrypi.mojom\n> +++ b/include/libcamera/ipa/raspberrypi.mojom\n> @@ -22,6 +22,9 @@ struct SensorConfig {\n>  struct InitParams {\n>  \tbool lensPresent;\n>  \tlibcamera.IPACameraSensorInfo sensorInfo;\n> +\t/* PISP specific */\n> +\tlibcamera.SharedFD fe;\n> +\tlibcamera.SharedFD be;\n>  };\n>\n>  struct InitResult {\n> @@ -219,13 +222,14 @@ interface IPARPiEventInterface {\n>  \t * \\fn prepareIspComplete()\n>  \t * \\brief Signal completion of \\a prepareIsp\n>  \t * \\param[in] buffers Bayer and embedded buffers actioned.\n> +\t * \\param[in] stitchSwapBuffers Whether the stitch block buffers need to be swapped.\n>  \t *\n>  \t * This asynchronous event is signalled to the pipeline handler once\n>  \t * the \\a prepareIsp signal has completed, and the ISP is ready to start\n>  \t * processing the frame. The embedded data buffer may be recycled after\n>  \t * this event.\n>  \t */\n> -\tprepareIspComplete(BufferIds buffers);\n> +\tprepareIspComplete(BufferIds buffers, bool stitchSwapBuffers);\n>\n>  \t/**\n>  \t * \\fn processStatsComplete()\n> diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\n> index 5939fe57f040..97f647a9e53e 100644\n> --- a/src/ipa/rpi/common/ipa_base.cpp\n> +++ b/src/ipa/rpi/common/ipa_base.cpp\n> @@ -446,7 +446,7 @@ void IpaBase::prepareIsp(const PrepareParams &params)\n>  \tframeCount_++;\n>\n>  \t/* Ready to push the input buffer into the ISP. */\n> -\tprepareIspComplete.emit(params.buffers);\n> +\tprepareIspComplete.emit(params.buffers, false);\n>  }\n>\n>  void IpaBase::processStats(const ProcessParams &params)\n> diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> index bc90d6324777..233473e2fe2b 100644\n> --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> @@ -78,7 +78,7 @@ public:\n>  \tvoid ispOutputDequeue(FrameBuffer *buffer);\n>\n>  \tvoid processStatsComplete(const ipa::RPi::BufferIds &buffers);\n> -\tvoid prepareIspComplete(const ipa::RPi::BufferIds &buffers);\n> +\tvoid prepareIspComplete(const ipa::RPi::BufferIds &buffers, bool stitchSwapBuffers);\n>  \tvoid setIspControls(const ControlList &controls);\n>  \tvoid setCameraTimeout(uint32_t maxFrameLengthMs);\n>\n> @@ -833,7 +833,8 @@ void Vc4CameraData::processStatsComplete(const ipa::RPi::BufferIds &buffers)\n>  \thandleState();\n>  }\n>\n> -void Vc4CameraData::prepareIspComplete(const ipa::RPi::BufferIds &buffers)\n> +void Vc4CameraData::prepareIspComplete(const ipa::RPi::BufferIds &buffers,\n> +\t\t\t\t       [[maybe_unused]] bool stitchSwapBuffers)\n>  {\n>  \tunsigned int embeddedId = buffers.embedded & RPi::MaskID;\n>  \tunsigned int bayer = buffers.bayer & RPi::MaskID;\n> --\n> 2.34.1\n>","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 96F22BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Oct 2023 08:21:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E73E66297F;\n\tThu, 12 Oct 2023 10:21:43 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2683262962\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Oct 2023 10:21:43 +0200 (CEST)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id F067A583;\n\tThu, 12 Oct 2023 10:21:39 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1697098903;\n\tbh=dBTSU9api3WthfEet1+PZ+K1/NJSUUEea6CqTangOII=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=SS69q2aAegHFZVU9+ZeuxjJczM5fKDnX5CzLeoz7N+znNEr6s6Wm5S9Rlq5GnlRyI\n\t4nPceOnMkWw7kZONHIrCJ3RutvlmF7r4QjpR1r0U3OImRnh2ew1EQJen2bKlkKyrOM\n\t7hkev88ZV5wvozmAHUTnG/9xbzBsN1BlpScBYXbSQi+pbqP4UaZxkou1KuOz01AxU9\n\tn+dLauZSOCz/D6pegleGPimrp615P4ld3MnNdx0WFuKrF+RAl/niYNbx81imHe6EX1\n\tREJJqJStLPdAgwPN3ln3HsuZ/r02PiCF1PDzL3rSnpR2LY/li6m3PZxfAjVGg/YZ6R\n\tb8ZNxfwCsNd9Q==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1697098900;\n\tbh=dBTSU9api3WthfEet1+PZ+K1/NJSUUEea6CqTangOII=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=IKrOlAuUengJ5WQSsOOPPfKOmFf+GVGdRgOOhvNtfcaICzlMySJkCKPjVO4BqznFX\n\tt3dPWDQ0rGxwThHRxPwp+OdflWSBwCoV8IhydPVhefvFMFlkw1UgAC/a5QkmHOje1g\n\tFKUHxHPSehb9Ux7VPoJQh6LvN/MnImWEecEcTijM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"IKrOlAuU\"; dkim-atps=neutral","Date":"Thu, 12 Oct 2023 10:21:39 +0200","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<yjxnhw6fivmjy4srdyhqm4iodbt3hcgad7deak55wzexqhcolf@ccd6ojsyznuu>","References":"<20231006132000.23504-1-naush@raspberrypi.com>\n\t<20231006132000.23504-6-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20231006132000.23504-6-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH 05/20] mojom: pipeline: ipa: rpi: Add\n\tfields for PiSP objects","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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]