From 4debc71ffa7ffe92d23189c9157855ba89fccfea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Mon, 5 Aug 2019 13:58:28 +0200 Subject: libcamera: pipeline: vimc: Switch to using the RGB/YUV Capture video node MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Linux commit 85ab1aa1fac17bcd ("media: vimc: deb: fix default sink bayer format") which is part of v5.2 changes the default media bus format for the debayer subdevices. This leads to a -EPIPE error when trying to use the raw capture video device nodes. Fix this by moving the vimc pipeline to use the RGB/YUV Capture capture video node. As a consequence of this change the scaler in the vimc pipeline is used and a hard coded upscale of 3 is present in the video pipeline. This limits the sizes exposed and accepted by libcamera to multiples of 3. Update the buffer import test case to match this new format constraint by setting the resolution to 1920x1080, a resolution which works with both vimc and vivid. With this new resolution the buffer import test takes a bit more time to complete 60 buffers and it's runtime also needs to be increased. The raw capture video node still needs to be handled by the pipeline as its format needs to be updated to allow the pipeline format validation to pass. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- test/camera/buffer_import.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/camera') diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp index 400d02b3..98786469 100644 --- a/test/camera/buffer_import.cpp +++ b/test/camera/buffer_import.cpp @@ -72,12 +72,12 @@ public: return ret; } - format_.size.width = 640; - format_.size.height = 480; + format_.size.width = 1920; + format_.size.height = 1080; format_.fourcc = V4L2_PIX_FMT_RGB24; format_.planesCount = 1; - format_.planes[0].size = 640 * 480 * 3; - format_.planes[0].bpl = 640 * 3; + format_.planes[0].size = 1920 * 1080 * 3; + format_.planes[0].bpl = 1920 * 3; if (video_->setFormat(&format_)) { cleanup(); @@ -378,7 +378,7 @@ protected: EventDispatcher *dispatcher = CameraManager::instance()->eventDispatcher(); Timer timer; - timer.start(3000); + timer.start(5000); while (timer.isRunning() && !sink_.done()) dispatcher->processEvents(); -- cgit v1.2.1