[{"id":34515,"web_url":"https://patchwork.libcamera.org/comment/34515/","msgid":"<175016127311.4005407.6604237386090325211@ping.linuxembedded.co.uk>","date":"2025-06-17T11:54:33","subject":"Re: [PATCH 0/2] Add Renesas R-Car Gen4 pipeline with IPA support","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Niklas,\n\nQuoting Niklas Söderlund (2025-06-17 11:46:40)\n> Hello,\n> \n> These two patches adds support for Renesas R-Car Gen4 devices. A new \n> R-Car Gen4 specific pipeline handler is needed to support capture and \n> DMA to/from the ISP. The IPA functionality can however (in user-space) \n> piggy back on the existing RkISP1 IPA implementation.\n\n\nThanks - it's awesome to see a new platform getting supported in\nlibcamera.\n\nUnfortunately - there are a lot of CI build failures on this patch\nseries:\n\nhttps://gitlab.freedesktop.org/camera/libcamera/-/pipelines/1451951\n\n--\nRegards\n\nKieran\n\n> \n> The architect of the hardware consist of two different blocks. There is \n> one capture block (VIN) that is responsible for the interactions with \n> the sensor and get RAW frames to user-space. And a ISP block acting in \n> mem-to-mem mode responsible to process the RAW frames into statistic's \n> and debayerd images. One notable thing about the hardware is that there \n> are no scaler available anywhere in either of the blocks (that can scale \n> RAW, VIN can scale non-RAW image data).\n> \n> The ISP is based on Dream Chip RPP which is similar to the V10 variant \n> of RkISP1. For this reason the kernel driver was designed to reuse the \n> RK1S and RK1E pixel formats. For libcamera this means the RkISP1 IPA can \n> be re-used (almost) as is.\n> \n> Patch 1/2 adds a ID for the Dream Chip RPP ISP for the RkISP1 IPA. It's \n> very similar to V10, but the histogram have more buckets so a distinct \n> ID was needed. Patch 2/2 adds the new pipeline handler and wires it up \n> to the RkISP1 IPA.\n> \n> This work have been tested with IMX219 and IMX462 on R-Car V4H. All \n> libcamera compliance test pass. For IPA extensive testing with camshark \n> have been done, and the RkISP1 uncalibrated.yaml hardware blocks \n> function as expected and gives a good image.\n> \n> Please note, not all RK1E blocks are yet supported by the kernel driver, \n> so using imx219.yaml will enable some parts of the IPA the kernel driver \n> do not yet support. The plan on the kernel side is to add support for \n> these blocks. Doing so will (hopefully) not require any changes to \n> libcamera.\n> \n> This series depends on a patch from Hans de Goede [1] to allow more then \n> one pipeline handler to use the same IPA. While on the kernel side this \n> works depends on the still out-of-tree patches for the R-Car ISP [2].\n> \n> Patches to add RkISP1 IPA debug meta data from Stefan have been used to \n> verify proper operation of the hardware blocks supported by the kernel \n> driver. Thanks for all your nice utilities Stefan, it made this work so \n> much more enjoyable!\n> \n> 1. [PATCH v2 7/8] libcamera: ipa_manager: createIPA: Allow matching by IPA name instead of by pipeline\n>    20250510141220.54872-8-hdegoede@redhat.com\n> \n> 2. [PATCH 0/7] media: Add support for R-Car ISP using Dreamchip RPPX1 ISP\n>    https://lore.kernel.org/linux-renesas-soc/20250617103201.1594152-1-niklas.soderlund%2Brenesas@ragnatech.se/\n> \n> Niklas Söderlund (2):\n>   ipa: rkisp1: Add settings for DreamChip RPPX1 ISP\n>   libcamera: pipeline: Add R-Car Gen4 ISP pipeline\n> \n>  include/libcamera/ipa/rkisp1.mojom            |   8 +\n>  meson.build                                   |   1 +\n>  meson_options.txt                             |   1 +\n>  src/ipa/rkisp1/rkisp1.cpp                     |  11 +\n>  src/libcamera/pipeline/rcar-gen4/frames.cpp   | 283 ++++++\n>  src/libcamera/pipeline/rcar-gen4/frames.h     |  87 ++\n>  src/libcamera/pipeline/rcar-gen4/isp.cpp      | 227 +++++\n>  src/libcamera/pipeline/rcar-gen4/isp.h        |  44 +\n>  src/libcamera/pipeline/rcar-gen4/meson.build  |   8 +\n>  .../pipeline/rcar-gen4/rcar-gen4.cpp          | 816 ++++++++++++++++++\n>  src/libcamera/pipeline/rcar-gen4/vin.cpp      | 386 +++++++++\n>  src/libcamera/pipeline/rcar-gen4/vin.h        |  68 ++\n>  12 files changed, 1940 insertions(+)\n>  create mode 100644 src/libcamera/pipeline/rcar-gen4/frames.cpp\n>  create mode 100644 src/libcamera/pipeline/rcar-gen4/frames.h\n>  create mode 100644 src/libcamera/pipeline/rcar-gen4/isp.cpp\n>  create mode 100644 src/libcamera/pipeline/rcar-gen4/isp.h\n>  create mode 100644 src/libcamera/pipeline/rcar-gen4/meson.build\n>  create mode 100644 src/libcamera/pipeline/rcar-gen4/rcar-gen4.cpp\n>  create mode 100644 src/libcamera/pipeline/rcar-gen4/vin.cpp\n>  create mode 100644 src/libcamera/pipeline/rcar-gen4/vin.h\n> \n> -- \n> 2.49.0\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 B8487C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 Jun 2025 11:54:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A215368DCD;\n\tTue, 17 Jun 2025 13:54:37 +0200 (CEST)","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 1545D68DB1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Jun 2025 13:54:36 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 836A0666;\n\tTue, 17 Jun 2025 13:54:23 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"L6JJwQeB\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1750161263;\n\tbh=xFtTwyugC2rEh7aq0VCUP61SvNCzlGnrZRXK4YPJcVk=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=L6JJwQeBaaOg0xfxq9vfUW1CUcYt7cuU5oVDMWeLlt7F0WJjW+Yu3RmLFOB0EI0kD\n\t6Hbi6/wFDokQqxewT7ovb2B7FH/zCoWH6VNZJEQebjtXj9ZNGa6f/0mvjhmrb/1ZKk\n\tMjq/DTd4eIyiu6+4kUVtQVyWTTiaQjAu6YUYe/b0=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250617104642.1607118-1-niklas.soderlund+renesas@ragnatech.se>","References":"<20250617104642.1607118-1-niklas.soderlund+renesas@ragnatech.se>","Subject":"Re: [PATCH 0/2] Add Renesas R-Car Gen4 pipeline with IPA support","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund+renesas@ragnatech.se>","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>, Laurent Pinchart\n\t<laurent.pinchart@ideasonboard.com>, Niklas =?utf-8?q?S=C3=B6derlund?=\n\t<niklas.soderlund+renesas@ragnatech.se>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 17 Jun 2025 12:54:33 +0100","Message-ID":"<175016127311.4005407.6604237386090325211@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>"}},{"id":34520,"web_url":"https://patchwork.libcamera.org/comment/34520/","msgid":"<20250617122009.GA2439656@ragnatech.se>","date":"2025-06-17T12:20:09","subject":"Re: [PATCH 0/2] Add Renesas R-Car Gen4 pipeline with IPA support","submitter":{"id":230,"url":"https://patchwork.libcamera.org/api/people/230/","name":"Niklas Söderlund","email":"niklas.soderlund+renesas@ragnatech.se"},"content":"Hi Kieran,\n\nOn 2025-06-17 12:54:33 +0100, Kieran Bingham wrote:\n> Hi Niklas,\n> \n> Quoting Niklas Söderlund (2025-06-17 11:46:40)\n> > Hello,\n> > \n> > These two patches adds support for Renesas R-Car Gen4 devices. A new \n> > R-Car Gen4 specific pipeline handler is needed to support capture and \n> > DMA to/from the ISP. The IPA functionality can however (in user-space) \n> > piggy back on the existing RkISP1 IPA implementation.\n> \n> \n> Thanks - it's awesome to see a new platform getting supported in\n> libcamera.\n\nIndeed.\n\n> \n> Unfortunately - there are a lot of CI build failures on this patch\n> series:\n> \n> https://gitlab.freedesktop.org/camera/libcamera/-/pipelines/1451951\n\nThe build failures are due to the decency listed (Hans IPA multi match \nwork) is not in the upstream tree ;-)\n\n> \n> --\n> Regards\n> \n> Kieran\n> \n> > \n> > The architect of the hardware consist of two different blocks. There is \n> > one capture block (VIN) that is responsible for the interactions with \n> > the sensor and get RAW frames to user-space. And a ISP block acting in \n> > mem-to-mem mode responsible to process the RAW frames into statistic's \n> > and debayerd images. One notable thing about the hardware is that there \n> > are no scaler available anywhere in either of the blocks (that can scale \n> > RAW, VIN can scale non-RAW image data).\n> > \n> > The ISP is based on Dream Chip RPP which is similar to the V10 variant \n> > of RkISP1. For this reason the kernel driver was designed to reuse the \n> > RK1S and RK1E pixel formats. For libcamera this means the RkISP1 IPA can \n> > be re-used (almost) as is.\n> > \n> > Patch 1/2 adds a ID for the Dream Chip RPP ISP for the RkISP1 IPA. It's \n> > very similar to V10, but the histogram have more buckets so a distinct \n> > ID was needed. Patch 2/2 adds the new pipeline handler and wires it up \n> > to the RkISP1 IPA.\n> > \n> > This work have been tested with IMX219 and IMX462 on R-Car V4H. All \n> > libcamera compliance test pass. For IPA extensive testing with camshark \n> > have been done, and the RkISP1 uncalibrated.yaml hardware blocks \n> > function as expected and gives a good image.\n> > \n> > Please note, not all RK1E blocks are yet supported by the kernel driver, \n> > so using imx219.yaml will enable some parts of the IPA the kernel driver \n> > do not yet support. The plan on the kernel side is to add support for \n> > these blocks. Doing so will (hopefully) not require any changes to \n> > libcamera.\n> > \n> > This series depends on a patch from Hans de Goede [1] to allow more then \n> > one pipeline handler to use the same IPA. While on the kernel side this \n> > works depends on the still out-of-tree patches for the R-Car ISP [2].\n> > \n> > Patches to add RkISP1 IPA debug meta data from Stefan have been used to \n> > verify proper operation of the hardware blocks supported by the kernel \n> > driver. Thanks for all your nice utilities Stefan, it made this work so \n> > much more enjoyable!\n> > \n> > 1. [PATCH v2 7/8] libcamera: ipa_manager: createIPA: Allow matching by IPA name instead of by pipeline\n> >    20250510141220.54872-8-hdegoede@redhat.com\n> > \n> > 2. [PATCH 0/7] media: Add support for R-Car ISP using Dreamchip RPPX1 ISP\n> >    https://lore.kernel.org/linux-renesas-soc/20250617103201.1594152-1-niklas.soderlund%2Brenesas@ragnatech.se/\n> > \n> > Niklas Söderlund (2):\n> >   ipa: rkisp1: Add settings for DreamChip RPPX1 ISP\n> >   libcamera: pipeline: Add R-Car Gen4 ISP pipeline\n> > \n> >  include/libcamera/ipa/rkisp1.mojom            |   8 +\n> >  meson.build                                   |   1 +\n> >  meson_options.txt                             |   1 +\n> >  src/ipa/rkisp1/rkisp1.cpp                     |  11 +\n> >  src/libcamera/pipeline/rcar-gen4/frames.cpp   | 283 ++++++\n> >  src/libcamera/pipeline/rcar-gen4/frames.h     |  87 ++\n> >  src/libcamera/pipeline/rcar-gen4/isp.cpp      | 227 +++++\n> >  src/libcamera/pipeline/rcar-gen4/isp.h        |  44 +\n> >  src/libcamera/pipeline/rcar-gen4/meson.build  |   8 +\n> >  .../pipeline/rcar-gen4/rcar-gen4.cpp          | 816 ++++++++++++++++++\n> >  src/libcamera/pipeline/rcar-gen4/vin.cpp      | 386 +++++++++\n> >  src/libcamera/pipeline/rcar-gen4/vin.h        |  68 ++\n> >  12 files changed, 1940 insertions(+)\n> >  create mode 100644 src/libcamera/pipeline/rcar-gen4/frames.cpp\n> >  create mode 100644 src/libcamera/pipeline/rcar-gen4/frames.h\n> >  create mode 100644 src/libcamera/pipeline/rcar-gen4/isp.cpp\n> >  create mode 100644 src/libcamera/pipeline/rcar-gen4/isp.h\n> >  create mode 100644 src/libcamera/pipeline/rcar-gen4/meson.build\n> >  create mode 100644 src/libcamera/pipeline/rcar-gen4/rcar-gen4.cpp\n> >  create mode 100644 src/libcamera/pipeline/rcar-gen4/vin.cpp\n> >  create mode 100644 src/libcamera/pipeline/rcar-gen4/vin.h\n> > \n> > -- \n> > 2.49.0\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 17FC1C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 Jun 2025 12:28:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 563F968DB1;\n\tTue, 17 Jun 2025 14:28:46 +0200 (CEST)","from fhigh-a4-smtp.messagingengine.com\n\t(fhigh-a4-smtp.messagingengine.com [103.168.172.155])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8D23C68DB1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Jun 2025 14:20:13 +0200 (CEST)","from phl-compute-05.internal (phl-compute-05.phl.internal\n\t[10.202.2.45])\n\tby mailfhigh.phl.internal (Postfix) with ESMTP id C963D1140106;\n\tTue, 17 Jun 2025 08:20:12 -0400 (EDT)","from phl-mailfrontend-01 ([10.202.2.162])\n\tby phl-compute-05.internal (MEProxy); Tue, 17 Jun 2025 08:20:12 -0400","by mail.messagingengine.com (Postfix) with ESMTPA; Tue,\n\t17 Jun 2025 08:20:12 -0400 (EDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=ragnatech.se header.i=@ragnatech.se\n\theader.b=\"VrQVv029\"; dkim=pass (2048-bit key;\n\tunprotected) header.d=messagingengine.com\n\theader.i=@messagingengine.com header.b=\"VbgxsYWt\"; \n\tdkim-atps=neutral","DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=ragnatech.se; h=\n\tcc:cc:content-transfer-encoding:content-type:content-type:date\n\t:date:from:from:in-reply-to:in-reply-to:message-id:mime-version\n\t:references:reply-to:subject:subject:to:to; s=fm3; t=1750162812;\n\tx=1750249212; bh=NQTKZSIfMk6ClssyKnMEQlOYt2AkF7cbfnBgN2nnZuo=; b=\n\tVrQVv029kbC/WFG6KOVdqNpviDuJfP30six8pbLDrtBpn+KUYNx+n6g/JPvA6yCr\n\tZf8HlRFvlInAb9w1kPTpHTddi/z8DkTUF6BGtH6MTTVWnN6kL3xHBKTPeYVUH03u\n\tvcFV8dxGzxrKj510HsxyS0LlpSr+n6bUdtXabL4kjFY4/tOUlSORErdJ8t8+lrDe\n\tO5gaIUu72CdhsQ1r+VGpuqpvlJNMMCJqQXKIoW4tdmBSHBEB9VbnVjOtwebqo3YO\n\tfwPBEgttyIlMn5nCXXUkQgNGtNwNzqCWwBnF71jEZQDegA+C7K5lCr21zPmP/jmn\n\tr59hcLjR/omfTJNJrm/Rug==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:cc:content-transfer-encoding\n\t:content-type:content-type:date:date:feedback-id:feedback-id\n\t:from:from:in-reply-to:in-reply-to:message-id:mime-version\n\t:references:reply-to:subject:subject:to:to:x-me-proxy\n\t:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1750162812; x=\n\t1750249212; bh=NQTKZSIfMk6ClssyKnMEQlOYt2AkF7cbfnBgN2nnZuo=; b=V\n\tbgxsYWtyqAjqXooCxICPkhlnaNStsbRuJ926LQ9sjkfrR9apiSuzHc/k5tRJRoqM\n\t7nZLefXDt1hOwpxjM4mn6t/FSTYmvAh7bmnlt/gJjK8vEY9r+xF0n+3j+lQLav4I\n\tuLPtmGzzqoscinGnyTGrr9VTq3QqG6BCQnmBVgs95Kwzobzx6i40RmegYJr4uY1W\n\tbBwvEOeeZAnYOGmbREhx7sfZ9pbqnFAZtaxl4RIAYOcHtMkSQeqT4MiB0qd0ZiEF\n\ti3PmW6QX5WmQ4O5i+3ZrHXgQbZn4eqnSqMOF0RzQF2062j6Odb1kvDIDbJCRcT/n\n\tHPhl6/guQ8SU0iFYLcDSQ=="],"X-ME-Sender":"<xms:fF1RaL7Y7E_lH5OHVjcpu6ipocCxeCu29kKKiASLELIro28ee0_zIQ>\n\t<xme:fF1RaA4Zsa35oA6Rt8gpgHzuPwpU9j_EV78r_eUWuuXSWJeYkzpk1Ku0G-ZNyFXKg\n\tiWTd-ukuxoVA6ResXk>","X-ME-Received":"<xmr:fF1RaCeXMkV5sFfGLGCrdwHvRNwcXq0p5Z8mi-L64hDPhjd0NnQKvjOaW-Crl6qrzn3_UNMaFjkQvBItZas07TpY0sUrK8fRbg>","X-ME-Proxy-Cause":"gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgddujecutefuodetggdotefrodftvf\n\tcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr\n\ttefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth\n\thsucdlqddutddtmdenucfjughrpeffhffvvefukfhfgggtugfgjgesthekredttddtjeen\n\tucfhrhhomheppfhikhhlrghsucfunpguvghrlhhunhguuceonhhikhhlrghsrdhsohguvg\n\thrlhhunhguodhrvghnvghsrghssehrrghgnhgrthgvtghhrdhsvgeqnecuggftrfgrthht\n\tvghrnhepheehvdetheduleekjeduhfdvgfekhfevffffleefteejheeileevuefhuedvvd\n\teinecuffhomhgrihhnpehfrhgvvgguvghskhhtohhprdhorhhgpdhkvghrnhgvlhdrohhr\n\tghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehnih\n\thklhgrshdrshhouggvrhhluhhnugdorhgvnhgvshgrshesrhgrghhnrghtvggthhdrshgv\n\tpdhnsggprhgtphhtthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehkih\n\tgvrhgrnhdrsghinhhghhgrmhesihguvggrshhonhgsohgrrhgurdgtohhmpdhrtghpthht\n\tohepjhgrtghophhordhmohhnughisehiuggvrghsohhnsghorghrugdrtghomhdprhgtph\n\thtthhopehlrghurhgvnhhtrdhpihhntghhrghrthesihguvggrshhonhgsohgrrhgurdgt\n\tohhmpdhrtghpthhtoheplhhisggtrghmvghrrgdquggvvhgvlheslhhishhtshdrlhhisg\n\tgtrghmvghrrgdrohhrgh","X-ME-Proxy":"<xmx:fF1RaMLRLln3uK3GwgVLLyY1aVaXCJ2ZYIylzXVnq6IFyHsxHXLeww>\n\t<xmx:fF1RaPJff-B--DP4DmEam-hESAdMny2B9tCOXUTneEbi92tEXfQLjw>\n\t<xmx:fF1RaFzibdZR64yLXZ7-DmbCkUWQxwuk4sz9fEoCMS50zJ75UkjnKw>\n\t<xmx:fF1RaLKale3FfwMTGqIv-jUUtfYWSvkWxN4RwvE544pCcAFYcLPPJA>\n\t<xmx:fF1RaI7gU6ufA2YGKxoTBW-0SAVJMaS6owVF9pYTwQvXkOs1AvHusX_D>","Feedback-ID":"i80c9496c:Fastmail","Date":"Tue, 17 Jun 2025 14:20:09 +0200","From":"Niklas =?utf-8?q?S=C3=B6derlund?=\n\t<niklas.soderlund+renesas@ragnatech.se>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 0/2] Add Renesas R-Car Gen4 pipeline with IPA support","Message-ID":"<20250617122009.GA2439656@ragnatech.se>","References":"<20250617104642.1607118-1-niklas.soderlund+renesas@ragnatech.se>\n\t<175016127311.4005407.6604237386090325211@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<175016127311.4005407.6604237386090325211@ping.linuxembedded.co.uk>","X-Mailman-Approved-At":"Tue, 17 Jun 2025 14:28:44 +0200","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>"}},{"id":34530,"web_url":"https://patchwork.libcamera.org/comment/34530/","msgid":"<175017858099.3871677.16048517084439759310@ping.linuxembedded.co.uk>","date":"2025-06-17T16:43:00","subject":"Re: [PATCH 0/2] Add Renesas R-Car Gen4 pipeline with IPA support","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Niklas Söderlund (2025-06-17 13:20:09)\n> Hi Kieran,\n> \n> On 2025-06-17 12:54:33 +0100, Kieran Bingham wrote:\n> > Hi Niklas,\n> > \n> > Quoting Niklas Söderlund (2025-06-17 11:46:40)\n> > > Hello,\n> > > \n> > > These two patches adds support for Renesas R-Car Gen4 devices. A new \n> > > R-Car Gen4 specific pipeline handler is needed to support capture and \n> > > DMA to/from the ISP. The IPA functionality can however (in user-space) \n> > > piggy back on the existing RkISP1 IPA implementation.\n> > \n> > \n> > Thanks - it's awesome to see a new platform getting supported in\n> > libcamera.\n> \n> Indeed.\n> \n> > \n> > Unfortunately - there are a lot of CI build failures on this patch\n> > series:\n> > \n> > https://gitlab.freedesktop.org/camera/libcamera/-/pipelines/1451951\n> \n> The build failures are due to the decency listed (Hans IPA multi match \n> work) is not in the upstream tree ;-)\n\naha, thanks - ok - that clears that up! I thought it was a bit too many\n;-)\n\nI'll ignore the CI for now then.\n--\nKieran\n\n> \n> > \n> > --\n> > Regards\n> > \n> > Kieran\n> > \n> > > \n> > > The architect of the hardware consist of two different blocks. There is \n> > > one capture block (VIN) that is responsible for the interactions with \n> > > the sensor and get RAW frames to user-space. And a ISP block acting in \n> > > mem-to-mem mode responsible to process the RAW frames into statistic's \n> > > and debayerd images. One notable thing about the hardware is that there \n> > > are no scaler available anywhere in either of the blocks (that can scale \n> > > RAW, VIN can scale non-RAW image data).\n> > > \n> > > The ISP is based on Dream Chip RPP which is similar to the V10 variant \n> > > of RkISP1. For this reason the kernel driver was designed to reuse the \n> > > RK1S and RK1E pixel formats. For libcamera this means the RkISP1 IPA can \n> > > be re-used (almost) as is.\n> > > \n> > > Patch 1/2 adds a ID for the Dream Chip RPP ISP for the RkISP1 IPA. It's \n> > > very similar to V10, but the histogram have more buckets so a distinct \n> > > ID was needed. Patch 2/2 adds the new pipeline handler and wires it up \n> > > to the RkISP1 IPA.\n> > > \n> > > This work have been tested with IMX219 and IMX462 on R-Car V4H. All \n> > > libcamera compliance test pass. For IPA extensive testing with camshark \n> > > have been done, and the RkISP1 uncalibrated.yaml hardware blocks \n> > > function as expected and gives a good image.\n> > > \n> > > Please note, not all RK1E blocks are yet supported by the kernel driver, \n> > > so using imx219.yaml will enable some parts of the IPA the kernel driver \n> > > do not yet support. The plan on the kernel side is to add support for \n> > > these blocks. Doing so will (hopefully) not require any changes to \n> > > libcamera.\n> > > \n> > > This series depends on a patch from Hans de Goede [1] to allow more then \n> > > one pipeline handler to use the same IPA. While on the kernel side this \n> > > works depends on the still out-of-tree patches for the R-Car ISP [2].\n> > > \n> > > Patches to add RkISP1 IPA debug meta data from Stefan have been used to \n> > > verify proper operation of the hardware blocks supported by the kernel \n> > > driver. Thanks for all your nice utilities Stefan, it made this work so \n> > > much more enjoyable!\n> > > \n> > > 1. [PATCH v2 7/8] libcamera: ipa_manager: createIPA: Allow matching by IPA name instead of by pipeline\n> > >    20250510141220.54872-8-hdegoede@redhat.com\n> > > \n> > > 2. [PATCH 0/7] media: Add support for R-Car ISP using Dreamchip RPPX1 ISP\n> > >    https://lore.kernel.org/linux-renesas-soc/20250617103201.1594152-1-niklas.soderlund%2Brenesas@ragnatech.se/\n> > > \n> > > Niklas Söderlund (2):\n> > >   ipa: rkisp1: Add settings for DreamChip RPPX1 ISP\n> > >   libcamera: pipeline: Add R-Car Gen4 ISP pipeline\n> > > \n> > >  include/libcamera/ipa/rkisp1.mojom            |   8 +\n> > >  meson.build                                   |   1 +\n> > >  meson_options.txt                             |   1 +\n> > >  src/ipa/rkisp1/rkisp1.cpp                     |  11 +\n> > >  src/libcamera/pipeline/rcar-gen4/frames.cpp   | 283 ++++++\n> > >  src/libcamera/pipeline/rcar-gen4/frames.h     |  87 ++\n> > >  src/libcamera/pipeline/rcar-gen4/isp.cpp      | 227 +++++\n> > >  src/libcamera/pipeline/rcar-gen4/isp.h        |  44 +\n> > >  src/libcamera/pipeline/rcar-gen4/meson.build  |   8 +\n> > >  .../pipeline/rcar-gen4/rcar-gen4.cpp          | 816 ++++++++++++++++++\n> > >  src/libcamera/pipeline/rcar-gen4/vin.cpp      | 386 +++++++++\n> > >  src/libcamera/pipeline/rcar-gen4/vin.h        |  68 ++\n> > >  12 files changed, 1940 insertions(+)\n> > >  create mode 100644 src/libcamera/pipeline/rcar-gen4/frames.cpp\n> > >  create mode 100644 src/libcamera/pipeline/rcar-gen4/frames.h\n> > >  create mode 100644 src/libcamera/pipeline/rcar-gen4/isp.cpp\n> > >  create mode 100644 src/libcamera/pipeline/rcar-gen4/isp.h\n> > >  create mode 100644 src/libcamera/pipeline/rcar-gen4/meson.build\n> > >  create mode 100644 src/libcamera/pipeline/rcar-gen4/rcar-gen4.cpp\n> > >  create mode 100644 src/libcamera/pipeline/rcar-gen4/vin.cpp\n> > >  create mode 100644 src/libcamera/pipeline/rcar-gen4/vin.h\n> > > \n> > > -- \n> > > 2.49.0\n> > >\n> \n> -- \n> Kind Regards,\n> Niklas Söderlund","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 CE2D2BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 Jun 2025 16:43:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EA5BB68DCC;\n\tTue, 17 Jun 2025 18:43:05 +0200 (CEST)","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 AA1A468DB1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Jun 2025 18:43:04 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1768A836;\n\tTue, 17 Jun 2025 18:42:52 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"JOXlz8cR\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1750178572;\n\tbh=k9o8MgSfPXpoUZxt4fVMsXJqgrbUPt3Fel2h8Siv8jM=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=JOXlz8cRYxpIiA93XWByXWVynXSBoh8uPDfzCPEIomDYEaVal/FGKtH9LhD0m7C0K\n\tfz7Xc+DTzQMHEsAVCEppff/V85LcKtNxhvqV86uopjShE+t87BkZA5MJV6SLadFlJw\n\tCXRhb7Q1s+anGKalhhYyaeU1hzH7Zelniiksealg=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250617122009.GA2439656@ragnatech.se>","References":"<20250617104642.1607118-1-niklas.soderlund+renesas@ragnatech.se>\n\t<175016127311.4005407.6604237386090325211@ping.linuxembedded.co.uk>\n\t<20250617122009.GA2439656@ragnatech.se>","Subject":"Re: [PATCH 0/2] Add Renesas R-Car Gen4 pipeline with IPA support","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund+renesas@ragnatech.se>","Date":"Tue, 17 Jun 2025 17:43:00 +0100","Message-ID":"<175017858099.3871677.16048517084439759310@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>"}}]