[{"id":28720,"web_url":"https://patchwork.libcamera.org/comment/28720/","msgid":"<b4e4ae05-f554-4721-b06a-0323d18d79b8@ideasonboard.com>","date":"2024-02-23T13:15:14","subject":"Re: [PATCH v3 4/5] include: linux: Add RKISP1_V_IMX8MP version","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"Am 18.02.24 um 17:49 schrieb Laurent Pinchart:\n> From: Paul Elder <paul.elder@ideasonboard.com>\n> \n> Patches have been posted to the linux-media@vger.kernel.org mailing list\n> to add i.MX8MP support to the rkisp1 driver ([1]). As no changes are\n> expected to the userspace API in future versions of the series, add the\n> RKISP1_V_IMX8MP version manually to the rkisp1-config.h header already.\n> Once the patches get merged in the kernel, the changes will trickle down\n> to libcamera with the next kernel headers update.\n> \n> [1] https://lore.kernel.org/linux-media/20240216095458.2919694-1-paul.elder@ideasonboard.com/\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>\n\n> ---\n>   include/linux/rkisp1-config.h | 8 +++++---\n>   1 file changed, 5 insertions(+), 3 deletions(-)\n> \n> diff --git a/include/linux/rkisp1-config.h b/include/linux/rkisp1-config.h\n> index ec7cde8cd2e3..2d1c448a6ab8 100644\n> --- a/include/linux/rkisp1-config.h\n> +++ b/include/linux/rkisp1-config.h\n> @@ -4,8 +4,8 @@\n>    * Copyright (C) 2017 Rockchip Electronics Co., Ltd.\n>    */\n>   \n> -#ifndef _RKISP1_CONFIG_H\n> -#define _RKISP1_CONFIG_H\n> +#ifndef _UAPI_RKISP1_CONFIG_H\n> +#define _UAPI_RKISP1_CONFIG_H\n>   \n>   #include <linux/types.h>\n>   \n> @@ -179,12 +179,14 @@\n>    * @RKISP1_V11: declared in the original vendor code, but not used\n>    * @RKISP1_V12: used at least in rk3326 and px30\n>    * @RKISP1_V13: used at least in rk1808\n> + * @RKISP1_V_IMX8MP: used in at least imx8mp\n>    */\n>   enum rkisp1_cif_isp_version {\n>   \tRKISP1_V10 = 10,\n>   \tRKISP1_V11,\n>   \tRKISP1_V12,\n>   \tRKISP1_V13,\n> +\tRKISP1_V_IMX8MP,\n\nIMHO it might be more flexible in the future to start with a new number. \neg. RKISP1_V_IMX8MP = 100\n\n>   };\n>   \n>   enum rkisp1_cif_isp_histogram_mode {\n> @@ -992,4 +994,4 @@ struct rkisp1_stat_buffer {\n>   \tstruct rkisp1_cif_isp_stat params;\n>   };\n>   \n> -#endif /* _RKISP1_CONFIG_H */\n> +#endif /* _UAPI_RKISP1_CONFIG_H */","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 7404AC0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 23 Feb 2024 13:15:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A7B7462809;\n\tFri, 23 Feb 2024 14:15:18 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B9B9761CA1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Feb 2024 14:15:16 +0100 (CET)","from [IPV6:2a00:6020:448c:6c00:163d:481a:d9f4:bc3d] (unknown\n\t[IPv6:2a00:6020:448c:6c00:163d:481a:d9f4:bc3d])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6BC3CFF1;\n\tFri, 23 Feb 2024 14:15:07 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Etswddke\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1708694107;\n\tbh=Ao3sVelmoz/KJhxfsIFEHV/67owppCsAm2/37b/hvYQ=;\n\th=Date:Subject:To:References:Cc:From:In-Reply-To:From;\n\tb=EtswddkeovxTtKOl+y0HVSj4pnKRSmPD5jvUVfJ7qGgppf9B8PL6qgdGsWR0UuTTr\n\tfWwGtnZ/dURIreUwuIloxaz9B5c3OqaAVG+kBvWbedc8SrnlsFYB6mT3hX8jwcrixX\n\tRwDkWOZpWOtBVh5Ir4EYTQBJMrkhhHALbWXg30g0=","Message-ID":"<b4e4ae05-f554-4721-b06a-0323d18d79b8@ideasonboard.com>","Date":"Fri, 23 Feb 2024 14:15:14 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v3 4/5] include: linux: Add RKISP1_V_IMX8MP version","Content-Language":"en-US","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20240218164908.15921-1-laurent.pinchart@ideasonboard.com>\n\t<20240218164908.15921-5-laurent.pinchart@ideasonboard.com>","From":"Stefan Klug <stefan.klug@ideasonboard.com>","In-Reply-To":"<20240218164908.15921-5-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28722,"web_url":"https://patchwork.libcamera.org/comment/28722/","msgid":"<20240223132040.GY31348@pendragon.ideasonboard.com>","date":"2024-02-23T13:20:40","subject":"Re: [PATCH v3 4/5] include: linux: Add RKISP1_V_IMX8MP version","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Stefan,\n\nOn Fri, Feb 23, 2024 at 02:15:14PM +0100, Stefan Klug wrote:\n> Am 18.02.24 um 17:49 schrieb Laurent Pinchart:\n> > From: Paul Elder <paul.elder@ideasonboard.com>\n> > \n> > Patches have been posted to the linux-media@vger.kernel.org mailing list\n> > to add i.MX8MP support to the rkisp1 driver ([1]). As no changes are\n> > expected to the userspace API in future versions of the series, add the\n> > RKISP1_V_IMX8MP version manually to the rkisp1-config.h header already.\n> > Once the patches get merged in the kernel, the changes will trickle down\n> > to libcamera with the next kernel headers update.\n> > \n> > [1] https://lore.kernel.org/linux-media/20240216095458.2919694-1-paul.elder@ideasonboard.com/\n> > \n> > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> \n> > ---\n> >   include/linux/rkisp1-config.h | 8 +++++---\n> >   1 file changed, 5 insertions(+), 3 deletions(-)\n> > \n> > diff --git a/include/linux/rkisp1-config.h b/include/linux/rkisp1-config.h\n> > index ec7cde8cd2e3..2d1c448a6ab8 100644\n> > --- a/include/linux/rkisp1-config.h\n> > +++ b/include/linux/rkisp1-config.h\n> > @@ -4,8 +4,8 @@\n> >    * Copyright (C) 2017 Rockchip Electronics Co., Ltd.\n> >    */\n> >   \n> > -#ifndef _RKISP1_CONFIG_H\n> > -#define _RKISP1_CONFIG_H\n> > +#ifndef _UAPI_RKISP1_CONFIG_H\n> > +#define _UAPI_RKISP1_CONFIG_H\n> >   \n> >   #include <linux/types.h>\n> >   \n> > @@ -179,12 +179,14 @@\n> >    * @RKISP1_V11: declared in the original vendor code, but not used\n> >    * @RKISP1_V12: used at least in rk3326 and px30\n> >    * @RKISP1_V13: used at least in rk1808\n> > + * @RKISP1_V_IMX8MP: used in at least imx8mp\n> >    */\n> >   enum rkisp1_cif_isp_version {\n> >   \tRKISP1_V10 = 10,\n> >   \tRKISP1_V11,\n> >   \tRKISP1_V12,\n> >   \tRKISP1_V13,\n> > +\tRKISP1_V_IMX8MP,\n> \n> IMHO it might be more flexible in the future to start with a new number. \n> eg. RKISP1_V_IMX8MP = 100\n\nI dislike the versioning scheme as well :-(\n\nThis being said, Rockchip has developed v2 and v3 versions of the ISP,\nThey are not compatible with v1, so I don't think this driver will ever\nneed to support new Rockchip versions.\n\n> >   };\n> >   \n> >   enum rkisp1_cif_isp_histogram_mode {\n> > @@ -992,4 +994,4 @@ struct rkisp1_stat_buffer {\n> >   \tstruct rkisp1_cif_isp_stat params;\n> >   };\n> >   \n> > -#endif /* _RKISP1_CONFIG_H */\n> > +#endif /* _UAPI_RKISP1_CONFIG_H */","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 89817BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 23 Feb 2024 13:20:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9915562816;\n\tFri, 23 Feb 2024 14:20:39 +0100 (CET)","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 0507E627FD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Feb 2024 14:20:37 +0100 (CET)","from pendragon.ideasonboard.com (89-27-53-110.bb.dnainternet.fi\n\t[89.27.53.110])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7CBE2FF1;\n\tFri, 23 Feb 2024 14:20:28 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"SFGLF69U\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1708694428;\n\tbh=eM9pWOHDgEviDyyh2CM0QmRr6Ytvnwi+nv20Ja8MUyQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=SFGLF69UT0pM5M6W3CRcP22cqoDBbh1YDI+24USFFQfn6gc9NmL7QqguptgxtB29i\n\tCwCuPzbk2mG8+YcLbFrvFAHw5/mbJi2aprBer8q7Ld9OxIffLEfMVL3CFo8/iBpXXk\n\tJq7bpkonVCCFvtJwGEOol4Udbpts5ttr+endmkUU=","Date":"Fri, 23 Feb 2024 15:20:40 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>","Subject":"Re: [PATCH v3 4/5] include: linux: Add RKISP1_V_IMX8MP version","Message-ID":"<20240223132040.GY31348@pendragon.ideasonboard.com>","References":"<20240218164908.15921-1-laurent.pinchart@ideasonboard.com>\n\t<20240218164908.15921-5-laurent.pinchart@ideasonboard.com>\n\t<b4e4ae05-f554-4721-b06a-0323d18d79b8@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<b4e4ae05-f554-4721-b06a-0323d18d79b8@ideasonboard.com>","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28723,"web_url":"https://patchwork.libcamera.org/comment/28723/","msgid":"<170869479017.3710789.11506968322699531628@ping.linuxembedded.co.uk>","date":"2024-02-23T13:26:30","subject":"Re: [PATCH v3 4/5] include: linux: Add RKISP1_V_IMX8MP version","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2024-02-23 13:20:40)\n> Hi Stefan,\n> \n> On Fri, Feb 23, 2024 at 02:15:14PM +0100, Stefan Klug wrote:\n> > Am 18.02.24 um 17:49 schrieb Laurent Pinchart:\n> > > From: Paul Elder <paul.elder@ideasonboard.com>\n> > > \n> > > Patches have been posted to the linux-media@vger.kernel.org mailing list\n> > > to add i.MX8MP support to the rkisp1 driver ([1]). As no changes are\n> > > expected to the userspace API in future versions of the series, add the\n> > > RKISP1_V_IMX8MP version manually to the rkisp1-config.h header already.\n> > > Once the patches get merged in the kernel, the changes will trickle down\n> > > to libcamera with the next kernel headers update.\n> > > \n> > > [1] https://lore.kernel.org/linux-media/20240216095458.2919694-1-paul.elder@ideasonboard.com/\n> > > \n> > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > \n> > Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> > \n> > > ---\n> > >   include/linux/rkisp1-config.h | 8 +++++---\n> > >   1 file changed, 5 insertions(+), 3 deletions(-)\n> > > \n> > > diff --git a/include/linux/rkisp1-config.h b/include/linux/rkisp1-config.h\n> > > index ec7cde8cd2e3..2d1c448a6ab8 100644\n> > > --- a/include/linux/rkisp1-config.h\n> > > +++ b/include/linux/rkisp1-config.h\n> > > @@ -4,8 +4,8 @@\n> > >    * Copyright (C) 2017 Rockchip Electronics Co., Ltd.\n> > >    */\n> > >   \n> > > -#ifndef _RKISP1_CONFIG_H\n> > > -#define _RKISP1_CONFIG_H\n> > > +#ifndef _UAPI_RKISP1_CONFIG_H\n> > > +#define _UAPI_RKISP1_CONFIG_H\n> > >   \n> > >   #include <linux/types.h>\n> > >   \n> > > @@ -179,12 +179,14 @@\n> > >    * @RKISP1_V11: declared in the original vendor code, but not used\n> > >    * @RKISP1_V12: used at least in rk3326 and px30\n> > >    * @RKISP1_V13: used at least in rk1808\n> > > + * @RKISP1_V_IMX8MP: used in at least imx8mp\n> > >    */\n> > >   enum rkisp1_cif_isp_version {\n> > >     RKISP1_V10 = 10,\n> > >     RKISP1_V11,\n> > >     RKISP1_V12,\n> > >     RKISP1_V13,\n> > > +   RKISP1_V_IMX8MP,\n> > \n> > IMHO it might be more flexible in the future to start with a new number. \n> > eg. RKISP1_V_IMX8MP = 100\n> \n> I dislike the versioning scheme as well :-(\n> \n> This being said, Rockchip has developed v2 and v3 versions of the ISP,\n> They are not compatible with v1, so I don't think this driver will ever\n> need to support new Rockchip versions.\n\nDo you /know/ that for a fact?\n\nI thought Rockchip's BSP used a single driver for all of it's ISP range?\n (Not rkisp1)\n\n--\nKieran\n\n\n> \n> > >   };\n> > >   \n> > >   enum rkisp1_cif_isp_histogram_mode {\n> > > @@ -992,4 +994,4 @@ struct rkisp1_stat_buffer {\n> > >     struct rkisp1_cif_isp_stat params;\n> > >   };\n> > >   \n> > > -#endif /* _RKISP1_CONFIG_H */\n> > > +#endif /* _UAPI_RKISP1_CONFIG_H */\n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","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 89E20C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 23 Feb 2024 13:26:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BE362627FD;\n\tFri, 23 Feb 2024 14:26:35 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8779861CA1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Feb 2024 14:26:33 +0100 (CET)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1AAA02E7;\n\tFri, 23 Feb 2024 14:26:24 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"F7p/Anif\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1708694784;\n\tbh=6akVWZM7wiS+6vkov6yWAD+le+WmN0CFOx4gIipBOAg=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=F7p/AnifXOmeEA0RQgup+31kqNHe5TQyOLt0TN5CbDP8M7fwZJyyyNlinkJaA1fl8\n\t9KsWmcT1VzCvDkDDQ5W05d0pzFsYzI979twMxJeVK160EKCL1A5lF5EJ95x81jLvGf\n\tNg8x79DDVUmiUfKPBlmAnqEtDDvZs8SKkiDMLbGc=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240223132040.GY31348@pendragon.ideasonboard.com>","References":"<20240218164908.15921-1-laurent.pinchart@ideasonboard.com>\n\t<20240218164908.15921-5-laurent.pinchart@ideasonboard.com>\n\t<b4e4ae05-f554-4721-b06a-0323d18d79b8@ideasonboard.com>\n\t<20240223132040.GY31348@pendragon.ideasonboard.com>","Subject":"Re: [PATCH v3 4/5] include: linux: Add RKISP1_V_IMX8MP version","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tStefan Klug <stefan.klug@ideasonboard.com>","Date":"Fri, 23 Feb 2024 13:26:30 +0000","Message-ID":"<170869479017.3710789.11506968322699531628@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28724,"web_url":"https://patchwork.libcamera.org/comment/28724/","msgid":"<20240223133720.GZ31348@pendragon.ideasonboard.com>","date":"2024-02-23T13:37:20","subject":"Re: [PATCH v3 4/5] include: linux: Add RKISP1_V_IMX8MP version","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Feb 23, 2024 at 01:26:30PM +0000, Kieran Bingham wrote:\n> Quoting Laurent Pinchart (2024-02-23 13:20:40)\n> > On Fri, Feb 23, 2024 at 02:15:14PM +0100, Stefan Klug wrote:\n> > > Am 18.02.24 um 17:49 schrieb Laurent Pinchart:\n> > > > From: Paul Elder <paul.elder@ideasonboard.com>\n> > > > \n> > > > Patches have been posted to the linux-media@vger.kernel.org mailing list\n> > > > to add i.MX8MP support to the rkisp1 driver ([1]). As no changes are\n> > > > expected to the userspace API in future versions of the series, add the\n> > > > RKISP1_V_IMX8MP version manually to the rkisp1-config.h header already.\n> > > > Once the patches get merged in the kernel, the changes will trickle down\n> > > > to libcamera with the next kernel headers update.\n> > > > \n> > > > [1] https://lore.kernel.org/linux-media/20240216095458.2919694-1-paul.elder@ideasonboard.com/\n> > > > \n> > > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> > > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > \n> > > Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> > > \n> > > > ---\n> > > >   include/linux/rkisp1-config.h | 8 +++++---\n> > > >   1 file changed, 5 insertions(+), 3 deletions(-)\n> > > > \n> > > > diff --git a/include/linux/rkisp1-config.h b/include/linux/rkisp1-config.h\n> > > > index ec7cde8cd2e3..2d1c448a6ab8 100644\n> > > > --- a/include/linux/rkisp1-config.h\n> > > > +++ b/include/linux/rkisp1-config.h\n> > > > @@ -4,8 +4,8 @@\n> > > >    * Copyright (C) 2017 Rockchip Electronics Co., Ltd.\n> > > >    */\n> > > >   \n> > > > -#ifndef _RKISP1_CONFIG_H\n> > > > -#define _RKISP1_CONFIG_H\n> > > > +#ifndef _UAPI_RKISP1_CONFIG_H\n> > > > +#define _UAPI_RKISP1_CONFIG_H\n> > > >   \n> > > >   #include <linux/types.h>\n> > > >   \n> > > > @@ -179,12 +179,14 @@\n> > > >    * @RKISP1_V11: declared in the original vendor code, but not used\n> > > >    * @RKISP1_V12: used at least in rk3326 and px30\n> > > >    * @RKISP1_V13: used at least in rk1808\n> > > > + * @RKISP1_V_IMX8MP: used in at least imx8mp\n> > > >    */\n> > > >   enum rkisp1_cif_isp_version {\n> > > >     RKISP1_V10 = 10,\n> > > >     RKISP1_V11,\n> > > >     RKISP1_V12,\n> > > >     RKISP1_V13,\n> > > > +   RKISP1_V_IMX8MP,\n> > > \n> > > IMHO it might be more flexible in the future to start with a new number. \n> > > eg. RKISP1_V_IMX8MP = 100\n> > \n> > I dislike the versioning scheme as well :-(\n> > \n> > This being said, Rockchip has developed v2 and v3 versions of the ISP,\n> > They are not compatible with v1, so I don't think this driver will ever\n> > need to support new Rockchip versions.\n> \n> Do you /know/ that for a fact?\n> \n> I thought Rockchip's BSP used a single driver for all of it's ISP range?\n>  (Not rkisp1)\n\nThey do, and we could do so in mainline too, adding support for ISP v1\nto a new driver that supports v2 and v3 as well. Doing it the other way\naround without breaking any backward compatibility doesn't seem\nrealistic.\n\nThese are all speculations anyway. The bottom line is that without\ninformation about the VSI versioning scheme for current and future ISP\nversions, there's nothing we can really do.\n\n> > > >   };\n> > > >   \n> > > >   enum rkisp1_cif_isp_histogram_mode {\n> > > > @@ -992,4 +994,4 @@ struct rkisp1_stat_buffer {\n> > > >     struct rkisp1_cif_isp_stat params;\n> > > >   };\n> > > >   \n> > > > -#endif /* _RKISP1_CONFIG_H */\n> > > > +#endif /* _UAPI_RKISP1_CONFIG_H */","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 CA697BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 23 Feb 2024 13:37:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1C07B62813;\n\tFri, 23 Feb 2024 14:37:19 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C04C1627FD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Feb 2024 14:37:17 +0100 (CET)","from pendragon.ideasonboard.com (89-27-53-110.bb.dnainternet.fi\n\t[89.27.53.110])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 27F0A2E7;\n\tFri, 23 Feb 2024 14:37:08 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"tJE9kmSb\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1708695428;\n\tbh=HG9XWB276QIJRqtvdRGWRZx5r1RP2qbmD5sVux9k7ug=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=tJE9kmSb1GM49XIjRsJSy/SVUqB/GWoKnmdNUpwy8Am1ocit/XA27urYHK0RFulht\n\tXWB6usgpdK0EM8NHaXxlUCXueT1tDjBtgMARheXIVxgU0rqN30GZ8dYjcDiJTiZlWv\n\thN6+Px/3zCK250JrHG/rDxFQK03+GWyuLanJZMto=","Date":"Fri, 23 Feb 2024 15:37:20 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Subject":"Re: [PATCH v3 4/5] include: linux: Add RKISP1_V_IMX8MP version","Message-ID":"<20240223133720.GZ31348@pendragon.ideasonboard.com>","References":"<20240218164908.15921-1-laurent.pinchart@ideasonboard.com>\n\t<20240218164908.15921-5-laurent.pinchart@ideasonboard.com>\n\t<b4e4ae05-f554-4721-b06a-0323d18d79b8@ideasonboard.com>\n\t<20240223132040.GY31348@pendragon.ideasonboard.com>\n\t<170869479017.3710789.11506968322699531628@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<170869479017.3710789.11506968322699531628@ping.linuxembedded.co.uk>","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28725,"web_url":"https://patchwork.libcamera.org/comment/28725/","msgid":"<20240223134603.GA1274@pendragon.ideasonboard.com>","date":"2024-02-23T13:46:03","subject":"Re: [PATCH v3 4/5] include: linux: Add RKISP1_V_IMX8MP version","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Feb 23, 2024 at 03:37:20PM +0200, Laurent Pinchart wrote:\n> On Fri, Feb 23, 2024 at 01:26:30PM +0000, Kieran Bingham wrote:\n> > Quoting Laurent Pinchart (2024-02-23 13:20:40)\n> > > On Fri, Feb 23, 2024 at 02:15:14PM +0100, Stefan Klug wrote:\n> > > > Am 18.02.24 um 17:49 schrieb Laurent Pinchart:\n> > > > > From: Paul Elder <paul.elder@ideasonboard.com>\n> > > > > \n> > > > > Patches have been posted to the linux-media@vger.kernel.org mailing list\n> > > > > to add i.MX8MP support to the rkisp1 driver ([1]). As no changes are\n> > > > > expected to the userspace API in future versions of the series, add the\n> > > > > RKISP1_V_IMX8MP version manually to the rkisp1-config.h header already.\n> > > > > Once the patches get merged in the kernel, the changes will trickle down\n> > > > > to libcamera with the next kernel headers update.\n> > > > > \n> > > > > [1] https://lore.kernel.org/linux-media/20240216095458.2919694-1-paul.elder@ideasonboard.com/\n> > > > > \n> > > > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > > \n> > > > Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> > > > \n> > > > > ---\n> > > > >   include/linux/rkisp1-config.h | 8 +++++---\n> > > > >   1 file changed, 5 insertions(+), 3 deletions(-)\n> > > > > \n> > > > > diff --git a/include/linux/rkisp1-config.h b/include/linux/rkisp1-config.h\n> > > > > index ec7cde8cd2e3..2d1c448a6ab8 100644\n> > > > > --- a/include/linux/rkisp1-config.h\n> > > > > +++ b/include/linux/rkisp1-config.h\n> > > > > @@ -4,8 +4,8 @@\n> > > > >    * Copyright (C) 2017 Rockchip Electronics Co., Ltd.\n> > > > >    */\n> > > > >   \n> > > > > -#ifndef _RKISP1_CONFIG_H\n> > > > > -#define _RKISP1_CONFIG_H\n> > > > > +#ifndef _UAPI_RKISP1_CONFIG_H\n> > > > > +#define _UAPI_RKISP1_CONFIG_H\n> > > > >   \n> > > > >   #include <linux/types.h>\n> > > > >   \n> > > > > @@ -179,12 +179,14 @@\n> > > > >    * @RKISP1_V11: declared in the original vendor code, but not used\n> > > > >    * @RKISP1_V12: used at least in rk3326 and px30\n> > > > >    * @RKISP1_V13: used at least in rk1808\n> > > > > + * @RKISP1_V_IMX8MP: used in at least imx8mp\n> > > > >    */\n> > > > >   enum rkisp1_cif_isp_version {\n> > > > >     RKISP1_V10 = 10,\n> > > > >     RKISP1_V11,\n> > > > >     RKISP1_V12,\n> > > > >     RKISP1_V13,\n> > > > > +   RKISP1_V_IMX8MP,\n> > > > \n> > > > IMHO it might be more flexible in the future to start with a new number. \n> > > > eg. RKISP1_V_IMX8MP = 100\n> > > \n> > > I dislike the versioning scheme as well :-(\n> > > \n> > > This being said, Rockchip has developed v2 and v3 versions of the ISP,\n> > > They are not compatible with v1, so I don't think this driver will ever\n> > > need to support new Rockchip versions.\n> > \n> > Do you /know/ that for a fact?\n> > \n> > I thought Rockchip's BSP used a single driver for all of it's ISP range?\n> >  (Not rkisp1)\n> \n> They do, and we could do so in mainline too, adding support for ISP v1\n> to a new driver that supports v2 and v3 as well. Doing it the other way\n> around without breaking any backward compatibility doesn't seem\n> realistic.\n> \n> These are all speculations anyway. The bottom line is that without\n> information about the VSI versioning scheme for current and future ISP\n> versions, there's nothing we can really do.\n\nAlso, this discussion was about new v1.x versions of the ISP v1, and I'm\npretty sure we won't see any of those.\n\n> > > > >   };\n> > > > >   \n> > > > >   enum rkisp1_cif_isp_histogram_mode {\n> > > > > @@ -992,4 +994,4 @@ struct rkisp1_stat_buffer {\n> > > > >     struct rkisp1_cif_isp_stat params;\n> > > > >   };\n> > > > >   \n> > > > > -#endif /* _RKISP1_CONFIG_H */\n> > > > > +#endif /* _UAPI_RKISP1_CONFIG_H */","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 1E4D7C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 23 Feb 2024 13:46:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 741D0627FD;\n\tFri, 23 Feb 2024 14:46:01 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0914261CA1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Feb 2024 14:46:00 +0100 (CET)","from pendragon.ideasonboard.com (89-27-53-110.bb.dnainternet.fi\n\t[89.27.53.110])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6C4982E7;\n\tFri, 23 Feb 2024 14:45:50 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"lDPHCTHd\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1708695950;\n\tbh=6LwLaCN4DqhkCX64OIhPr8JjOjR7SmIFqnJROMXJRHo=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=lDPHCTHdOS0VLELbnU4vm/+YSsUOpN2eA5jmF6beYRAO5f/a2JAV0xHbYk802+bcF\n\t+lmct10U/i4xuAW9nr6LCnt+FQUZCwKcbYK98Bx/gKSJ7OADwSYpc3HnqrSvSBuRUD\n\tnvdvoTh5EHweVt4ww2nA8MYDdUtxS5X3p9Y51pa0=","Date":"Fri, 23 Feb 2024 15:46:03 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Subject":"Re: [PATCH v3 4/5] include: linux: Add RKISP1_V_IMX8MP version","Message-ID":"<20240223134603.GA1274@pendragon.ideasonboard.com>","References":"<20240218164908.15921-1-laurent.pinchart@ideasonboard.com>\n\t<20240218164908.15921-5-laurent.pinchart@ideasonboard.com>\n\t<b4e4ae05-f554-4721-b06a-0323d18d79b8@ideasonboard.com>\n\t<20240223132040.GY31348@pendragon.ideasonboard.com>\n\t<170869479017.3710789.11506968322699531628@ping.linuxembedded.co.uk>\n\t<20240223133720.GZ31348@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240223133720.GZ31348@pendragon.ideasonboard.com>","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]