[{"id":10928,"web_url":"https://patchwork.libcamera.org/comment/10928/","msgid":"<20200628095549.GM6954@pendragon.ideasonboard.com>","date":"2020-06-28T09:55:49","subject":"Re: [libcamera-devel] [PATCH 2/2] libcamera: pipeline: simple: try\n\tnext mbus code if setupFormats() fails","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Andrey,\n\nThank you for the patch.\n\nOn Tue, Apr 21, 2020 at 11:39:54PM +0300, Andrey Konovalov wrote:\n> Now SimpleCameraData::setupFormats() can fail if the camera sensor\n> supports media bus code which some entities down the pipeline don't.\n> \n> When this happens continue with the next media bus code instead of aborting\n> the enumeration of the possible pipeline configurations.\n> \n> Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>\n> ---\n>  src/libcamera/pipeline/simple/simple.cpp | 5 +++--\n>  1 file changed, 3 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> index 8212bd9..1a31e18 100644\n> --- a/src/libcamera/pipeline/simple/simple.cpp\n> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> @@ -265,10 +265,11 @@ int SimpleCameraData::init()\n>  \n>  \t\tret = setupFormats(&format, V4L2Subdevice::TryFormat);\n>  \t\tif (ret < 0) {\n> -\t\t\tLOG(SimplePipeline, Error)\n> +\t\t\tLOG(SimplePipeline, Warning)\n>  \t\t\t\t<< \"Failed to setup pipeline for media bus code \"\n>  \t\t\t\t<< utils::hex(code, 4);\n\nShould we downgrade this to a debug message to avoid worrying the user\nwhen all goes well ? Or maybe an info message to still give a hint that\nsomething may be wrong ? And how about also making the message less\nscary ?\n\n\t\t\t\t<< \"Media bus code \" << utils::hex(code, 4)\n\t\t\t\t<< \" not supported for this pipeline\";\n\nIf you're fine with these changes I can fix when applying.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> -\t\t\treturn ret;\n> +\t\t\t/* Try next mbus_code supported by the sensor */\n> +\t\t\tcontinue;\n>  \t\t}\n>  \n>  \t\tstd::map<V4L2PixelFormat, std::vector<SizeRange>> videoFormats =","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 85B1EC2E66\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 28 Jun 2020 09:55:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1CE44609C7;\n\tSun, 28 Jun 2020 11:55:54 +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 64D38603B4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 28 Jun 2020 11:55:52 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C7A9A4FB;\n\tSun, 28 Jun 2020 11:55:51 +0200 (CEST)"],"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=\"RGE+sQ3v\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1593338152;\n\tbh=XQFYO3ijJVmH1GwbpVq+btUEtM5fx2xIVWToQ/ELxlA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=RGE+sQ3vHS9p0XFlW4dD1Ojn+SUKk61u1f41myLIob6woOg2TTa7wDhwKwWa4I+Yc\n\t7AYE0RkfvysuwBRQnAMeyc9xU0OxTipjyuwN3Cjc7Ll4D0rCza0sp08ttQUKtu0tiS\n\toSivdCFc6US3KfNU5lyE+QKxg8YbnKsdKRUSrSAA=","Date":"Sun, 28 Jun 2020 12:55:49 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Andrey Konovalov <andrey.konovalov@linaro.org>","Message-ID":"<20200628095549.GM6954@pendragon.ideasonboard.com>","References":"<20200421203954.15585-1-andrey.konovalov@linaro.org>\n\t<20200421203954.15585-3-andrey.konovalov@linaro.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200421203954.15585-3-andrey.konovalov@linaro.org>","Subject":"Re: [libcamera-devel] [PATCH 2/2] libcamera: pipeline: simple: try\n\tnext mbus code if setupFormats() fails","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","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]