From patchwork Fri Feb 16 11:09:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 19504 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 BDEFBBDE17 for ; Fri, 16 Feb 2024 11:10:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E72FF62805; Fri, 16 Feb 2024 12:10:05 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="QObnB6p3"; 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 E932A61CAE for ; Fri, 16 Feb 2024 12:10:04 +0100 (CET) Received: from pyrite.hamster-moth.ts.net (h175-177-049-156.catv02.itscom.jp [175.177.49.156]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B78C5564; Fri, 16 Feb 2024 12:09:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1708081799; bh=POAWkcXyLW4kQtmAeJWyivUTmLwYNQcfy0R0HI0lN/Y=; h=From:To:Cc:Subject:Date:From; b=QObnB6p3jSEMvwjT0GUoHkMQZGOThfFm3NFniSzvSKyHb9c9+kE9BMVQpa9PSgyOT u6DfeiX1d1K/eAPvtTW6zy6pVxmt68NAgn2qiiDh42lsIVg6RZqF71IhQYuS4PIqeH 8+4kKoU4glHJII4flGODP6MhRa6agOIYy4fLHHIc= From: Paul Elder To: libcamera-devel@lists.libcamera.org Subject: [PATCH v2] ipa: rkisp1: Add RKISP1_V_IMX8MP version Date: Fri, 16 Feb 2024 20:09:52 +0900 Message-Id: <20240216110952.3169023-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.39.2 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 version number for RKISP1_V_IMX8MP, and initialize values for it. Signed-off-by: Paul Elder --- 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 @@ -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, }; 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;