[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240201135544.GC5344@pendragon.ideasonboard.com>
Date: Thu, 1 Feb 2024 15:55:44 +0200
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Paul Elder <paul.elder@...asonboard.com>
Cc: linux-media@...r.kernel.org, linux-rockchip@...ts.infradead.org,
devicetree@...r.kernel.org, kieran.bingham@...asonboard.com,
tomi.valkeinen@...asonboard.com, umang.jain@...asonboard.com,
aford173@...il.com, Rob Herring <robh@...nel.org>,
Alexander Stein <alexander.stein@...tq-group.com>,
Dafna Hirschfeld <dafna@...tmail.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Heiko Stuebner <heiko@...ech.de>,
"moderated list:ARM/Rockchip SoC support" <linux-arm-kernel@...ts.infradead.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v6 06/11] media: rkisp1: Add match data for i.MX8MP ISP
On Thu, Jan 11, 2024 at 08:48:26PM +0900, Paul Elder wrote:
> Add match data to the rkisp1 driver to match the i.MX8MP ISP.
This patch, or at least the part that adds the compatible entry, should
move to the end of the series, after the other patches that enable the
features needed by the i.MX8MP.
> Signed-off-by: Paul Elder <paul.elder@...asonboard.com>
> Reviewed-by: Rob Herring <robh@...nel.org>
> Tested-by: Alexander Stein <alexander.stein@...tq-group.com>
> Tested-by: Adam Ford <aford173@...il.com>
> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
> ---
> .../platform/rockchip/rkisp1/rkisp1-dev.c | 23 +++++++++++++++++++
> include/uapi/linux/rkisp1-config.h | 2 ++
> 2 files changed, 25 insertions(+)
>
> diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
> index 2e40c376cab5..e4aac0234178 100644
> --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
> +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
> @@ -532,6 +532,25 @@ static const struct rkisp1_info rk3399_isp_info = {
> | RKISP1_FEATURE_DUAL_CROP,
> };
>
> +static const char * const imx8mp_isp_clks[] = {
> + "isp",
> + "hclk",
> + "aclk",
> +};
> +
> +static const struct rkisp1_isr_data imx8mp_isp_isrs[] = {
> + { NULL, rkisp1_isr, BIT(RKISP1_IRQ_ISP) | BIT(RKISP1_IRQ_MI) },
> +};
> +
> +static const struct rkisp1_info imx8mp_isp_info = {
> + .clks = imx8mp_isp_clks,
> + .clk_size = ARRAY_SIZE(imx8mp_isp_clks),
> + .isrs = imx8mp_isp_isrs,
> + .isr_size = ARRAY_SIZE(imx8mp_isp_isrs),
> + .isp_ver = IMX8MP_V10,
> + .features = RKISP1_FEATURE_MAIN_STRIDE,
> +};
> +
> static const struct of_device_id rkisp1_of_match[] = {
> {
> .compatible = "rockchip,px30-cif-isp",
> @@ -541,6 +560,10 @@ static const struct of_device_id rkisp1_of_match[] = {
> .compatible = "rockchip,rk3399-cif-isp",
> .data = &rk3399_isp_info,
> },
> + {
> + .compatible = "fsl,imx8mp-isp",
> + .data = &imx8mp_isp_info,
> + },
> {},
> };
> MODULE_DEVICE_TABLE(of, rkisp1_of_match);
> diff --git a/include/uapi/linux/rkisp1-config.h b/include/uapi/linux/rkisp1-config.h
> index 730673ecc63d..f602442c2018 100644
> --- a/include/uapi/linux/rkisp1-config.h
> +++ b/include/uapi/linux/rkisp1-config.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
> + * @IMX8MP_V10: used in at least imx8mp
> */
> enum rkisp1_cif_isp_version {
> RKISP1_V10 = 10,
> RKISP1_V11,
> RKISP1_V12,
> RKISP1_V13,
> + IMX8MP_V10,
This is prone to namespace clashes, especially in the userspace API. I
prefer keeping the RKISP1_ prefix. Furthermore, there's no "V10" for the
i.MX8MP. You can name the version RKISP1_V_IMX8MP. I dislike it very
much but have no better alternative to propose without more information
from VSI.
> };
>
> enum rkisp1_cif_isp_histogram_mode {
--
Regards,
Laurent Pinchart
Powered by blists - more mailing lists