From patchwork Thu Apr 18 16:46:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 1065 Return-Path: Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2527D600F9 for ; Thu, 18 Apr 2019 18:45:52 +0200 (CEST) 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 relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 9A35D1C000B; Thu, 18 Apr 2019 16:45:51 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Thu, 18 Apr 2019 18:46:32 +0200 Message-Id: <20190418164638.400-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v6 0/6] libcamera: ipu3: Multiple streams 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, 18 Apr 2019 16:45:52 -0000 And here we are at version 6. Since v5 (this morning) a few things happened - framework changes that were part of v5 of this series got merged - RkISP1 support got merged This series rebase v5 on top of latest master to introduce support for multiple streams on IPU3 platform. Quoting the v5 cover letter, as the changelog between v4->v6 stays the same: I have included comments on v4 received from Laurent and Niklas and now the patches look much better, thanks you both for the comments. The most relevant change is related to the long reply I gave to Niklas on v4's "libcamera: ipu3: Queue requests for multiple streams" There I detailed how it was necessary to queue buffers to the 'output' node to have images processed by the ImgU and how I badly worked it around. We concluded a kernel fix was needed to use dummy buffers in case no buffer has been made available from userspace. Well, I re-tested now, and it seems the driver usese dummy buffers already, if the output node is "enabled" (aka the media link between it and the ImgU subdevice is active). With this current implementation the 'output' node is active (as it was in v4, I cannot tell what changed) and the driver uses dummy buffer, as I've verified enabling the ipu3-imgu module debug output. For this reason the patch is greatly simplified and just simply queue buffers for the nodes part of the request. I have tested several stream combinations: - only viewfinder - only still capture - viewfinder + still capture - viewfinder + (viewfinder + still capture) every 10 frames (see patch 14/14) using the cam application from the most recent master branch. Patches available at jmondi/imgu-multi-v6 Hopefully, we should be close to have this merged soon. Thanks j Jacopo Mondi (6): libcamera: ipu3: Create camera with 2 streams libcamera: ipu3: Add multiple stream memory management libcamera: ipu3: Queue requests for multiple streams libcamera: ipu3: Connect viewfinder's BufferReady signal libcamera: ipu3: Use roles in stream configuration [HACK] still capture every 10 frames src/cam/main.cpp | 46 +++- src/libcamera/pipeline/ipu3/ipu3.cpp | 360 ++++++++++++++++++++------- 2 files changed, 308 insertions(+), 98 deletions(-) --- 2.21.0