Received: by 10.223.185.111 with SMTP id b44csp123782wrg; Fri, 9 Mar 2018 02:12:13 -0800 (PST) X-Google-Smtp-Source: AG47ELufLM55YvCHGA3yFiE3MW16ZKbbHlqPMT595H1RZdWbLZDicq4hZaW1Rg8KKujF0UsTetxj X-Received: by 10.99.155.1 with SMTP id r1mr24355934pgd.422.1520590333870; Fri, 09 Mar 2018 02:12:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520590333; cv=none; d=google.com; s=arc-20160816; b=ycoX2Wj88HAmzpcbMCEu/ugcxBnJDPmX7kN5qSdq1dk34JC49cwTrp3Zd3eh4AIB6M 4itpx6M8yPlmcGxl7FMJO6jHXjMVed5ZeQ3HVx5DvAXhVOtB0WCEairXRAK6nkoa2KpJ bFpSnxnXz4RRaXyl1vxv320nYJ7e5iG06Qk6A1IWBb7FzGO0uzOjwl0iBdA82Q705DCx H27v1BHK4RZ8s505hWjKe5EXKSVavMhgCmCFGwyJx0w7xkbri2KOoHCf31n9j1pQeGXW gHcHkc9PX0cjZUZRRmQIdi1T+QDtlvarjj5xUKe1hCutvUzyduS5SdmV8zo7GpBf9N+W X/PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=JILWJXMi62F16DA7oUbRYvFwL9EEOPFPGejV+/SIsj4=; b=kIccxQEWz6wbyZ3/CNoCibgXqjwlQiJOB/INM8mGQ52/A8RYSaEgUIyIZMsmnKSkS4 XLcSIDz7/SmacyzmRgRanT1StmtVtHf6ANts+pPc6WPTOsjHAiAd/MJETb0E2oF8JRiz MQPOVjNg5pA7u91BRuHXNM2A568F8M7aSL7ck538ODnGYKvqGk6JPQCL58fH0CLub1do 7m5VgrM2czgpFukt0diRMRPB1HBZggS1qW1yrqR1S4t/g7utwGYlOIjLzh7CG0sjnxox DwHEQxbBFqoefw9ljAgz2RiXcBsHDjiNo9yWe0JfW4+8Q7e4U/c1ny3JCOG35wNeZDDd Jw3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 88-v6si640041ple.298.2018.03.09.02.11.59; Fri, 09 Mar 2018 02:12:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751182AbeCIKKq (ORCPT + 99 others); Fri, 9 Mar 2018 05:10:46 -0500 Received: from mail.bootlin.com ([62.4.15.54]:49646 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750920AbeCIKKl (ORCPT ); Fri, 9 Mar 2018 05:10:41 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 47CD720721; Fri, 9 Mar 2018 11:10:38 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id A0DE320379; Fri, 9 Mar 2018 11:10:37 +0100 (CET) From: Paul Kocialkowski To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Cc: Icenowy Zheng , Florent Revest , Alexandre Courbot , Hans Verkuil , Laurent Pinchart , Sakari Ailus , Maxime Ripard , Thomas van Kleef , "Signed-off-by : Bob Ham" , Thomas Petazzoni , Chen-Yu Tsai , Paul Kocialkowski Subject: [PATCH 0/9] Sunxi-Cedrus driver for the Allwinner Video Engine, using the V4L2 request API Date: Fri, 9 Mar 2018 11:09:24 +0100 Message-Id: <20180309100933.15922-1-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.16.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This presents a newer version of the Sunxi-Cedrus driver, that supports the Video Engine found in most Allwinner SoCs, starting with the A10. The first version of this driver[0] was originally written and submitted by Florent Revest using a previous version of the request API, that is necessary to provide coherency between controls and the buffers they apply to. The driver was since adapted to use the latest version of the request API[1], as submitted by Alexandre Courbot. It is a hard requirement for this driver. This series also contains fixes for issues encountered with the current version of the request API. If accepted, these should eventually be squashed into the request API series. The driver itself currently only supports MPEG2 and more codecs will be added to the driver eventually. The output frames provided by the Video Engine are in a multi-planar 32x32-tiled YUV format, with a plane for luminance (Y) and a plane for chrominance (UV). A specific format is introduced in the V4L2 API to describe it. This implementation is based on the significant work that was conducted by various members of the linux-sunxi community for understanding and documenting the Video Engine's innards. [0]: https://lkml.org/lkml/2016/8/25/246 [1]: https://lkml.org/lkml/2018/2/19/872 Florent Revest (5): v4l: Add sunxi Video Engine pixel format v4l: Add MPEG2 low-level decoder API control media: platform: Add Sunxi Cedrus decoder driver sunxi-cedrus: Add device tree binding document ARM: dts: sun5i: Use video-engine node Icenowy Zheng (1): ARM: dts: sun8i: add video engine support for A33 Paul Kocialkowski (2): media: vim2m: Try to schedule a m2m device run on request submission media: videobuf2-v4l2: Copy planes when needed in request qbuf Thomas van Kleef (1): ARM: dts: sun7i: Add video engine support for the A20 .../devicetree/bindings/media/sunxi-cedrus.txt | 44 ++ arch/arm/boot/dts/sun5i-a13.dtsi | 30 ++ arch/arm/boot/dts/sun7i-a20.dtsi | 47 ++ arch/arm/boot/dts/sun8i-a33.dtsi | 39 ++ drivers/media/common/videobuf2/videobuf2-v4l2.c | 19 + drivers/media/platform/Kconfig | 14 + drivers/media/platform/Makefile | 1 + drivers/media/platform/sunxi-cedrus/Makefile | 4 + drivers/media/platform/sunxi-cedrus/sunxi_cedrus.c | 313 ++++++++++++ .../platform/sunxi-cedrus/sunxi_cedrus_common.h | 106 ++++ .../media/platform/sunxi-cedrus/sunxi_cedrus_dec.c | 568 +++++++++++++++++++++ .../media/platform/sunxi-cedrus/sunxi_cedrus_dec.h | 33 ++ .../media/platform/sunxi-cedrus/sunxi_cedrus_hw.c | 185 +++++++ .../media/platform/sunxi-cedrus/sunxi_cedrus_hw.h | 36 ++ .../platform/sunxi-cedrus/sunxi_cedrus_mpeg2.c | 152 ++++++ .../platform/sunxi-cedrus/sunxi_cedrus_regs.h | 170 ++++++ drivers/media/platform/vim2m.c | 13 +- drivers/media/v4l2-core/v4l2-ctrls.c | 15 + drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/v4l2-controls.h | 26 + include/uapi/linux/videodev2.h | 6 + 21 files changed, 1821 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/media/sunxi-cedrus.txt create mode 100644 drivers/media/platform/sunxi-cedrus/Makefile create mode 100644 drivers/media/platform/sunxi-cedrus/sunxi_cedrus.c create mode 100644 drivers/media/platform/sunxi-cedrus/sunxi_cedrus_common.h create mode 100644 drivers/media/platform/sunxi-cedrus/sunxi_cedrus_dec.c create mode 100644 drivers/media/platform/sunxi-cedrus/sunxi_cedrus_dec.h create mode 100644 drivers/media/platform/sunxi-cedrus/sunxi_cedrus_hw.c create mode 100644 drivers/media/platform/sunxi-cedrus/sunxi_cedrus_hw.h create mode 100644 drivers/media/platform/sunxi-cedrus/sunxi_cedrus_mpeg2.c create mode 100644 drivers/media/platform/sunxi-cedrus/sunxi_cedrus_regs.h -- 2.16.2