{"id":19129,"url":"https://patchwork.libcamera.org/api/patches/19129/?format=json","web_url":"https://patchwork.libcamera.org/patch/19129/","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":"<20231013074841.16972-6-naush@raspberrypi.com>","date":"2023-10-13T07:48:26","name":"[libcamera-devel,v2,05/20] mojom: pipeline: ipa: rpi: Add fields for PiSP objects","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"8ac47f0dc9ec07201ce2c0c3e3c6c4b22ac04c26","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/19129/mbox/","series":[{"id":4049,"url":"https://patchwork.libcamera.org/api/series/4049/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4049","date":"2023-10-13T07:48:21","name":"Raspberry Pi: Preliminary PiSP support","version":2,"mbox":"https://patchwork.libcamera.org/series/4049/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/19129/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/19129/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 73707C32B9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 13 Oct 2023 07:48:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 374A162992;\n\tFri, 13 Oct 2023 09:48:54 +0200 (CEST)","from mail-ej1-x633.google.com (mail-ej1-x633.google.com\n\t[IPv6:2a00:1450:4864:20::633])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EEB6762983\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Oct 2023 09:48:50 +0200 (CEST)","by mail-ej1-x633.google.com with SMTP id\n\ta640c23a62f3a-9ada2e6e75fso310237666b.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Oct 2023 00:48:50 -0700 (PDT)","from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tm16-20020a7bca50000000b003fee6e170f9sm1791890wml.45.2023.10.13.00.48.49\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 13 Oct 2023 00:48:49 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1697183334;\n\tbh=iGMyhmt0bK1VsQNsnIf7pQRklQnUnY6RGTCE1C4YmEg=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=jhDFS4ZaccdEfW/cueQi8TH0NC6qNpPCP0y+I3AKQdImCKtp8m2MtGA8dT5QdCKVb\n\tiLwet2fCa+2yjZw4bkc3KC0bCu/+etlEFVUi/oko3e6d5MPWEos3pXXFH3mvylQW+s\n\t65/po8P0GRPVGu9WA0ZnSEXwg0aSaSS/w3uqVWzReRod42SSdMwlNolWSr0a6DayIo\n\t7ceE/zwHpjlJw+3EtpLzr0LQPjK4meisArPmmq7w7ZCpmnQX3s9nj60Rdn2/T3D/AK\n\t8yFi6gG6IivR55f8fLzUo/SQQbCrG2g49VlJP6xUxmwvOkMlOxMLRg/C3dejfyXZEQ\n\t8N4sjPoRwn9uA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1697183330; x=1697788130;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=BODlzmgW5M/gqIgdlKGcK5w+gODL1ypd7loAk8PQnJM=;\n\tb=gOnJlSLBay6u93iE/bVTEvT0u2WWGdTgSN6ZZdUFIiODhftoXv36E8V/ACD9UrrXJn\n\tIJMo/VpfVLVnCQJKd5PI/Uz6+lJj/t1Y9xT08aJfBK+lqW2no1cKovfxwS8pNH/Cpzri\n\tmoiZjcUCzfDIJcpppummZ8qzxiplWodRMf/ZcoGh3YRs4XkSS+zf3e6Vphn4b7hnmD76\n\t32WPfmYuImTJuJd+M9BKrMHgZjoLON1EuHsc3b+GmAFFg2R89G0VM0h3k4gKLxq0nfNK\n\t9/nWqpKL0JZJFITZIUvD02OE1Xam+U51BKxUj1DfzswDBokh1owbtrgSM+XfYwsbbFrt\n\tsD8g=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"gOnJlSLB\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1697183330; x=1697788130;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=BODlzmgW5M/gqIgdlKGcK5w+gODL1ypd7loAk8PQnJM=;\n\tb=ZHVS4DpowSJ0lWqiPPGR/Ykepq+LYQ8OL/Lm7AtQAG0XSWK0VXXGa7XVRSB57G2/Tb\n\tR6GBTNTSYbm+TWzMeYvptGCi0dyDluz3AA3pJbtrg1ZRKoZap0evDme+jXXpRgEKc9zk\n\tsGKG05QQgVED9zuQ/Ri0hmleWEOgOURVPJkMQenhDKqLK4CcDbsX8fkB61GynK5MbnoD\n\t6uSko42Dh1u5gLGULC3r+tf7QdbdXKMRHK1sTZ8K0qES1W0YcK/vSuVnzWpmG0Sd64o6\n\thCeBsENlZGaF5RbH9SUGV6V3KSL2i9Lg63tGkgl6i5/HGJwuBRQIlK1eDF1blhj50KUy\n\tePRA==","X-Gm-Message-State":"AOJu0YyeF8da5RCiE9+X+lqPXOUX9GR/xXMmzGG0D4sZ87TBkxjx1PoD\n\tG3+qFp64/c7CHqboRfi5bOgvVX5mFNeOGkpnpTiOpA==","X-Google-Smtp-Source":"AGHT+IFvYmAzUXCJ1ah/ad2V3Alj1TZETpwxPT+Qg6g/GTAwpCpLvjFv6tFDMZxV2Jwz16iqcit+Ww==","X-Received":"by 2002:a17:906:cb:b0:9ae:4eb7:ae8b with SMTP id\n\t11-20020a17090600cb00b009ae4eb7ae8bmr26208479eji.7.1697183330320; \n\tFri, 13 Oct 2023 00:48:50 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 13 Oct 2023 08:48:26 +0100","Message-Id":"<20231013074841.16972-6-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20231013074841.16972-1-naush@raspberrypi.com>","References":"<20231013074841.16972-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 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":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Add the PiSP Frontend and Backend SharedMemObject file descriptors to\nthe ipa::init() call. This will allow the pipeline handler to pass these\nobjects to the IPA after construction.\n\nAdd a flag to indicate if buffer swaps are needed when starting the\nISP for the stitch block.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\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(-)","diff":"diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\nindex 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()\ndiff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\nindex 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)\ndiff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\nindex 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","prefixes":["libcamera-devel","v2","05/20"]}