From patchwork Thu Apr 7 08:37:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 15649 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id C1092C326C for ; Thu, 7 Apr 2022 08:37:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 416C76564B; Thu, 7 Apr 2022 10:37:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1649320650; bh=Kc5rQ3wTdXxfGCnnrkYiSU3g48v9MxokGXTPyQcpySw=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=hv9sbTTdlBFJHe35jhwKoX1h/srI4ul5kpihNhw1W4+wMPFupfS7oQKFz2PX0s8H5 TZkZ3Yslb4rUW5gyhZ43kYBQ8VTrVAlzXCqIkcjdbShPWbpgH7YrEGXyQtQPG5ka4o 5o5ht/KL7C5dS28oSjsPcllVe+kHEutwv9oEycTIEhBjOx2NhS6ItdYylwHSXHHXLq xqzSvqtOi4Ny6NIH+B8uIDzxsWsJqKWbQQ0cz31Cm3LEQfWJNClxDXOv35UCksLEF0 pV2qyTqCtPoVyedmW+JKK7Atmtq67ZZVou5yRLHUxOhrfdg5CAdIZ30bNA1qmimKaD 14TJJCFSqXQFA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C35B965642 for ; Thu, 7 Apr 2022 10:37:26 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="fDT8J51p"; dkim-atps=neutral Received: from localhost.localdomain (117.145-247-81.adsl-dyn.isp.belgacom.be [81.247.145.117]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 89F0C880 for ; Thu, 7 Apr 2022 10:37:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1649320646; bh=Kc5rQ3wTdXxfGCnnrkYiSU3g48v9MxokGXTPyQcpySw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fDT8J51pC2gG/14kN/KTvS8RO1GLr3T8TFvbjnb+RHUdX3asfwOf/1lZ+GrVTDKnK 3HQrVr6+uI2Mo1MwniF/0rN6rPAJpzYv/nDwZtIV5RJR++hvn2Fpy1Zw71dbkiN8Os 7IHkjjwR2M511wz65tTULtiHbCQfk9Kudaa4AwMo= To: libcamera-devel@lists.libcamera.org Date: Thu, 7 Apr 2022 11:37:19 +0300 Message-Id: <20220407083719.21631-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220407083719.21631-1-laurent.pinchart@ideasonboard.com> References: <20220407083719.21631-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/3] test: v4l2_videodevice: Fix format configuration in the vimc pipeline X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The V4L2VideoDeviceTest class configures the capture pipeline with parameters that are partly hardcoded, and partly come from the current configuration of the device. In particular, with the vimc pipeline, the sensor subdevice is configured with the size retrieved from the capture video node, and the video node is then reconfigured to 640x480. Relying on the current (and thus possibly random) device configuration can lead to broken pipes when starting streaming. This currently causes failures of the dequeue_watchdog test when run after the formats test. Fix it by explicitly setting the same size for both the vimc subdevs and the video capture device. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder --- test/v4l2_videodevice/v4l2_videodevice_test.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/v4l2_videodevice/v4l2_videodevice_test.cpp b/test/v4l2_videodevice/v4l2_videodevice_test.cpp index f23aaf8f514b..125aafd65041 100644 --- a/test/v4l2_videodevice/v4l2_videodevice_test.cpp +++ b/test/v4l2_videodevice/v4l2_videodevice_test.cpp @@ -60,6 +60,9 @@ int V4L2VideoDeviceTest::init() if (capture_->getFormat(&format)) return TestFail; + format.size.width = 640; + format.size.height = 480; + if (driver_ == "vimc") { sensor_ = new CameraSensor(media_->getEntityByName("Sensor A")); if (sensor_->init()) @@ -82,8 +85,6 @@ int V4L2VideoDeviceTest::init() return TestFail; } - format.size.width = 640; - format.size.height = 480; if (capture_->setFormat(&format)) return TestFail;