From patchwork Thu Feb 28 20:04:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 678 Return-Path: Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A0E13610B6 for ; Thu, 28 Feb 2019 21:03:45 +0100 (CET) X-Originating-IP: 2.224.242.101 Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 31C4FE0007; Thu, 28 Feb 2019 20:03:44 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Thu, 28 Feb 2019 21:04:00 +0100 Message-Id: <20190228200410.3022-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 00/10] libcamera: ipu3: ImgU support X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2019 20:03:45 -0000 This series implements capture operations on IPU3 using the ImgU output device. Based on the just sent: "[PATCH v4 0/8] v4l2_(sub)dev: improvements and tests" It will need rework and rebase to take Laurent series into account, and remove the few hacks in here that allows me to access cameraData from a slot connected to a bufferReady signal. Output frames come from the ImgU output, but from my testing both viewfinder and stat nodes should be linked and queued with buffer to have the system working. Tested capturing images in different resolutions (2560x1920, 1920x1080, 640x480) using the cam tool: $./cam -c "ov5670 4-0036 1" -C -F -f width=640,height=480 Images inspected and converted using raw2pnm tool: raw2pnm -x640 -y480 -fNV12 ./frame-000250.bin /tmp/frames.out.ppm Capture seems stable at 30FPS if not from an initial buffer queue error on viewfinder and stat nodes, which then seems to work properly: ------------------------------------------------------------------------------- Capture until user interrupts by SIGINT [6:40:28.489657027] DBG Camera camera.cpp:387 Starting capture [6:40:28.742554331] DBG V4L2 v4l2_device.cpp:830 /dev/video1: Buffer 0 is available [6:40:28.742646387] DBG V4L2 v4l2_device.cpp:752 /dev/video4: Queueing buffer 0 [6:40:28.746592685] DBG V4L2 v4l2_device.cpp:830 /dev/video4: Buffer 0 is available [6:40:28.746684744] DBG V4L2 v4l2_device.cpp:830 /dev/video6: Buffer 0 is available seq: 000270 buf: 0 bytesused: 0 timestamp: 24028746466000 fps: 0.00 [6:40:28.748480475] DBG V4L2 v4l2_device.cpp:752 /dev/video7: Queueing buffer 0 [6:40:28.748548455] ERR V4L2 v4l2_device.cpp:757 /dev/video7: Failed to queue buffer 0: Invalid argument [6:40:28.748576798] DBG V4L2 v4l2_device.cpp:752 /dev/video8: Queueing buffer 0 [6:40:28.748605210] ERR V4L2 v4l2_device.cpp:757 /dev/video8: Failed to queue buffer 0: Invalid argument [6:40:28.748628859] DBG V4L2 v4l2_device.cpp:752 /dev/video1: Queueing buffer 0 [6:40:28.748675600] DBG V4L2 v4l2_device.cpp:752 /dev/video6: Queueing buffer 0 [6:40:28.748784519] DBG V4L2 v4l2_device.cpp:830 /dev/video7: Buffer 0 is available [6:40:28.748840025] DBG V4L2 v4l2_device.cpp:830 /dev/video8: Buffer 0 is available [6:40:28.775710908] DBG V4L2 v4l2_device.cpp:830 /dev/video1: Buffer 1 is available [6:40:28.775792660] DBG V4L2 v4l2_device.cpp:752 /dev/video4: Queueing buffer 1 [6:40:28.779597133] DBG V4L2 v4l2_device.cpp:830 /dev/video6: Buffer 1 is available seq: 000271 buf: 1 bytesused: 0 timestamp: 24028779481000 fps: 30.29 ------------------------------------------------------------------------------- Jacopo Mondi (10): libcamera: ipu3: Group CIO2 devices libcamera: ipu3: Get default image sizes from sensor libcamera: ipu3: Initialize and link ImgU devices libcamera: ipu3: Propagate image format libcamera: ipu3: Implement buffer allocation libcamera: ipu3: Implement buffer release libcamera: ipu3: Queue requests to the pipeline libcamera: ipu3: Implement camera start/stop libcamera: ipu3: Connect CIO2 output to ImgU input libcamera: ipu3: Use NV12 as default image format src/libcamera/pipeline/ipu3/ipu3.cpp | 919 ++++++++++++++++++++++----- 1 file changed, 748 insertions(+), 171 deletions(-) --- 2.20.1