From patchwork Fri Mar 13 23:38:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3084 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0F53F62826 for ; Sat, 14 Mar 2020 00:39:05 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3AC852D6; Sat, 14 Mar 2020 00:39:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1584142744; bh=vWW/pv9lEAEbiweJV2ShejTZq/GBSsHomfLI+4sntw8=; h=From:To:Cc:Subject:Date:From; b=H8uqgc3f5xCA+4Z2MZJrxVob+UR1dTqOiWoJB27qC5iVqbyoH30SbwBzaAuIHG5kA unq8dGFEZyii32uZD89pKwFpMwpRbsGfaZOPZNrdmo59dDmSP6UBqjDqAN2kYvQu3c hMDnWqwuZMS07apGbG8khVpb3Ilp035IOI4CxLtI= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Martijn Braam , Andrey Konovalov , Mickael GUENE , Benjamin GAIGNARD Date: Sat, 14 Mar 2020 01:38:48 +0200 Message-Id: <20200313233856.25202-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/8] Simple pipeline handler 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-List-Received-Date: Fri, 13 Mar 2020 23:39:05 -0000 Hello, This patch series builds on Martijn's work to implement a pipeline handler for simpler pipelines. Additional information about the pipeline handler itself can be found in patch 8/8. Patch 1/8 adds a V4L2 API extension required for pipeline auto-configuration, which has been posted as an RFC but not merged in the mainline kernel yet. Patches 2/8 to 7/8 than add a new utility function and small extensions to the V4L2-related classes. Patch 8/8 adds the new simple pipeline handler. The code has been tested on an i.MX7 platform with a greyscale sensor. I've kept sun6i-csi from Martijn's work in the list of supported drivers, but supporting that platform will require extending the corresponding driver to support the VIDIOC_ENUM_FMT extension. Once done, if all goes well, the platform should work out of the box. Benjamin, Mickael, this is meant to be compatible with the stm32 and qcom-camss that you have previously submitted pipeline handlers for. You will need to add the respective drivers to the drivers array in SimplePipelineHandler::match(), and, as for sun6i-csi, you will need to implement support for the VIDIOC_ENUM_FMT extension, which should be fairly easy. Laurent Pinchart (7): [DNI] include: linux: Extend VIDIOC_ENUM_FMT to support MC-centric devices libcamera: utils: Add string join function libcamera: v4l2_subdevice: Extend [gs]etFormat() to specify format type libcamera: v4l2_videodevice: Support filtering formats by media bus code libcamera: v4l2_videodevice: Expose the device capabilities libcamera: v4l2_videodevice: Downgrade 4CC conversion errors to warnings libcamera: v4l2_videodevice: Map V4L2_PIX_FMT_GREY to DRM FourCC Martijn Braam (1): libcamera: pipeline: Add a simple pipeline handler include/linux/videodev2.h | 4 +- src/libcamera/include/utils.h | 44 ++ src/libcamera/include/v4l2_subdevice.h | 11 +- src/libcamera/include/v4l2_videodevice.h | 6 +- src/libcamera/pipeline/meson.build | 1 + src/libcamera/pipeline/simple/meson.build | 3 + src/libcamera/pipeline/simple/simple.cpp | 693 ++++++++++++++++++++++ src/libcamera/utils.cpp | 16 + src/libcamera/v4l2_subdevice.cpp | 23 +- src/libcamera/v4l2_videodevice.cpp | 36 +- test/utils.cpp | 7 +- 11 files changed, 828 insertions(+), 16 deletions(-) create mode 100644 src/libcamera/pipeline/simple/meson.build create mode 100644 src/libcamera/pipeline/simple/simple.cpp