[{"id":25454,"web_url":"https://patchwork.libcamera.org/comment/25454/","msgid":"<b45e68f0-a8f2-2fae-1447-c5391fb852cb@ideasonboard.com>","date":"2022-10-19T08:41:46","subject":"Re: [libcamera-devel] [IPU3-IPA PATCH] ipu3: ipa: Update to latest\n\tIPACameraSensorInfo","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Kieran,\n\nThanks for the patch\n\nOn 10/19/22 4:43 AM, Kieran Bingham via libcamera-devel wrote:\n> In libcamera commit e5fc0132f80d (\"camera_sensor: Add minimum and\n> maximum line length to IPACameraSensorInfo\"), the IPU3 IPA interface is\n> updated to provide both minimum and maximum line lengths, replacing the\n> existing lineLenght field.\n\ns/lineLenght/lineLength\n>\n> Update the ipu3-ipa to use IPACameraSensorInfo::minLineLength instead of\n> IPACameraSensorInfo::lineLength, as logically we will always want to use\n> the fastest sensor readout by default.\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n> ---\n>   aiq/aiq_input_parameters.cpp | 2 +-\n>   ipu3.cpp                     | 2 +-\n>   2 files changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/aiq/aiq_input_parameters.cpp b/aiq/aiq_input_parameters.cpp\n> index 7a6a1fac8a37..1639b61b1831 100644\n> --- a/aiq/aiq_input_parameters.cpp\n> +++ b/aiq/aiq_input_parameters.cpp\n> @@ -79,7 +79,7 @@ void AiqInputParameters::reset()\n>   int AiqInputParameters::configure(const IPAConfigInfo &configInfo)\n>   {\n>   \tsensorDescriptor.pixel_clock_freq_mhz = configInfo.sensorInfo.pixelRate / 1000000;\n> -\tsensorDescriptor.pixel_periods_per_line = configInfo.sensorInfo.lineLength;\n> +\tsensorDescriptor.pixel_periods_per_line = configInfo.sensorInfo.minLineLength;\n>   \tsensorDescriptor.line_periods_per_field = configInfo.sensorInfo.minFrameLength;\n>   \tsensorDescriptor.line_periods_vertical_blanking = 106; /* default */\n>   \t//INFO: fine integration is not supported by v4l2\n> diff --git a/ipu3.cpp b/ipu3.cpp\n> index 7ecd377346f0..f3c65c7c142d 100644\n> --- a/ipu3.cpp\n> +++ b/ipu3.cpp\n> @@ -118,7 +118,7 @@ void IPAIPU3::updateControls(const IPACameraSensorInfo &sensorInfo,\n>   \t * exposure min, max and default and convert it from lines to\n>   \t * microseconds.\n>   \t */\n> -\tdouble lineDuration = sensorInfo.lineLength / (sensorInfo.pixelRate / 1e6);\n> +\tdouble lineDuration = sensorInfo.minLineLength / (sensorInfo.pixelRate / 1e6);\n>   \tconst ControlInfo &v4l2Exposure = sensorControls.find(V4L2_CID_EXPOSURE)->second;\n>   \tint32_t minExposure = v4l2Exposure.min().get<int32_t>() * lineDuration;\n>   \tint32_t maxExposure = v4l2Exposure.max().get<int32_t>() * lineDuration;","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 12756C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 19 Oct 2022 08:41:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8BF4A62E3A;\n\tWed, 19 Oct 2022 10:41:56 +0200 (CEST)","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 9F84562DD7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 19 Oct 2022 10:41:55 +0200 (CEST)","from [192.168.1.101] (unknown [103.238.109.19])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C09A15A4;\n\tWed, 19 Oct 2022 10:41:53 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666168916;\n\tbh=l7Rqf9Lh+JvDhJFDZs8AA7vXgLdwKbnPNEKQKvEqtZA=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=eDjGXWJYEDXW7twzMtPLgp/JW4XAV4518nI5kL/vCGKpZQueP8s8BTEITeo9tm8KU\n\tOZ8uI57EvyB2W5Jg5+YhQDw/iq7dRWCLAQ84TA8sNNdrjsB6EH9c1w4opXoTUqHz9v\n\t2rl70Gm8cYUBTyy+ajz0P4HmjxXy1Skuzf0t24qTublQbq/Alo/T3qKHbY+FSPGaFy\n\ty5TbbHJfO0BBdugijIRFPh4If5x1Tnvm5wam9EwuISz7A7SSxFF1Cc6O4+ecdPZBCI\n\tqAd56Ne2M8y80c4BgKMNDAwg4ezttA+z4C/Y1PWQODnFsviIu0qqcfEEDbM45yNKRK\n\tkLRN7Y09Scphg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1666168915;\n\tbh=l7Rqf9Lh+JvDhJFDZs8AA7vXgLdwKbnPNEKQKvEqtZA=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=dst+qmLUzbObFcQeNX9Sh3W0LS7iBEx6np67rKJXrsGgbeBSAALKHXcIgCXg9fjvz\n\tK/u7tPf92NBRD+CdLH9YmyQPxNjooCSPTIr43bQ2TTraDXXJQbltbRwlP96P/ZQ1aR\n\tSTqvl+xpdEkkNcETdAKwLAYxZVyW1tNPGEBGAkHs="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"dst+qmLU\"; dkim-atps=neutral","Message-ID":"<b45e68f0-a8f2-2fae-1447-c5391fb852cb@ideasonboard.com>","Date":"Wed, 19 Oct 2022 14:11:46 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101\n\tThunderbird/102.2.1","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","References":"<20221018231313.2242268-1-kieran.bingham@ideasonboard.com>","Content-Language":"en-US","In-Reply-To":"<20221018231313.2242268-1-kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [IPU3-IPA PATCH] ipu3: ipa: Update to latest\n\tIPACameraSensorInfo","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>","From":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25463,"web_url":"https://patchwork.libcamera.org/comment/25463/","msgid":"<Y0/Iq6kytLWMr0XF@pendragon.ideasonboard.com>","date":"2022-10-19T09:51:39","subject":"Re: [libcamera-devel] [IPU3-IPA PATCH] ipu3: ipa: Update to latest\n\tIPACameraSensorInfo","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Wed, Oct 19, 2022 at 02:11:46PM +0530, Umang Jain via libcamera-devel wrote:\n> Hi Kieran,\n> \n> Thanks for the patch\n> \n> On 10/19/22 4:43 AM, Kieran Bingham via libcamera-devel wrote:\n> > In libcamera commit e5fc0132f80d (\"camera_sensor: Add minimum and\n> > maximum line length to IPACameraSensorInfo\"), the IPU3 IPA interface is\n> > updated to provide both minimum and maximum line lengths, replacing the\n> > existing lineLenght field.\n> \n> s/lineLenght/lineLength\n>\n> > Update the ipu3-ipa to use IPACameraSensorInfo::minLineLength instead of\n> > IPACameraSensorInfo::lineLength, as logically we will always want to use\n> > the fastest sensor readout by default.\n> >\n> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> > ---\n> >   aiq/aiq_input_parameters.cpp | 2 +-\n> >   ipu3.cpp                     | 2 +-\n> >   2 files changed, 2 insertions(+), 2 deletions(-)\n> >\n> > diff --git a/aiq/aiq_input_parameters.cpp b/aiq/aiq_input_parameters.cpp\n> > index 7a6a1fac8a37..1639b61b1831 100644\n> > --- a/aiq/aiq_input_parameters.cpp\n> > +++ b/aiq/aiq_input_parameters.cpp\n> > @@ -79,7 +79,7 @@ void AiqInputParameters::reset()\n> >   int AiqInputParameters::configure(const IPAConfigInfo &configInfo)\n> >   {\n> >   \tsensorDescriptor.pixel_clock_freq_mhz = configInfo.sensorInfo.pixelRate / 1000000;\n> > -\tsensorDescriptor.pixel_periods_per_line = configInfo.sensorInfo.lineLength;\n> > +\tsensorDescriptor.pixel_periods_per_line = configInfo.sensorInfo.minLineLength;\n> >   \tsensorDescriptor.line_periods_per_field = configInfo.sensorInfo.minFrameLength;\n> >   \tsensorDescriptor.line_periods_vertical_blanking = 106; /* default */\n> >   \t//INFO: fine integration is not supported by v4l2\n> > diff --git a/ipu3.cpp b/ipu3.cpp\n> > index 7ecd377346f0..f3c65c7c142d 100644\n> > --- a/ipu3.cpp\n> > +++ b/ipu3.cpp\n> > @@ -118,7 +118,7 @@ void IPAIPU3::updateControls(const IPACameraSensorInfo &sensorInfo,\n> >   \t * exposure min, max and default and convert it from lines to\n> >   \t * microseconds.\n> >   \t */\n> > -\tdouble lineDuration = sensorInfo.lineLength / (sensorInfo.pixelRate / 1e6);\n> > +\tdouble lineDuration = sensorInfo.minLineLength / (sensorInfo.pixelRate / 1e6);\n> >   \tconst ControlInfo &v4l2Exposure = sensorControls.find(V4L2_CID_EXPOSURE)->second;\n> >   \tint32_t minExposure = v4l2Exposure.min().get<int32_t>() * lineDuration;\n> >   \tint32_t maxExposure = v4l2Exposure.max().get<int32_t>() * lineDuration;","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 05082C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 19 Oct 2022 09:52:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3987862E4A;\n\tWed, 19 Oct 2022 11:52:05 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 435E262E37\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 19 Oct 2022 11:52:04 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A84265A4;\n\tWed, 19 Oct 2022 11:52:03 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666173125;\n\tbh=1cXcTQQGKMJYpFQenCBn8Zumz7OfxR2p76p+l0xBwmk=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=JWRri+nZyUdpk41tBsYWnWvNeu/XUpGpSnwG7juXms7AuR0H1j9PD5WrXx6qBEB/B\n\taR7Dlkkje8+kB4BDrFXmbetKAB1QB1ovAtv7H5qX/XdiofFFhUr8WTxTaNKR9nGJSt\n\tkyu0dzyb3UrxdmWyBpsyH+jKXMuGojqQWaEwQo4f4QbdVciEt+bSD+1fjUNBCFwcDz\n\t28olPi6J+BD6xFdJjk6KXD6fkiSEs+HZwhvYExfNxdz/dHnKECut3cGXOBVcZmmZbY\n\tccUxcTR3cUTYrDI7cRDakuLwWlvt9SReV9+Gczhf9Knoc8ViFXcsi3d7KqBVE1nEMI\n\tCfOM4L2PFb+zw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1666173123;\n\tbh=1cXcTQQGKMJYpFQenCBn8Zumz7OfxR2p76p+l0xBwmk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=DZiiKzASUlCYHsL+X4ue9GvBKmas5xtRGrvDr39E7W/G0WTrmynYICViiOsOthR8R\n\tnCATF/jP8XHyQ525F+U659dCVP1asMdO7ngEif2HNBQD5iieISdNeAfxVWUwQOGG4S\n\tuTLVdq0mOmkc539oQAnFR44QXmrcLbX5VdiCuPcw="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"DZiiKzAS\"; dkim-atps=neutral","Date":"Wed, 19 Oct 2022 12:51:39 +0300","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<Y0/Iq6kytLWMr0XF@pendragon.ideasonboard.com>","References":"<20221018231313.2242268-1-kieran.bingham@ideasonboard.com>\n\t<b45e68f0-a8f2-2fae-1447-c5391fb852cb@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<b45e68f0-a8f2-2fae-1447-c5391fb852cb@ideasonboard.com>","Subject":"Re: [libcamera-devel] [IPU3-IPA PATCH] ipu3: ipa: Update to latest\n\tIPACameraSensorInfo","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]