From patchwork Thu Aug 8 15:12:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 1749 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 564F4615FF for ; Thu, 8 Aug 2019 17:12:26 +0200 (CEST) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7DB9ACC; Thu, 8 Aug 2019 17:12:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1565277145; bh=oCIAziaidfV8tqY25xFIK7WoMouKNPbsSVZH+K5ifS0=; h=From:To:Cc:Subject:Date:From; b=XZLpsTXvh2do03X2GXZToUvxxBRXHXY599Z1MonvdQwbcl30hzyNQy2HxnsoosStC M95VmM/7CdMM9tC1M61hZ0HfKP6RJp5y6xrANal9EwRUJqjZOMGJc2AzLrvkBivHJZ YvILF6LuYk6N9hjk6UXefUkip/vp8XH9qoxT/JTA= From: Kieran Bingham To: LibCamera Devel Date: Thu, 8 Aug 2019 16:12:15 +0100 Message-Id: <20190808151221.24254-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/6] V4L2 M2M Support (+RPi PoC) 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, 08 Aug 2019 15:12:26 -0000 The RaspberryPi pipeline handler will require a Memory2Memory device to support it's ISP processing. An initial RFC of this has been posted some time ago. This series improves upon the V4L2M2MDevice RFC that was posted and promotes it to it's own class. Support for opening a device for two streams is added by extending the V4L2VideoDevice::open() call to allow optional parameters to be provided for the fd and stream type. An initial test using the V4L2M2MDevice on the VIM2M virtual M2M driver is also provided. Along side all of this there are a couple of small independent fixup patches (Fix the ordering of a debug statement, and remove an unused function) and my current state of the RaspberryPi Pipeline handler. * Please Note * The PipelineHandlerRPi requires out of tree kernel drivers to operate. These are available publically on the RaspberryPi foundation's linux tree, however I have added further patches on top of those. A branch containing the drivers for the RPi with my patches on top is at: https://github.com/kbingham/linux-rpi.git rpi-4.19.y-libcamera Kieran Bingham (6): libcamera: v4l2_device: Add setFd() libcamera: v4l2_videodevice: Fix ordering of debug statement libcamera: v4l2_videodevice: Support M2M devices test: v4l2_videodevice: Add M2M device test test: v4l2_device: Remove unused function [PoC/RFC] libcamera: pipeline: Add RaspberryPi handler src/libcamera/include/v4l2_device.h | 1 + src/libcamera/include/v4l2_videodevice.h | 26 +- src/libcamera/pipeline/meson.build | 1 + src/libcamera/pipeline/raspberrypi.cpp | 425 ++++++++++++++++++ src/libcamera/v4l2_device.cpp | 19 + src/libcamera/v4l2_videodevice.cpp | 208 +++++++-- test/v4l2_videodevice/meson.build | 1 + test/v4l2_videodevice/v4l2_m2mdevice.cpp | 210 +++++++++ .../v4l2_videodevice_test.cpp | 11 - 9 files changed, 862 insertions(+), 40 deletions(-) create mode 100644 src/libcamera/pipeline/raspberrypi.cpp create mode 100644 test/v4l2_videodevice/v4l2_m2mdevice.cpp