[{"id":17679,"web_url":"https://patchwork.libcamera.org/comment/17679/","msgid":"<459748fa-e7fd-a134-1fbe-a193d607ec05@collabora.com>","date":"2021-06-22T07:42:56","subject":"Re: [libcamera-devel] [PATCH] ipa: rkisp1: Add support for V12 isp\n\tblocks","submitter":{"id":46,"url":"https://patchwork.libcamera.org/api/people/46/","name":"Dafna Hirschfeld","email":"dafna.hirschfeld@collabora.com"},"content":"On 21.06.21 17:59, Heiko Stuebner wrote:\n> From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>\n> \n> Some values for array sizes differ between v10 and v12, so set them\n> in init() and adjust the auto exposure algorithm to the ae value\n> from there.\n> \n> Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>\n\nReviewed-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>\n\n\n> ---\n>   src/ipa/rkisp1/rkisp1.cpp | 23 +++++++++++++++++++++--\n>   1 file changed, 21 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> index b47ea324..5f529334 100644\n> --- a/src/ipa/rkisp1/rkisp1.cpp\n> +++ b/src/ipa/rkisp1/rkisp1.cpp\n> @@ -66,12 +66,31 @@ private:\n>   \tuint32_t gain_;\n>   \tuint32_t minGain_;\n>   \tuint32_t maxGain_;\n> +\n> +\t/* revision-specific data */\n> +\tint hwAeMeanMax_;\n> +\tint hwHistBinNMax_;\n> +\tint hwGammaOutMaxSamples_;\n> +\tint hwHistogramWeightGridsSize_;\n>   };\n>   \n>   int IPARkISP1::init(unsigned int hwRevision)\n>   {\n>   \t/* \\todo Add support for other revisions */\n> -\tif (hwRevision != RKISP1_V10) {\n> +\tswitch (hwRevision) {\n> +\tcase RKISP1_V10:\n> +\t\thwAeMeanMax_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V10;\n> +\t\thwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10;\n> +\t\thwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10;\n> +\t\thwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10;\n> +\t\tbreak;\n> +\tcase RKISP1_V12:\n> +\t\thwAeMeanMax_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V12;\n> +\t\thwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12;\n> +\t\thwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12;\n> +\t\thwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12;\n> +\t\tbreak;\n> +\tdefault:\n>   \t\tLOG(IPARkISP1, Error)\n>   \t\t\t<< \"Hardware revision \" << hwRevision\n>   \t\t\t<< \" is currently not supported\";\n> @@ -236,7 +255,7 @@ void IPARkISP1::updateStatistics(unsigned int frame,\n>   \n>   \t\tunsigned int value = 0;\n>   \t\tunsigned int num = 0;\n> -\t\tfor (int i = 0; i < RKISP1_CIF_ISP_AE_MEAN_MAX_V10; i++) {\n> +\t\tfor (int i = 0; i < hwAeMeanMax_; i++) {\n>   \t\t\tif (ae->exp_mean[i] <= 15)\n>   \t\t\t\tcontinue;\n>   \n>","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 96FA6C321B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Jun 2021 07:43:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AE0F368939;\n\tTue, 22 Jun 2021 09:43:01 +0200 (CEST)","from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AAB3D68932\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Jun 2021 09:43:00 +0200 (CEST)","from [127.0.0.1] (localhost [127.0.0.1])\n\t(Authenticated sender: dafna) with ESMTPSA id B40821F41517"],"To":"Heiko Stuebner <heiko@sntech.de>, libcamera-devel@lists.libcamera.org","References":"<20210621145947.53909-1-heiko@sntech.de>","From":"Dafna Hirschfeld <dafna.hirschfeld@collabora.com>","Message-ID":"<459748fa-e7fd-a134-1fbe-a193d607ec05@collabora.com>","Date":"Tue, 22 Jun 2021 10:42:56 +0300","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.10.0","MIME-Version":"1.0","In-Reply-To":"<20210621145947.53909-1-heiko@sntech.de>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH] ipa: rkisp1: Add support for V12 isp\n\tblocks","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":"Heiko Stuebner <heiko.stuebner@theobroma-systems.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":18160,"web_url":"https://patchwork.libcamera.org/comment/18160/","msgid":"<e67751e5-037b-c5e1-c26d-2b325eb90818@ideasonboard.com>","date":"2021-07-13T13:35:52","subject":"Re: [libcamera-devel] [PATCH] ipa: rkisp1: Add support for V12 isp\n\tblocks","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Heiko,\n\nOn 21/06/2021 15:59, Heiko Stuebner wrote:\n> From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>\n> \n> Some values for array sizes differ between v10 and v12, so set them\n> in init() and adjust the auto exposure algorithm to the ae value\n> from there.\n\nThis looks reasonable to me. It looks like some of these are not yet\nused, but I don't see that as a problem in this instance, as the\nimplementation abstracts the platform version differences.\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\n\n> Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>\n> ---\n>  src/ipa/rkisp1/rkisp1.cpp | 23 +++++++++++++++++++++--\n>  1 file changed, 21 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> index b47ea324..5f529334 100644\n> --- a/src/ipa/rkisp1/rkisp1.cpp\n> +++ b/src/ipa/rkisp1/rkisp1.cpp\n> @@ -66,12 +66,31 @@ private:\n>  \tuint32_t gain_;\n>  \tuint32_t minGain_;\n>  \tuint32_t maxGain_;\n> +\n> +\t/* revision-specific data */\n> +\tint hwAeMeanMax_;\n> +\tint hwHistBinNMax_;\n> +\tint hwGammaOutMaxSamples_;\n> +\tint hwHistogramWeightGridsSize_;\n>  };\n>  \n>  int IPARkISP1::init(unsigned int hwRevision)\n>  {\n>  \t/* \\todo Add support for other revisions */\n> -\tif (hwRevision != RKISP1_V10) {\n> +\tswitch (hwRevision) {\n> +\tcase RKISP1_V10:\n> +\t\thwAeMeanMax_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V10;\n> +\t\thwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10;\n> +\t\thwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10;\n> +\t\thwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10;\n> +\t\tbreak;\n> +\tcase RKISP1_V12:\n> +\t\thwAeMeanMax_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V12;\n> +\t\thwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12;\n> +\t\thwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12;\n> +\t\thwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12;\n> +\t\tbreak;\n> +\tdefault:\n>  \t\tLOG(IPARkISP1, Error)\n>  \t\t\t<< \"Hardware revision \" << hwRevision\n>  \t\t\t<< \" is currently not supported\";\n> @@ -236,7 +255,7 @@ void IPARkISP1::updateStatistics(unsigned int frame,\n>  \n>  \t\tunsigned int value = 0;\n>  \t\tunsigned int num = 0;\n> -\t\tfor (int i = 0; i < RKISP1_CIF_ISP_AE_MEAN_MAX_V10; i++) {\n> +\t\tfor (int i = 0; i < hwAeMeanMax_; i++) {\n>  \t\t\tif (ae->exp_mean[i] <= 15)\n>  \t\t\t\tcontinue;\n>  \n>","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 29B85C3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 13 Jul 2021 13:35:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 74A3568525;\n\tTue, 13 Jul 2021 15:35:57 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B9527684F3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Jul 2021 15:35:55 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 48158CC;\n\tTue, 13 Jul 2021 15:35:55 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"WBjyNEUf\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1626183355;\n\tbh=ggfhL1WdVZfuwKtp/CFw0nGxfl4ceC1XckzkB/HGyU4=;\n\th=To:Cc:References:From:Subject:Date:In-Reply-To:From;\n\tb=WBjyNEUfQUqgZQo0UXkR33c/MrqX2RFsYWVpLEIEWIMn7Gsi8lGEOdF6qKhZtXWN+\n\t4uit47vPSyqIulH+f783kqwiEeSdZKBo2+tv8YkXWHiKF6Q0yS02M1m4UZJnVfEkuJ\n\t5O5o9gT7tEG0lPd/vbEzKY4CqEfCr/oloUSPFDIo=","To":"Heiko Stuebner <heiko@sntech.de>, libcamera-devel@lists.libcamera.org","References":"<20210621145947.53909-1-heiko@sntech.de>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<e67751e5-037b-c5e1-c26d-2b325eb90818@ideasonboard.com>","Date":"Tue, 13 Jul 2021 14:35:52 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<20210621145947.53909-1-heiko@sntech.de>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH] ipa: rkisp1: Add support for V12 isp\n\tblocks","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":"Heiko Stuebner <heiko.stuebner@theobroma-systems.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":18252,"web_url":"https://patchwork.libcamera.org/comment/18252/","msgid":"<5523296.taCxCBeP46@diego>","date":"2021-07-22T09:32:12","subject":"Re: [libcamera-devel] [PATCH] ipa: rkisp1: Add support for V12 isp\n\tblocks","submitter":{"id":83,"url":"https://patchwork.libcamera.org/api/people/83/","name":"Heiko Stübner","email":"heiko@sntech.de"},"content":"Hi,\n\nAm Dienstag, 13. Juli 2021, 15:35:52 CEST schrieb Kieran Bingham:\n> Hi Heiko,\n> \n> On 21/06/2021 15:59, Heiko Stuebner wrote:\n> > From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>\n> > \n> > Some values for array sizes differ between v10 and v12, so set them\n> > in init() and adjust the auto exposure algorithm to the ae value\n> > from there.\n> \n> This looks reasonable to me. It looks like some of these are not yet\n> used, but I don't see that as a problem in this instance, as the\n> implementation abstracts the platform version differences.\n\nThat were my thoughts as well, as we already have the differentiation\nin the kernel uapi for these values, so there wasn't really a need to wait ;-) .\n\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nthanks ... do I need to poke someone to apply this?\n\n\nThanks\nHeiko\n\n\n> > Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>\n> > ---\n> >  src/ipa/rkisp1/rkisp1.cpp | 23 +++++++++++++++++++++--\n> >  1 file changed, 21 insertions(+), 2 deletions(-)\n> > \n> > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> > index b47ea324..5f529334 100644\n> > --- a/src/ipa/rkisp1/rkisp1.cpp\n> > +++ b/src/ipa/rkisp1/rkisp1.cpp\n> > @@ -66,12 +66,31 @@ private:\n> >  \tuint32_t gain_;\n> >  \tuint32_t minGain_;\n> >  \tuint32_t maxGain_;\n> > +\n> > +\t/* revision-specific data */\n> > +\tint hwAeMeanMax_;\n> > +\tint hwHistBinNMax_;\n> > +\tint hwGammaOutMaxSamples_;\n> > +\tint hwHistogramWeightGridsSize_;\n> >  };\n> >  \n> >  int IPARkISP1::init(unsigned int hwRevision)\n> >  {\n> >  \t/* \\todo Add support for other revisions */\n> > -\tif (hwRevision != RKISP1_V10) {\n> > +\tswitch (hwRevision) {\n> > +\tcase RKISP1_V10:\n> > +\t\thwAeMeanMax_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V10;\n> > +\t\thwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10;\n> > +\t\thwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10;\n> > +\t\thwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10;\n> > +\t\tbreak;\n> > +\tcase RKISP1_V12:\n> > +\t\thwAeMeanMax_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V12;\n> > +\t\thwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12;\n> > +\t\thwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12;\n> > +\t\thwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12;\n> > +\t\tbreak;\n> > +\tdefault:\n> >  \t\tLOG(IPARkISP1, Error)\n> >  \t\t\t<< \"Hardware revision \" << hwRevision\n> >  \t\t\t<< \" is currently not supported\";\n> > @@ -236,7 +255,7 @@ void IPARkISP1::updateStatistics(unsigned int frame,\n> >  \n> >  \t\tunsigned int value = 0;\n> >  \t\tunsigned int num = 0;\n> > -\t\tfor (int i = 0; i < RKISP1_CIF_ISP_AE_MEAN_MAX_V10; i++) {\n> > +\t\tfor (int i = 0; i < hwAeMeanMax_; i++) {\n> >  \t\t\tif (ae->exp_mean[i] <= 15)\n> >  \t\t\t\tcontinue;\n> >  \n> > \n>","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 3ECB8C0109\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jul 2021 09:32:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7693968547;\n\tThu, 22 Jul 2021 11:32:14 +0200 (CEST)","from gloria.sntech.de (gloria.sntech.de [185.11.138.130])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A38EB68537\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jul 2021 11:32:13 +0200 (CEST)","from ip5f5aa64a.dynamic.kabel-deutschland.de ([95.90.166.74]\n\thelo=diego.localnet) by gloria.sntech.de with esmtpsa\n\t(TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)\n\t(Exim 4.92) (envelope-from <heiko@sntech.de>)\n\tid 1m6V3t-00072H-0i; Thu, 22 Jul 2021 11:32:13 +0200"],"From":"Heiko =?iso-8859-1?q?St=FCbner?= <heiko@sntech.de>","To":"libcamera-devel@lists.libcamera.org,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","Date":"Thu, 22 Jul 2021 11:32:12 +0200","Message-ID":"<5523296.taCxCBeP46@diego>","In-Reply-To":"<e67751e5-037b-c5e1-c26d-2b325eb90818@ideasonboard.com>","References":"<20210621145947.53909-1-heiko@sntech.de>\n\t<e67751e5-037b-c5e1-c26d-2b325eb90818@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"7Bit","Content-Type":"text/plain; charset=\"us-ascii\"","Subject":"Re: [libcamera-devel] [PATCH] ipa: rkisp1: Add support for V12 isp\n\tblocks","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":18253,"web_url":"https://patchwork.libcamera.org/comment/18253/","msgid":"<20210722094756.5o44igpq3c5w2d2i@uno.localdomain>","date":"2021-07-22T09:47:56","subject":"Re: [libcamera-devel] [PATCH] ipa: rkisp1: Add support for V12 isp\n\tblocks","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hello Heiko,\n\nOn Thu, Jul 22, 2021 at 11:32:12AM +0200, Heiko Stübner wrote:\n> Hi,\n>\n> Am Dienstag, 13. Juli 2021, 15:35:52 CEST schrieb Kieran Bingham:\n> > Hi Heiko,\n> >\n> > On 21/06/2021 15:59, Heiko Stuebner wrote:\n> > > From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>\n> > >\n> > > Some values for array sizes differ between v10 and v12, so set them\n> > > in init() and adjust the auto exposure algorithm to the ae value\n> > > from there.\n> >\n> > This looks reasonable to me. It looks like some of these are not yet\n> > used, but I don't see that as a problem in this instance, as the\n> > implementation abstracts the platform version differences.\n>\n> That were my thoughts as well, as we already have the differentiation\n> in the kernel uapi for these values, so there wasn't really a need to wait ;-) .\n>\n> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>\n> thanks ... do I need to poke someone to apply this?\n\nSorry for the delay, I'll take the patch in!\n\nThanks\n   j\n\n>\n>\n> Thanks\n> Heiko\n>\n>\n> > > Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>\n> > > ---\n> > >  src/ipa/rkisp1/rkisp1.cpp | 23 +++++++++++++++++++++--\n> > >  1 file changed, 21 insertions(+), 2 deletions(-)\n> > >\n> > > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> > > index b47ea324..5f529334 100644\n> > > --- a/src/ipa/rkisp1/rkisp1.cpp\n> > > +++ b/src/ipa/rkisp1/rkisp1.cpp\n> > > @@ -66,12 +66,31 @@ private:\n> > >  \tuint32_t gain_;\n> > >  \tuint32_t minGain_;\n> > >  \tuint32_t maxGain_;\n> > > +\n> > > +\t/* revision-specific data */\n> > > +\tint hwAeMeanMax_;\n> > > +\tint hwHistBinNMax_;\n> > > +\tint hwGammaOutMaxSamples_;\n> > > +\tint hwHistogramWeightGridsSize_;\n> > >  };\n> > >\n> > >  int IPARkISP1::init(unsigned int hwRevision)\n> > >  {\n> > >  \t/* \\todo Add support for other revisions */\n> > > -\tif (hwRevision != RKISP1_V10) {\n> > > +\tswitch (hwRevision) {\n> > > +\tcase RKISP1_V10:\n> > > +\t\thwAeMeanMax_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V10;\n> > > +\t\thwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10;\n> > > +\t\thwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10;\n> > > +\t\thwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10;\n> > > +\t\tbreak;\n> > > +\tcase RKISP1_V12:\n> > > +\t\thwAeMeanMax_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V12;\n> > > +\t\thwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12;\n> > > +\t\thwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12;\n> > > +\t\thwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12;\n> > > +\t\tbreak;\n> > > +\tdefault:\n> > >  \t\tLOG(IPARkISP1, Error)\n> > >  \t\t\t<< \"Hardware revision \" << hwRevision\n> > >  \t\t\t<< \" is currently not supported\";\n> > > @@ -236,7 +255,7 @@ void IPARkISP1::updateStatistics(unsigned int frame,\n> > >\n> > >  \t\tunsigned int value = 0;\n> > >  \t\tunsigned int num = 0;\n> > > -\t\tfor (int i = 0; i < RKISP1_CIF_ISP_AE_MEAN_MAX_V10; i++) {\n> > > +\t\tfor (int i = 0; i < hwAeMeanMax_; i++) {\n> > >  \t\t\tif (ae->exp_mean[i] <= 15)\n> > >  \t\t\t\tcontinue;\n> > >\n> > >\n> >\n>\n>\n>\n>","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 90662C322B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jul 2021 09:47:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E5FB568547;\n\tThu, 22 Jul 2021 11:47:11 +0200 (CEST)","from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 53A9668537\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jul 2021 11:47:10 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 747E92000F;\n\tThu, 22 Jul 2021 09:47:09 +0000 (UTC)"],"Date":"Thu, 22 Jul 2021 11:47:56 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Heiko =?utf-8?q?St=C3=BCbner?= <heiko@sntech.de>","Message-ID":"<20210722094756.5o44igpq3c5w2d2i@uno.localdomain>","References":"<20210621145947.53909-1-heiko@sntech.de>\n\t<e67751e5-037b-c5e1-c26d-2b325eb90818@ideasonboard.com>\n\t<5523296.taCxCBeP46@diego>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<5523296.taCxCBeP46@diego>","Subject":"Re: [libcamera-devel] [PATCH] ipa: rkisp1: Add support for V12 isp\n\tblocks","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":18254,"web_url":"https://patchwork.libcamera.org/comment/18254/","msgid":"<20210722102619.pbflzdyrqdb7jqum@uno.localdomain>","date":"2021-07-22T10:26:19","subject":"Re: [libcamera-devel] [PATCH] ipa: rkisp1: Add support for V12 isp\n\tblocks","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi again,\n\n  just a small note\n\nOn Thu, Jul 22, 2021 at 11:32:12AM +0200, Heiko Stübner wrote:\n> Hi,\n>\n> Am Dienstag, 13. Juli 2021, 15:35:52 CEST schrieb Kieran Bingham:\n> > Hi Heiko,\n> >\n> > On 21/06/2021 15:59, Heiko Stuebner wrote:\n> > > From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>\n> > >\n> > > Some values for array sizes differ between v10 and v12, so set them\n> > > in init() and adjust the auto exposure algorithm to the ae value\n> > > from there.\n> >\n> > This looks reasonable to me. It looks like some of these are not yet\n> > used, but I don't see that as a problem in this instance, as the\n> > implementation abstracts the platform version differences.\n>\n> That were my thoughts as well, as we already have the differentiation\n> in the kernel uapi for these values, so there wasn't really a need to wait ;-) .\n>\n> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>\n> thanks ... do I need to poke someone to apply this?\n>\n>\n> Thanks\n> Heiko\n>\n>\n> > > Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>\n> > > ---\n> > >  src/ipa/rkisp1/rkisp1.cpp | 23 +++++++++++++++++++++--\n> > >  1 file changed, 21 insertions(+), 2 deletions(-)\n> > >\n> > > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> > > index b47ea324..5f529334 100644\n> > > --- a/src/ipa/rkisp1/rkisp1.cpp\n> > > +++ b/src/ipa/rkisp1/rkisp1.cpp\n> > > @@ -66,12 +66,31 @@ private:\n> > >  \tuint32_t gain_;\n> > >  \tuint32_t minGain_;\n> > >  \tuint32_t maxGain_;\n> > > +\n> > > +\t/* revision-specific data */\n> > > +\tint hwAeMeanMax_;\n> > > +\tint hwHistBinNMax_;\n> > > +\tint hwGammaOutMaxSamples_;\n> > > +\tint hwHistogramWeightGridsSize_;\n\nShould these be unsigned ?\n\n> > >  };\n> > >\n> > >  int IPARkISP1::init(unsigned int hwRevision)\n> > >  {\n> > >  \t/* \\todo Add support for other revisions */\n> > > -\tif (hwRevision != RKISP1_V10) {\n> > > +\tswitch (hwRevision) {\n> > > +\tcase RKISP1_V10:\n> > > +\t\thwAeMeanMax_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V10;\n> > > +\t\thwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10;\n> > > +\t\thwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10;\n> > > +\t\thwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10;\n> > > +\t\tbreak;\n> > > +\tcase RKISP1_V12:\n> > > +\t\thwAeMeanMax_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V12;\n> > > +\t\thwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12;\n> > > +\t\thwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12;\n> > > +\t\thwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12;\n> > > +\t\tbreak;\n> > > +\tdefault:\n> > >  \t\tLOG(IPARkISP1, Error)\n> > >  \t\t\t<< \"Hardware revision \" << hwRevision\n> > >  \t\t\t<< \" is currently not supported\";\n> > > @@ -236,7 +255,7 @@ void IPARkISP1::updateStatistics(unsigned int frame,\n> > >\n> > >  \t\tunsigned int value = 0;\n> > >  \t\tunsigned int num = 0;\n> > > -\t\tfor (int i = 0; i < RKISP1_CIF_ISP_AE_MEAN_MAX_V10; i++) {\n> > > +\t\tfor (int i = 0; i < hwAeMeanMax_; i++) {\n\nas well as the i loop counter\n\nwith your ack I'll fix when applying\n\nThanks\n  j\n\n> > >  \t\t\tif (ae->exp_mean[i] <= 15)\n> > >  \t\t\t\tcontinue;\n> > >\n> > >\n> >\n>\n>\n>\n>","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 48A1EC322B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jul 2021 10:25:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 99B9A68543;\n\tThu, 22 Jul 2021 12:25:33 +0200 (CEST)","from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net\n\t[217.70.183.201])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6F5BD6027A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jul 2021 12:25:32 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay8-d.mail.gandi.net (Postfix) with ESMTPSA id B49A61BF20B;\n\tThu, 22 Jul 2021 10:25:31 +0000 (UTC)"],"Date":"Thu, 22 Jul 2021 12:26:19 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Heiko =?utf-8?q?St=C3=BCbner?= <heiko@sntech.de>","Message-ID":"<20210722102619.pbflzdyrqdb7jqum@uno.localdomain>","References":"<20210621145947.53909-1-heiko@sntech.de>\n\t<e67751e5-037b-c5e1-c26d-2b325eb90818@ideasonboard.com>\n\t<5523296.taCxCBeP46@diego>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<5523296.taCxCBeP46@diego>","Subject":"Re: [libcamera-devel] [PATCH] ipa: rkisp1: Add support for V12 isp\n\tblocks","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":18255,"web_url":"https://patchwork.libcamera.org/comment/18255/","msgid":"<47664874.fMDQidcC6G@diego>","date":"2021-07-22T10:59:11","subject":"Re: [libcamera-devel] [PATCH] ipa: rkisp1: Add support for V12 isp\n\tblocks","submitter":{"id":83,"url":"https://patchwork.libcamera.org/api/people/83/","name":"Heiko Stübner","email":"heiko@sntech.de"},"content":"Hi,\n\nAm Donnerstag, 22. Juli 2021, 12:26:19 CEST schrieb Jacopo Mondi:\n> Hi again,\n> \n>   just a small note\n> \n> On Thu, Jul 22, 2021 at 11:32:12AM +0200, Heiko Stübner wrote:\n> > Hi,\n> >\n> > Am Dienstag, 13. Juli 2021, 15:35:52 CEST schrieb Kieran Bingham:\n> > > Hi Heiko,\n> > >\n> > > On 21/06/2021 15:59, Heiko Stuebner wrote:\n> > > > From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>\n> > > >\n> > > > Some values for array sizes differ between v10 and v12, so set them\n> > > > in init() and adjust the auto exposure algorithm to the ae value\n> > > > from there.\n> > >\n> > > This looks reasonable to me. It looks like some of these are not yet\n> > > used, but I don't see that as a problem in this instance, as the\n> > > implementation abstracts the platform version differences.\n> >\n> > That were my thoughts as well, as we already have the differentiation\n> > in the kernel uapi for these values, so there wasn't really a need to wait ;-) .\n> >\n> > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >\n> > thanks ... do I need to poke someone to apply this?\n> >\n> >\n> > Thanks\n> > Heiko\n> >\n> >\n> > > > Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>\n> > > > ---\n> > > >  src/ipa/rkisp1/rkisp1.cpp | 23 +++++++++++++++++++++--\n> > > >  1 file changed, 21 insertions(+), 2 deletions(-)\n> > > >\n> > > > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> > > > index b47ea324..5f529334 100644\n> > > > --- a/src/ipa/rkisp1/rkisp1.cpp\n> > > > +++ b/src/ipa/rkisp1/rkisp1.cpp\n> > > > @@ -66,12 +66,31 @@ private:\n> > > >  \tuint32_t gain_;\n> > > >  \tuint32_t minGain_;\n> > > >  \tuint32_t maxGain_;\n> > > > +\n> > > > +\t/* revision-specific data */\n> > > > +\tint hwAeMeanMax_;\n> > > > +\tint hwHistBinNMax_;\n> > > > +\tint hwGammaOutMaxSamples_;\n> > > > +\tint hwHistogramWeightGridsSize_;\n> \n> Should these be unsigned ?\n> \n> > > >  };\n> > > >\n> > > >  int IPARkISP1::init(unsigned int hwRevision)\n> > > >  {\n> > > >  \t/* \\todo Add support for other revisions */\n> > > > -\tif (hwRevision != RKISP1_V10) {\n> > > > +\tswitch (hwRevision) {\n> > > > +\tcase RKISP1_V10:\n> > > > +\t\thwAeMeanMax_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V10;\n> > > > +\t\thwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10;\n> > > > +\t\thwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10;\n> > > > +\t\thwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10;\n> > > > +\t\tbreak;\n> > > > +\tcase RKISP1_V12:\n> > > > +\t\thwAeMeanMax_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V12;\n> > > > +\t\thwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12;\n> > > > +\t\thwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12;\n> > > > +\t\thwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12;\n> > > > +\t\tbreak;\n> > > > +\tdefault:\n> > > >  \t\tLOG(IPARkISP1, Error)\n> > > >  \t\t\t<< \"Hardware revision \" << hwRevision\n> > > >  \t\t\t<< \" is currently not supported\";\n> > > > @@ -236,7 +255,7 @@ void IPARkISP1::updateStatistics(unsigned int frame,\n> > > >\n> > > >  \t\tunsigned int value = 0;\n> > > >  \t\tunsigned int num = 0;\n> > > > -\t\tfor (int i = 0; i < RKISP1_CIF_ISP_AE_MEAN_MAX_V10; i++) {\n> > > > +\t\tfor (int i = 0; i < hwAeMeanMax_; i++) {\n> \n> as well as the i loop counter\n> \n> with your ack I'll fix when applying\n\nI don't think there is anything speaking against them being\nunsigned, so sure go ahead and change them :-)\n\nThanks\nHeiko\n\n\n> \n> Thanks\n>   j\n> \n> > > >  \t\t\tif (ae->exp_mean[i] <= 15)\n> > > >  \t\t\t\tcontinue;\n> > > >\n> > > >\n> > >\n> >\n> >\n> >\n> >\n>","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 219D7C0109\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jul 2021 10:59:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 71B4268543;\n\tThu, 22 Jul 2021 12:59:14 +0200 (CEST)","from gloria.sntech.de (gloria.sntech.de [185.11.138.130])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 37FE36027A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jul 2021 12:59:13 +0200 (CEST)","from ip5f5aa64a.dynamic.kabel-deutschland.de ([95.90.166.74]\n\thelo=diego.localnet) by gloria.sntech.de with esmtpsa\n\t(TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)\n\t(Exim 4.92) (envelope-from <heiko@sntech.de>)\n\tid 1m6WQ4-0007T5-LO; Thu, 22 Jul 2021 12:59:12 +0200"],"From":"Heiko =?iso-8859-1?q?St=FCbner?= <heiko@sntech.de>","To":"Jacopo Mondi <jacopo@jmondi.org>","Date":"Thu, 22 Jul 2021 12:59:11 +0200","Message-ID":"<47664874.fMDQidcC6G@diego>","In-Reply-To":"<20210722102619.pbflzdyrqdb7jqum@uno.localdomain>","References":"<20210621145947.53909-1-heiko@sntech.de>\n\t<5523296.taCxCBeP46@diego>\n\t<20210722102619.pbflzdyrqdb7jqum@uno.localdomain>","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","Content-Type":"text/plain; charset=\"iso-8859-1\"","Subject":"Re: [libcamera-devel] [PATCH] ipa: rkisp1: Add support for V12 isp\n\tblocks","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":18257,"web_url":"https://patchwork.libcamera.org/comment/18257/","msgid":"<20210722124055.xtozdeh24i7kepgq@uno.localdomain>","date":"2021-07-22T12:40:55","subject":"Re: [libcamera-devel] [PATCH] ipa: rkisp1: Add support for V12 isp\n\tblocks","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Heiko,\n\nOn Thu, Jul 22, 2021 at 12:59:11PM +0200, Heiko Stübner wrote:\n> Hi,\n>\n> Am Donnerstag, 22. Juli 2021, 12:26:19 CEST schrieb Jacopo Mondi:\n> > Hi again,\n> >\n> >   just a small note\n> >\n> > On Thu, Jul 22, 2021 at 11:32:12AM +0200, Heiko Stübner wrote:\n> > > Hi,\n> > >\n> > > Am Dienstag, 13. Juli 2021, 15:35:52 CEST schrieb Kieran Bingham:\n> > > > Hi Heiko,\n> > > >\n> > > > On 21/06/2021 15:59, Heiko Stuebner wrote:\n> > > > > From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>\n> > > > >\n> > > > > Some values for array sizes differ between v10 and v12, so set them\n> > > > > in init() and adjust the auto exposure algorithm to the ae value\n> > > > > from there.\n> > > >\n> > > > This looks reasonable to me. It looks like some of these are not yet\n> > > > used, but I don't see that as a problem in this instance, as the\n> > > > implementation abstracts the platform version differences.\n> > >\n> > > That were my thoughts as well, as we already have the differentiation\n> > > in the kernel uapi for these values, so there wasn't really a need to wait ;-) .\n> > >\n> > > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > >\n> > > thanks ... do I need to poke someone to apply this?\n> > >\n> > >\n> > > Thanks\n> > > Heiko\n> > >\n> > >\n> > > > > Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>\n> > > > > ---\n> > > > >  src/ipa/rkisp1/rkisp1.cpp | 23 +++++++++++++++++++++--\n> > > > >  1 file changed, 21 insertions(+), 2 deletions(-)\n> > > > >\n> > > > > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> > > > > index b47ea324..5f529334 100644\n> > > > > --- a/src/ipa/rkisp1/rkisp1.cpp\n> > > > > +++ b/src/ipa/rkisp1/rkisp1.cpp\n> > > > > @@ -66,12 +66,31 @@ private:\n> > > > >  \tuint32_t gain_;\n> > > > >  \tuint32_t minGain_;\n> > > > >  \tuint32_t maxGain_;\n> > > > > +\n> > > > > +\t/* revision-specific data */\n> > > > > +\tint hwAeMeanMax_;\n> > > > > +\tint hwHistBinNMax_;\n> > > > > +\tint hwGammaOutMaxSamples_;\n> > > > > +\tint hwHistogramWeightGridsSize_;\n> >\n> > Should these be unsigned ?\n> >\n> > > > >  };\n> > > > >\n> > > > >  int IPARkISP1::init(unsigned int hwRevision)\n> > > > >  {\n> > > > >  \t/* \\todo Add support for other revisions */\n> > > > > -\tif (hwRevision != RKISP1_V10) {\n> > > > > +\tswitch (hwRevision) {\n> > > > > +\tcase RKISP1_V10:\n> > > > > +\t\thwAeMeanMax_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V10;\n> > > > > +\t\thwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10;\n> > > > > +\t\thwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10;\n> > > > > +\t\thwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10;\n> > > > > +\t\tbreak;\n> > > > > +\tcase RKISP1_V12:\n> > > > > +\t\thwAeMeanMax_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V12;\n> > > > > +\t\thwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12;\n> > > > > +\t\thwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12;\n> > > > > +\t\thwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12;\n> > > > > +\t\tbreak;\n> > > > > +\tdefault:\n> > > > >  \t\tLOG(IPARkISP1, Error)\n> > > > >  \t\t\t<< \"Hardware revision \" << hwRevision\n> > > > >  \t\t\t<< \" is currently not supported\";\n> > > > > @@ -236,7 +255,7 @@ void IPARkISP1::updateStatistics(unsigned int frame,\n> > > > >\n> > > > >  \t\tunsigned int value = 0;\n> > > > >  \t\tunsigned int num = 0;\n> > > > > -\t\tfor (int i = 0; i < RKISP1_CIF_ISP_AE_MEAN_MAX_V10; i++) {\n> > > > > +\t\tfor (int i = 0; i < hwAeMeanMax_; i++) {\n> >\n> > as well as the i loop counter\n> >\n> > with your ack I'll fix when applying\n>\n> I don't think there is anything speaking against them being\n> unsigned, so sure go ahead and change them :-)\n\nGreat, now applied\n\nThanks\n  j\n\n>\n> Thanks\n> Heiko\n>\n>\n> >\n> > Thanks\n> >   j\n> >\n> > > > >  \t\t\tif (ae->exp_mean[i] <= 15)\n> > > > >  \t\t\t\tcontinue;\n> > > > >\n> > > > >\n> > > >\n> > >\n> > >\n> > >\n> > >\n> >\n>\n>\n>\n>","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 88C31C0109\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jul 2021 12:40:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B672568546;\n\tThu, 22 Jul 2021 14:40:10 +0200 (CEST)","from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net\n\t[217.70.183.198])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2C6556027A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jul 2021 14:40:09 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 6EC10C000F;\n\tThu, 22 Jul 2021 12:40:08 +0000 (UTC)"],"Date":"Thu, 22 Jul 2021 14:40:55 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Heiko =?utf-8?q?St=C3=BCbner?= <heiko@sntech.de>","Message-ID":"<20210722124055.xtozdeh24i7kepgq@uno.localdomain>","References":"<20210621145947.53909-1-heiko@sntech.de>\n\t<5523296.taCxCBeP46@diego>\n\t<20210722102619.pbflzdyrqdb7jqum@uno.localdomain>\n\t<47664874.fMDQidcC6G@diego>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<47664874.fMDQidcC6G@diego>","Subject":"Re: [libcamera-devel] [PATCH] ipa: rkisp1: Add support for V12 isp\n\tblocks","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>"}}]