[{"id":36105,"web_url":"https://patchwork.libcamera.org/comment/36105/","msgid":"<6p3btdve75ewexwuealxciqq7bpycewn5ykpxarlzblhmpblai@ajvbuuzkmuzw>","date":"2025-10-03T12:34:28","subject":"Re: [PATCH v2 1/2] ipa: rkisp1: Add settings for DreamChip RPPX1 ISP","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Niklas\n\nOn Fri, Sep 12, 2025 at 05:15:10PM +0900, Niklas Söderlund wrote:\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>\n> Looks good to me.\n\nSomething went wrong here\n\n>\n> Reviewed-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\nI would love to be able to extend rkisp1_cif_isp_version with a proper\nrevision for RPPX1 and not having to keep this in libcamera, however I\nunderstand to get there there is quite some work to do..\n\nFor the time being, I guess that's the best we can do\n\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\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nThanks\n  j\n\n> --\n> 2.51.0","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 EA236BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  3 Oct 2025 12:34:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0DAFA6B5AA;\n\tFri,  3 Oct 2025 14:34:34 +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 9EB1669318\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  3 Oct 2025 14:34:32 +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 A09691F16;\n\tFri,  3 Oct 2025 14:33:01 +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=\"cMuTLqCq\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1759494781;\n\tbh=Ly5AaDZ1+dD9fzLK6++bH6NhaInUqL0TrfVAXFTz1TQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=cMuTLqCqanl78evBx6Ytcstss3hhC+CaNv9q1KNFotiY5L18iYUe4pTrLbrTvow5d\n\tDwGMOgvWctJgbmhw0I9TkMWpx1lUUUadsEG3uw+nw/NEZNe2GnDn4IrK1Vr0i25CP0\n\tnRY8/1VrzfHE3rbWmvdNn/7PtbP++x+xVlaYcu0M=","Date":"Fri, 3 Oct 2025 14:34:28 +0200","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund+renesas@ragnatech.se>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>, \n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2 1/2] ipa: rkisp1: Add settings for DreamChip RPPX1 ISP","Message-ID":"<6p3btdve75ewexwuealxciqq7bpycewn5ykpxarlzblhmpblai@ajvbuuzkmuzw>","References":"<20250911090547.1860863-1-niklas.soderlund+renesas@ragnatech.se>\n\t<175766491057.2722520.11015700389987728544@neptunite.rasen.tech>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<175766491057.2722520.11015700389987728544@neptunite.rasen.tech>","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>"}}]