From patchwork Mon Aug 24 09:06:20 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 28014 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 509BAC3339 for ; Mon, 24 Aug 2026 09:07:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F3B65683AD; Mon, 24 Aug 2026 11:07:04 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="f1UHonua"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 54EB967FEC for ; Mon, 24 Aug 2026 11:07:03 +0200 (CEST) Received: from neptunite.hamster-moth.ts.net (unknown [IPv6:2400:2411:160:2f00:e616:f172:fe90:f1b5]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id F2CC3C2D; Mon, 24 Aug 2026 11:05:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1787562339; bh=n/lYAk74Bw2T3OivRbYmWVvTdtrJWUwHCkOWpaTCr+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f1UHonua1BrhzHD6Lo/soY6dpK1asO7xLdHcxeAqz2yDPgaPE7mcN5iY3OYGWhViE w9ln6+9cfpA/gdBBT4PG8E3DmAkakUqG4tPI8LGpB9YZfsJYQoIN2iFZNLCcOXCO6B GIHK/NVIk1yakcAMvnjLU2AZg5ZVZJJqveJA/PAo= From: Paul Elder To: laurent.pinchart@ideasonboard.com Cc: Paul Elder , michael.riesch@collabora.com, xuhf@rock-chips.com, stefan.klug@ideasonboard.com, kieran.bingham@ideasonboard.com, dan.scally@ideasonboard.com, jacopo.mondi@ideasonboard.com, nicolas.dufresne@collabora.com, mehdi.djait@linux.intel.com, libcamera-devel@lists.libcamera.org Subject: [PATCH v2 03/20] ipa: rkisp2: params: Add rkisp2 extensible parameters wrapper Date: Mon, 24 Aug 2026 18:06:20 +0900 Message-ID: <20260824090641.3705246-4-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20260824090641.3705246-1-paul.elder@ideasonboard.com> References: <20260824090641.3705246-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add the libipa wrapper for extensible parameters for the rkisp2. This wraps the extensible parameters in the rkisp2 uapi to make them easier to use within libcamera. Signed-off-by: Paul Elder --- This is in a separate patch to reduce the size of the other patches to make them easier to review. Changes in v2: - rename things so that it doesn't conflict with extensible stats that have been added - add crop --- src/ipa/rkisp2/algorithms/algorithm.h | 27 +++++++++ src/ipa/rkisp2/params.h | 85 +++++++++++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 src/ipa/rkisp2/algorithms/algorithm.h create mode 100644 src/ipa/rkisp2/params.h diff --git a/src/ipa/rkisp2/algorithms/algorithm.h b/src/ipa/rkisp2/algorithms/algorithm.h new file mode 100644 index 000000000000..2b945c930161 --- /dev/null +++ b/src/ipa/rkisp2/algorithms/algorithm.h @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2026, Ideas On Board + * + * RkISP2 control algorithm interface + */ + +#pragma once + +#include + +#include + +#include "module.h" + +namespace libcamera { + +namespace ipa::rkisp2 { + +class Algorithm : public libcamera::ipa::Algorithm +{ +}; + +} /* namespace ipa::rkisp2 */ + +} /* namespace libcamera */ + diff --git a/src/ipa/rkisp2/params.h b/src/ipa/rkisp2/params.h new file mode 100644 index 000000000000..96452cf19414 --- /dev/null +++ b/src/ipa/rkisp2/params.h @@ -0,0 +1,85 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2026, Ideas On Board + * + * RkISP2 ISP Parameters + */ + +#pragma once + +#include + +#include +#include + +#include + +namespace libcamera { + +namespace ipa::rkisp2 { + +enum class RkISP2ParamsBlocks : uint16_t { + Bls, + AwbGains, + Csm, + Ccm, + Goc, + Lsc, + Crop, + AeLite, + HistLite, + HistBig0, + HistBig1, + HistBig2, + AwbMeas, +}; + +namespace details { + +template +struct block_type { +}; + +#define RkISP2_DEFINE_PARAMS_BLOCK_TYPE(id, cfgType, blkType) \ +template<> \ +struct block_type { \ + using type = struct rkisp2_params_##cfgType; \ + static constexpr rkisp2_params_block_type blockType = \ + rkisp2_params_block_type::RKISP2_PARAMS_BLOCK_##blkType;\ +} + +RkISP2_DEFINE_PARAMS_BLOCK_TYPE(Bls, bls, BLS); +RkISP2_DEFINE_PARAMS_BLOCK_TYPE(AwbGains, awb_gains, AWB_GAINS); +RkISP2_DEFINE_PARAMS_BLOCK_TYPE(Csm, csm, CSM); +RkISP2_DEFINE_PARAMS_BLOCK_TYPE(Ccm, ccm, CCM); +RkISP2_DEFINE_PARAMS_BLOCK_TYPE(Goc, goc, GOC); +RkISP2_DEFINE_PARAMS_BLOCK_TYPE(Lsc, lsc, LSC); +RkISP2_DEFINE_PARAMS_BLOCK_TYPE(Crop, crop, CROP); +RkISP2_DEFINE_PARAMS_BLOCK_TYPE(AeLite, ae_lite, AE_LITE); +RkISP2_DEFINE_PARAMS_BLOCK_TYPE(HistLite, hist_lite, HIST_LITE); +RkISP2_DEFINE_PARAMS_BLOCK_TYPE(HistBig0, hist_big, HIST_BIG0); +RkISP2_DEFINE_PARAMS_BLOCK_TYPE(HistBig1, hist_big, HIST_BIG1); +RkISP2_DEFINE_PARAMS_BLOCK_TYPE(HistBig2, hist_big, HIST_BIG2); +RkISP2_DEFINE_PARAMS_BLOCK_TYPE(AwbMeas, awb_meas, AWB_MEAS); + +struct param_traits { + using id_type = RkISP2ParamsBlocks; + + template + using id_to_details = block_type; +}; + +} /* namespace details */ + +class RkISP2Params : public V4L2Params +{ +public: + RkISP2Params(Span data) + : V4L2Params(data, V4L2_ISP_VERSION_V1) + { + } +}; + +} /* namespace ipa::rkisp2 */ + +} /* namespace libcamera */