[{"id":22644,"web_url":"https://patchwork.libcamera.org/comment/22644/","msgid":"<20220407112718.GK3237525@pyrite.rasen.tech>","date":"2022-04-07T11:27:18","subject":"Re: [libcamera-devel] [PATCH 3/3] test: v4l2_videodevice: Fix\n\tformat configuration in the vimc pipeline","submitter":{"id":97,"url":"https://patchwork.libcamera.org/api/people/97/","name":"Nicolas Dufresne via libcamera-devel","email":"libcamera-devel@lists.libcamera.org"},"content":"Hi Laurent,\n\nOn Thu, Apr 07, 2022 at 11:37:19AM +0300, Laurent Pinchart via libcamera-devel wrote:\n> The V4L2VideoDeviceTest class configures the capture pipeline with\n> parameters that are partly hardcoded, and partly come from the current\n> configuration of the device. In particular, with the vimc pipeline, the\n> sensor subdevice is configured with the size retrieved from the capture\n> video node, and the video node is then reconfigured to 640x480.\n> \n> Relying on the current (and thus possibly random) device configuration\n> can lead to broken pipes when starting streaming. This currently causes\n> failures of the dequeue_watchdog test when run after the formats test.\n> \n> Fix it by explicitly setting the same size for both the vimc subdevs and\n> the video capture device.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  test/v4l2_videodevice/v4l2_videodevice_test.cpp | 5 +++--\n>  1 file changed, 3 insertions(+), 2 deletions(-)\n> \n> diff --git a/test/v4l2_videodevice/v4l2_videodevice_test.cpp b/test/v4l2_videodevice/v4l2_videodevice_test.cpp\n> index f23aaf8f514b..125aafd65041 100644\n> --- a/test/v4l2_videodevice/v4l2_videodevice_test.cpp\n> +++ b/test/v4l2_videodevice/v4l2_videodevice_test.cpp\n> @@ -60,6 +60,9 @@ int V4L2VideoDeviceTest::init()\n>  \tif (capture_->getFormat(&format))\n>  \t\treturn TestFail;\n>  \n> +\tformat.size.width = 640;\n> +\tformat.size.height = 480;\n> +\n>  \tif (driver_ == \"vimc\") {\n>  \t\tsensor_ = new CameraSensor(media_->getEntityByName(\"Sensor A\"));\n>  \t\tif (sensor_->init())\n> @@ -82,8 +85,6 @@ int V4L2VideoDeviceTest::init()\n>  \t\t\treturn TestFail;\n>  \t}\n>  \n> -\tformat.size.width = 640;\n> -\tformat.size.height = 480;\n>  \tif (capture_->setFormat(&format))\n>  \t\treturn TestFail;","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 578A7C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  7 Apr 2022 11:27:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A000165642;\n\tThu,  7 Apr 2022 13:27:27 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 913056563F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  7 Apr 2022 13:27:26 +0200 (CEST)","from pyrite.rasen.tech (softbank036240056250.bbtec.net\n\t[36.240.56.250])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EECAA499;\n\tThu,  7 Apr 2022 13:27:24 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1649330847;\n\tbh=04iYuzRQmTAT+uz2P2cW2F5w1E4PbAZTa1UsA20HSIs=;\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=n8C2UdMLQal0xqrDzmyEBMDvvhMSJVVoAyqdecLEDlIPKiAKaL9+bFO67nUu8I69p\n\t8CqbMG5n+5qnUqendk6yjqqE6APRfnNazU2ER73U5+urQUjUMg5ONRB/EsSut5niv4\n\tEOGC8nwWlm5gcDZOlAI1udGeMCUC5/MHQ5ZCL+dcCzqfiOxkSP/oMV/Of2Yw15VXU0\n\tsbqTID1fYZBj8ZhEJzk01xgoeicRrjiWOxU46tLhpIAQ1G4iUMUH3XgJgcDz+wuKM8\n\t/3allvrTB82SSLlL1GDc6mr9elipoMlEQjb42Zzzwvb+RDtraSe6G2hiOrHsFIrwvd\n\t5DC28vgKbe/1g==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1649330846;\n\tbh=04iYuzRQmTAT+uz2P2cW2F5w1E4PbAZTa1UsA20HSIs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=FHLUml6oiq6HI1lFA/1eprLW2WQnqA2AD7K4jfV4T2Fl8ZdnYO/roPPbRVGrzVN85\n\t0315eII12S6zqBzz9ZbPHTqyH8oLqE5XFZ6YwcKgn5olmhGsxo/9sZhndWu0zrv+/i\n\tlc8QKopBKSUOkljEJAzuNJ/TP8Hat3fRMkeExUnU="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"FHLUml6o\"; dkim-atps=neutral","Date":"Thu, 7 Apr 2022 20:27:18 +0900","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20220407112718.GK3237525@pyrite.rasen.tech>","References":"<20220407083719.21631-1-laurent.pinchart@ideasonboard.com>\n\t<20220407083719.21631-4-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20220407083719.21631-4-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 3/3] test: v4l2_videodevice: Fix\n\tformat configuration in the vimc pipeline","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":"Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"paul.elder@ideasonboard.com","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]