[PATCH v2] ipa: rkisp1: Add RKISP1_V_IMX8MP version

Stefan Klug stefan.klug at ideasonboard.com
Tue Feb 20 09:42:59 CET 2024


Hi Paul,

Am 16.02.24 um 12:09 schrieb Paul Elder:
> Add the version number for RKISP1_V_IMX8MP, and initialize values for
> it.
> 
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> ---
> This patch goes with the kernel series [1] which adds support for
> i.MX8MP.
> 
> [1] https://lore.kernel.org/linux-media/20240216095458.2919694-1-paul.elder@ideasonboard.com/
> ---
>   include/linux/rkisp1-config.h | 8 +++++---
>   src/ipa/rkisp1/rkisp1.cpp     | 1 +
>   2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/rkisp1-config.h b/include/linux/rkisp1-config.h
> index ec7cde8c..2d1c448a 100644
> --- a/include/linux/rkisp1-config.h
> +++ b/include/linux/rkisp1-config.h
> @@ -4,8 +4,8 @@
>    * Copyright (C) 2017 Rockchip Electronics Co., Ltd.
>    */
>   
> -#ifndef _RKISP1_CONFIG_H
> -#define _RKISP1_CONFIG_H
> +#ifndef _UAPI_RKISP1_CONFIG_H
> +#define _UAPI_RKISP1_CONFIG_H
>   
>   #include <linux/types.h>
>   
> @@ -179,12 +179,14 @@
>    * @RKISP1_V11: declared in the original vendor code, but not used
>    * @RKISP1_V12: used at least in rk3326 and px30
>    * @RKISP1_V13: used at least in rk1808
> + * @RKISP1_V_IMX8MP: used in at least imx8mp
>    */
>   enum rkisp1_cif_isp_version {
>   	RKISP1_V10 = 10,
>   	RKISP1_V11,
>   	RKISP1_V12,
>   	RKISP1_V13,
> +	RKISP1_V_IMX8MP,
maybe it's a bit late in the process. But would it make sense to somehow 
reference the upstream names used by VSI? (This would then spill over to 
the kernel patches).
These files give a pretty good overview:
https://github.com/nxp-imx/isp-vvcam/blob/lf-5.15.y_2.0.0/vvcam/isp/isp_version.h
https://github.com/nxp-imx/isp-vvcam/blob/lf-5.15.y_2.0.0/vvcam/isp/mrv_all_regs.h

And according to 
https://github.com/nxp-imx/meta-imx/blob/mickledore-6.1.22-2.0.0/meta-bsp/recipes-bsp/isp-imx/isp-imx_4.2.2.22.0.bb

the isp of the imx8mp is officially named ISP8000NANO_V1802

>   };
>   
>   enum rkisp1_cif_isp_histogram_mode {
> @@ -992,4 +994,4 @@ struct rkisp1_stat_buffer {
>   	struct rkisp1_cif_isp_stat params;
>   };
>   
> -#endif /* _RKISP1_CONFIG_H */
> +#endif /* _UAPI_RKISP1_CONFIG_H */
> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
> index 6544c925..11e31bf4 100644
> --- a/src/ipa/rkisp1/rkisp1.cpp
> +++ b/src/ipa/rkisp1/rkisp1.cpp
> @@ -128,6 +128,7 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision,
>   	/* \todo Add support for other revisions */
>   	switch (hwRevision) {
>   	case RKISP1_V10:
> +	case RKISP1_V_IMX8MP:
>   		hwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10;
>   		hwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10;
>   		hwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10;

-- 
Regards,

Stefan Klug



More information about the libcamera-devel mailing list