[{"id":35787,"web_url":"https://patchwork.libcamera.org/comment/35787/","msgid":"<175766503939.2722520.18269425517035685018@neptunite.rasen.tech>","date":"2025-09-12T08:17:19","subject":"Re: [PATCH v2 1/2] ipa: rkisp1: Add settings for DreamChip RPPX1 ISP","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Quoting Niklas Söderlund (2025-09-11 18:05:46)\n> The DreamChip RPPX1 ISP appears to be a superset of the Rockchip RkISP1\n> ISP V10. The RkISP1 interface and hardware operates at 8-bits color\n> depth, while the RPPX1 operates at 24-bits. For this reason the RkISP1\n> parameter and buffer formats are deigned around 8-bits.\n> \n> The kernel driver for RPPX1 can however compensate for this and scale\n> down it's internal data structures to 8-bits and produce parameter\n> buffers (RK1E) and output statistics (RK1S) that is compatible with the\n> RkISP1 IPA.\n> \n> The one difference is that the RPPX1 have 32 histogram buckets compared\n> to RkISP1 V10 16. Add a dedicated hardware revisions descriptor for the\n> RPPX1 device so it can reuse the existing IPA.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>\n\nWhoops, sorry, I replied in the wrong mode...\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  include/libcamera/ipa/rkisp1.mojom |  8 ++++++++\n>  src/ipa/rkisp1/rkisp1.cpp          | 11 +++++++++++\n>  2 files changed, 19 insertions(+)\n> \n> diff --git a/include/libcamera/ipa/rkisp1.mojom b/include/libcamera/ipa/rkisp1.mojom\n> index 043ad27ea199..608ba82a0091 100644\n> --- a/include/libcamera/ipa/rkisp1.mojom\n> +++ b/include/libcamera/ipa/rkisp1.mojom\n> @@ -8,6 +8,14 @@ module ipa.rkisp1;\n>  \n>  import \"include/libcamera/ipa/core.mojom\";\n>  \n> +/*\n> + * Hardware revisions in rkisp1-config.h (enum rkisp1_cif_isp_version) start at\n> + * 10 and increment sequentially. Add a namespace starting at 0x80000000 for\n> + * devices not cover by the kernel rkisp1 implementation but still supported\n> + * by the IPA.\n> + */\n> +const uint32 HwRevisionExternalRppX1 = 0x80000001;\n> +\n>  struct IPAConfigInfo {\n>         libcamera.IPACameraSensorInfo sensorInfo;\n>         libcamera.ControlInfoMap sensorControls;\n> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> index cf66d5553dcd..14600251dfe5 100644\n> --- a/src/ipa/rkisp1/rkisp1.cpp\n> +++ b/src/ipa/rkisp1/rkisp1.cpp\n> @@ -113,6 +113,14 @@ const IPAHwSettings ipaHwSettingsV12{\n>         false,\n>  };\n>  \n> +const IPAHwSettings ipaHwSettingsRPPX1{\n> +       RKISP1_CIF_ISP_AE_MEAN_MAX_V10,\n> +       RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12,\n> +       RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10,\n> +       RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10,\n> +       false,\n> +};\n> +\n>  /* List of controls handled by the RkISP1 IPA */\n>  const ControlInfoMap::Map rkisp1Controls{\n>         { &controls::DebugMetadataEnable, ControlInfo(false, true, false) },\n> @@ -147,6 +155,9 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision,\n>         case RKISP1_V12:\n>                 context_.hw = &ipaHwSettingsV12;\n>                 break;\n> +       case HwRevisionExternalRppX1:\n> +               context_.hw = &ipaHwSettingsRPPX1;\n> +               break;\n>         default:\n>                 LOG(IPARkISP1, Error)\n>                         << \"Hardware revision \" << hwRevision\n> -- \n> 2.51.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 E72E7BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Sep 2025 08:17:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1629F6936F;\n\tFri, 12 Sep 2025 10:17:28 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3C9FB613A3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Sep 2025 10:17:26 +0200 (CEST)","from neptunite.rasen.tech (unknown\n\t[IPv6:2404:7a81:160:2100:5c83:71e0:e0c7:1670])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 3C4C711DE; \n\tFri, 12 Sep 2025 10:16:10 +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=\"jgB/XLpp\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1757664970;\n\tbh=ePBX6DM1bytr4YfO2NN0JS6ka1Rc+xEnZVqh+PoZvNM=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=jgB/XLppgv/GnoH3kWG0LaEDjUBZVJl/uA2IuIJx6OOlo+xgVLDF9twxBAMNdfChk\n\tXV82/jYZmOTjomoWi4ss6r6erzPguF7dggC7zJeewwIzqenT75Pb2ql8mBcBiix4Xi\n\tKuE4na/Z9dZuIF/rVMQLbGK2Q0ZoBJLbMMj259+8=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250911090547.1860863-2-niklas.soderlund+renesas@ragnatech.se>","References":"<20250911090547.1860863-1-niklas.soderlund+renesas@ragnatech.se>\n\t<20250911090547.1860863-2-niklas.soderlund+renesas@ragnatech.se>","Subject":"Re: [PATCH v2 1/2] ipa: rkisp1: Add settings for DreamChip RPPX1 ISP","From":"Paul Elder <paul.elder@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":"Fri, 12 Sep 2025 17:17:19 +0900","Message-ID":"<175766503939.2722520.18269425517035685018@neptunite.rasen.tech>","User-Agent":"alot/0.0.0","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>"}}]