[{"id":17582,"web_url":"https://patchwork.libcamera.org/comment/17582/","msgid":"<9124c352-53e4-380a-b731-bb0366462fc8@ideasonboard.com>","date":"2021-06-16T11:29:33","subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline: vimc: Fail\n\twithout an IPA","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Kieran,\n\nOn 6/16/21 3:26 PM, Kieran Bingham wrote:\n> Registering a camera for VIMC without an IPA will fail later when\n> attempting to configure.\n>\n> The IPA is required for VIMC so fail early if it can't be loaded.\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>   src/libcamera/pipeline/vimc/vimc.cpp | 1 +\n>   1 file changed, 1 insertion(+)\n>\n> diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\n> index 9ebd723be171..8af0e92012e6 100644\n> --- a/src/libcamera/pipeline/vimc/vimc.cpp\n> +++ b/src/libcamera/pipeline/vimc/vimc.cpp\n> @@ -431,6 +431,7 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)\n>   \t\tdata->ipa_->init(IPASettings{ conf, data->sensor_->model() });\n>   \t} else {\n>   \t\tLOG(VIMC, Warning) << \"no matching IPA found\";\n> +\t\treturn false;\n     Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n>   \t}\n>   \n>   \t/* Create and register the camera. */","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 0233ABD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 16 Jun 2021 11:29:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 73C3968940;\n\tWed, 16 Jun 2021 13:29:38 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 870F26892F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 16 Jun 2021 13:29:37 +0200 (CEST)","from [192.168.0.107] (unknown [103.238.109.26])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 918CDF88;\n\tWed, 16 Jun 2021 13:29:36 +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=\"OEwlXiKn\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1623842977;\n\tbh=JyPYb4YwxIeALk9xx2wwduMAfnPLq8qDvWSeJcXcTpY=;\n\th=Subject:To:References:From:Date:In-Reply-To:From;\n\tb=OEwlXiKnEXOUxntz3xpfp7Iec+g09CS5n5CSuWBKRJwISqrSaTsaP34Lf4iAUtL3V\n\tLclWnx8Pj+kOGFH0Rim4zWxO1L9s+MNgnr0RDhWrwgXR0ufp9pAbF14/9ojiUEq/TS\n\tJywjaUG4vWJ6pHsr3Ysi/U/K5Mu5kCnfAozXDUAA=","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","References":"<20210616095610.3593281-1-kieran.bingham@ideasonboard.com>","From":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<9124c352-53e4-380a-b731-bb0366462fc8@ideasonboard.com>","Date":"Wed, 16 Jun 2021 16:59:33 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.10.2","MIME-Version":"1.0","In-Reply-To":"<20210616095610.3593281-1-kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Transfer-Encoding":"8bit","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline: vimc: Fail\n\twithout an IPA","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":17583,"web_url":"https://patchwork.libcamera.org/comment/17583/","msgid":"<YMnvg+Icjo8CbGmJ@pendragon.ideasonboard.com>","date":"2021-06-16T12:33:07","subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline: vimc: Fail\n\twithout an IPA","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Wed, Jun 16, 2021 at 10:56:10AM +0100, Kieran Bingham wrote:\n> Registering a camera for VIMC without an IPA will fail later when\n> attempting to configure.\n> \n> The IPA is required for VIMC so fail early if it can't be loaded.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nAssuming this doesn't break any unit test, the change looks good.\n\n> ---\n>  src/libcamera/pipeline/vimc/vimc.cpp | 1 +\n>  1 file changed, 1 insertion(+)\n> \n> diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\n> index 9ebd723be171..8af0e92012e6 100644\n> --- a/src/libcamera/pipeline/vimc/vimc.cpp\n> +++ b/src/libcamera/pipeline/vimc/vimc.cpp\n> @@ -431,6 +431,7 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)\n>  \t\tdata->ipa_->init(IPASettings{ conf, data->sensor_->model() });\n>  \t} else {\n>  \t\tLOG(VIMC, Warning) << \"no matching IPA found\";\n> +\t\treturn false;\n>  \t}\n\nI would have rewritten the code as\n\n\tif (!data->ipa_) {\n\t\tLOG(VIMC, Warning) << \"no matching IPA found\";\n\t\treturn false;\n\t}\n\n\tstd::string conf = data->ipa_->configurationFile(\"vimc.conf\");\n\tdata->ipa_->init(IPASettings{ conf, data->sensor_->model() });\n\nand while at it, turned the message to an Error.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>  \n>  \t/* Create and register the camera. */","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 57BE1C3218\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 16 Jun 2021 12:33:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C6D6868941;\n\tWed, 16 Jun 2021 14:33:29 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 65B496029A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 16 Jun 2021 14:33:28 +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 D2AA0F88;\n\tWed, 16 Jun 2021 14:33:27 +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=\"elqMQZCE\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1623846808;\n\tbh=sMk2besTTcnSjSeNRduRUcf5Hud5UcMP6sWMDmuXlF0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=elqMQZCECCkX4H66oCzX7/XwJgFqk2EGBIuvIkCT/p7Ll4yutIvh2tRr+2VCDHjrp\n\t18DnfHElTlsbd0mYolNcUYLzV8sAm0kIwcjJh5UJmTXHRkdERMKosYUsEZMVjraut9\n\toD07+DOAXH9ukxzCKJWaxJmg1rbWH1JL8619K2jI=","Date":"Wed, 16 Jun 2021 15:33:07 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YMnvg+Icjo8CbGmJ@pendragon.ideasonboard.com>","References":"<20210616095610.3593281-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210616095610.3593281-1-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline: vimc: Fail\n\twithout an IPA","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17584,"web_url":"https://patchwork.libcamera.org/comment/17584/","msgid":"<02fbb525-a9fd-c275-80cd-8b294e5b9242@ideasonboard.com>","date":"2021-06-16T14:33:25","subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline: vimc: Fail\n\twithout an IPA","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 16/06/2021 13:33, Laurent Pinchart wrote:\n> Hi Kieran,\n> \n> Thank you for the patch.\n> \n> On Wed, Jun 16, 2021 at 10:56:10AM +0100, Kieran Bingham wrote:\n>> Registering a camera for VIMC without an IPA will fail later when\n>> attempting to configure.\n>>\n>> The IPA is required for VIMC so fail early if it can't be loaded.\n>>\n>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> Assuming this doesn't break any unit test, the change looks good.\n> \n>> ---\n>>  src/libcamera/pipeline/vimc/vimc.cpp | 1 +\n>>  1 file changed, 1 insertion(+)\n>>\n>> diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\n>> index 9ebd723be171..8af0e92012e6 100644\n>> --- a/src/libcamera/pipeline/vimc/vimc.cpp\n>> +++ b/src/libcamera/pipeline/vimc/vimc.cpp\n>> @@ -431,6 +431,7 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)\n>>  \t\tdata->ipa_->init(IPASettings{ conf, data->sensor_->model() });\n>>  \t} else {\n>>  \t\tLOG(VIMC, Warning) << \"no matching IPA found\";\n>> +\t\treturn false;\n>>  \t}\n> \n> I would have rewritten the code as\n> \n> \tif (!data->ipa_) {\n> \t\tLOG(VIMC, Warning) << \"no matching IPA found\";\n> \t\treturn false;\n> \t}\n> \n> \tstd::string conf = data->ipa_->configurationFile(\"vimc.conf\");\n> \tdata->ipa_->init(IPASettings{ conf, data->sensor_->model() });\n> \n> and while at it, turned the message to an Error.\n\n\nThat's worth the update indeed.\n\n\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n>>  \n>>  \t/* Create and register the camera. */\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 99402BD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 16 Jun 2021 14:33:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D251468941;\n\tWed, 16 Jun 2021 16:33:29 +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 6AD146029A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 16 Jun 2021 16:33:28 +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 D9CE93E5;\n\tWed, 16 Jun 2021 16:33:27 +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=\"lMVdhwjy\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1623854008;\n\tbh=QkXQKQT4uhGjhrndtIOaZ5uS4uh8iYfubXEK0BYSvEg=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=lMVdhwjySryOGLcwqsOd9k3yUsNwFoGnLQb6a1HNfpDgXcmzRwotaJN8GBJnFDXIl\n\tFCItgcKugToy1AJx6fYaTWeQGMe+b8GLTX8AnnR+LERJ16uyCCY9r4zrPWNmQJHBzz\n\tz+kiihtZKATaIgrDv3+YHoIoQe7q1hhEh7lTSJ3I=","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20210616095610.3593281-1-kieran.bingham@ideasonboard.com>\n\t<YMnvg+Icjo8CbGmJ@pendragon.ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Organization":"Ideas on Board","Message-ID":"<02fbb525-a9fd-c275-80cd-8b294e5b9242@ideasonboard.com>","Date":"Wed, 16 Jun 2021 15:33:25 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.8.1","MIME-Version":"1.0","In-Reply-To":"<YMnvg+Icjo8CbGmJ@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline: vimc: Fail\n\twithout an IPA","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>","Reply-To":"kieran.bingham@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>"}}]