From patchwork Fri Jun 2 00:25:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Harvey X-Patchwork-Id: 9761381 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6733560363 for ; Fri, 2 Jun 2017 00:26:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BD16284DC for ; Fri, 2 Jun 2017 00:26:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F53A2854A; Fri, 2 Jun 2017 00:26:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 748A9284DC for ; Fri, 2 Jun 2017 00:26:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: References:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WctmD5KW3JL+M3ZjIhfem+VQ7yRWB4iwxE+ZGixP8NM=; b=nL4PKcg+RwFZIn ONJadXk1xTlWcG+AjRvuvFcSK2FSPzuca8tPpWzySwafzVx7mn0kbWjZJDn7RU5YU0qu3cYpm9tFV inhVrGzvLwuLypcymqHrSBlTAvG1+i9ikOhXClFXgd/1DCCIj8MR/8y4rhUVP+ElTcioX0JoFJjwj YYUQwgQxzVfnvNW99knESKdzIeKp886h/MWrfOIqw+D75W783UabIPJVsYcvjN15T7zZXApkd46SW fpr3i3f+aptjWUusvCb/wCC2c/ecK6vu4uMip2SQNx9KiHTlR/fBOjYOMQzt9qcapD3VDrx93KSuh gikqsYSuqrnmb8gXBN6A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dGaQ5-0001ub-8s; Fri, 02 Jun 2017 00:26:25 +0000 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dGaQ1-0001t1-4x for linux-arm-kernel@lists.infradead.org; Fri, 02 Jun 2017 00:26:23 +0000 Received: by mail-wm0-x233.google.com with SMTP id b84so7502981wmh.0 for ; Thu, 01 Jun 2017 17:26:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=aZZ/30s/E7i1pxWDSQAQLazETjjhP0F8x2r1VXR5cPM=; b=B3n0B95bTEI1pnSPHsoYWUkIkmCN8TxGvBAVn0o4vXc/KaMMQro6zkegv8J1yjoURy sjzY+WHPIfxCg2x/DWYNC1OPqUilvR3YHhK8ntsKWvq0mmQpsZ4PsMxebWbEVxPKIS4z m1J5Q61OXCVuOpwQd0rxuPboJqAjDDKe8yG2LZ0T9NETYar8jgDRBrt2vWflNyfC8Vy1 xQhkp8S64zsLnEXcXDkk04zpGFWDessMGAdxI5GR6i4j2+GxorLC/vhSXHHgZMNPRC6K OopSPtLcIlS62aIGFAo3nigfYcqhXZGGEiU+y96nHxKd/QsPjFS72VciaIZeNOiCDKlE Fgxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=aZZ/30s/E7i1pxWDSQAQLazETjjhP0F8x2r1VXR5cPM=; b=dEHpfHP2IYpj4P8IK5abc0O49bnzgwdAD+i2JdR9wglBsRk6sAOD3Raxs/HydtWFTd VueRi7fPA06H0hZEDlo3M0LBZiqi5tysEGgYNzzqWUqnuhEaMmX2f9ZfY6mUWSk3QhGO /ltPPOXjVCgDVnxZUxu8AWooOupgSfRq++EQo3FmKfNdnxQ0PNDkMPcXI4aE+PhKasnM JpENITTzFZBJkwQB1eF+XYcXJqvtucrPcU1+JspGHvDMsU4IfT4Eohh5JRYgcH9fEbxc CVLAa/ky4eO1YH9w0TTUD4SN7Vyo3mP6Wl9Bnrl03rEEfyodU+uXzO9rPdcjMJftcZcE ypkQ== X-Gm-Message-State: AODbwcC8wY/aH8R25l9mm72nyOKfmp9xtEa3o0rTgs6XyHaUDKCaJQZc jYf1kZs8TR8tMaCRImrQnWLR1o+nalAy X-Received: by 10.28.169.198 with SMTP id s189mr940928wme.91.1496363158578; Thu, 01 Jun 2017 17:25:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.142.206 with HTTP; Thu, 1 Jun 2017 17:25:57 -0700 (PDT) In-Reply-To: <1495672189-29164-1-git-send-email-steve_longerbeam@mentor.com> References: <1495672189-29164-1-git-send-email-steve_longerbeam@mentor.com> From: Tim Harvey Date: Thu, 1 Jun 2017 17:25:57 -0700 Message-ID: Subject: Re: [PATCH v7 00/34] i.MX Media Driver To: Steve Longerbeam X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170601_172621_493695_851D1886 X-CRM114-Status: GOOD ( 28.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , andrew-ct.chen@mediatek.com, minghsiu.tsai@mediatek.com, sakari.ailus@linux.intel.com, Nick Dyer , songjun.wu@microchip.com, Hans Verkuil , Steve Longerbeam , pavel@ucw.cz, robert.jarzmik@free.fr, devel@driverdev.osuosl.org, markus.heiser@darmarit.de, laurent.pinchart+renesas@ideasonboard.com, shuah@kernel.org, Russell King - ARM Linux , geert@linux-m68k.org, linux-media , "devicetree@vger.kernel.org" , Sascha Hauer , Arnd Bergmann , mchehab@kernel.org, bparrot@ti.com, Rob Herring , Simon Horman , Tiffany Lin , "linux-arm-kernel@lists.infradead.org" , =?UTF-8?Q?Niklas_S=C3=B6derlund?= , Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , Jean-Christophe TROTIN , Philipp Zabel , Fabio Estevam , Shawn Guo , Sudip Mukherjee Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, May 24, 2017 at 5:29 PM, Steve Longerbeam wrote: > In version 7: > > - video-mux: switched to Philipp's latest video-mux driver and updated > bindings docs, that makes use of the mmio-mux framework. > > - mmio-mux: includes Philipp's temporary patch that adds mmio-mux support > to video-mux driver, until mux framework is merged. > > - mmio-mux: updates to device tree from Philipp that define the i.MX6 mux > devices and modifies the video-mux device to become a consumer of the > video mmio-mux. > > - minor updates to Documentation/media/v4l-drivers/imx.rst. > > - ov5640: do nothing if entity stream count is greater than 1 in > ov5640_s_stream(). > > - Previous versions of this driver had not tested the ability to enable > multiple independent streams, for instance enabling multiple output > pads from the imx6-mipi-csi2 subdevice, or enabling both prpenc and > prpvf outputs. Marek Vasut tested this support and reported issues > with it. > > v4l2_pipeline_inherit_controls() used the media graph walk APIs, but > that walks both sink and source pads, so if there are multiple paths > enabled to video capture devices, controls would be added to the wrong > video capture device, and no controls added to the other enabled > capture devices. > > These issues have been fixed. Control inheritance works correctly now > even with multiple enabled capture paths, and (for example) > simultaneous capture from prpenc and prpvf works also, and each with > independent scaling, CSC, and controls. For example prpenc can be > capturing with a 90 degree rotation, while prpvf is capturing with > vertical flip. > > So the v4l2_pipeline_inherit_controls() patch has been dropped. The > new version of control inheritance could be made generically available, > but it would be more involved to incorporate it into v4l2-core. > > - A new function imx_media_fill_default_mbus_fields() is added to setup > colorimetry at sink pads, and these are propagated to source pads. > > - Ensure that the current sink and source rectangles meet alignment > restrictions before applying a new rotation control setting in > prp-enc/vf subdevices. > > - Chain the s_stream() subdev calls instead of implementing a custom > stream on/off function that attempts to call a fixed set of subdevices > in a pipeline in the correct order. This also simplifies imx6-mipi-csi2 > subdevice, since the correct MIPI CSI-2 startup sequence can be > enforced completely in s_stream(), and s_power() is no longer > required. This also paves the way for more arbitrary OF graphs > external to the i.MX6. > > - Converted the v4l2_subdev and media_entity ops structures to const. > Hi Steve, I've applied adv7180 device-tree config for the Gateworks ventana boards on top of your imx-media-staging-md-v15 github branch but am not able to get it to work. Here's my device-tree patch that adds adv7180 to the GW54xx connected to IPU2_CSI1: + }; +}; + Here's my userspace test commands: media-ctl -r # reset all links export outputfmt="UYVY2X8/720x480" # Setup links (ADV7180 IPU2_CSI1) media-ctl -l '"adv7180 2-0020":0 -> "ipu2_csi1_mux":1[1]' media-ctl -l '"ipu2_csi1_mux":2 -> "ipu2_csi1":0[1]' media-ctl -l '"ipu2_csi1":1 -> "ipu2_vdic":0[1]' media-ctl -l '"ipu2_vdic":2 -> "ipu2_ic_prp":0[1]' media-ctl -l '"ipu2_ic_prp":2 -> "ipu2_ic_prpvf":0[1]' media-ctl -l '"ipu2_ic_prpvf":1 -> "ipu2_ic_prpvf capture":0[1]' # Configure pads media-ctl -V "'adv7180 2-0020':0 [fmt:UYVY2X8/720x480]" media-ctl -V "'ipu2_csi1_mux':2 [fmt:UYVY2X8/720x480 field:interlaced]" media-ctl -V "'ipu2_csi1':1 [fmt:UYVY2X8/720x480 field:interlaced]" media-ctl -V "'ipu2_vdic':2 [fmt:UYVY2X8/720x480 field:none]" media-ctl -V "'ipu2_ic_prp':2 [fmt:AYUV32/720x480 field:none]" media-ctl -V "'ipu2_ic_prpvf':1 [fmt:$outputfmt field:none]" ^^^^ no errors up to this point; streaming can now begin on 'ipu2_ic_prpvf capture' # select input v4l2-ctl --device /dev/video3 -i0 # 0=AIN1 1=AIN2 2=AIN3 VIDIOC_S_INPUT: failed: Inappropriate ioctl for device ^^^^ /sys/class/video4linux/v4l-subdev2/name is 'ipu2_ic_prpvf capture' - is this not right? # select any supported YUV or RGB pixelformat on the capture device node v4l2-ctl --device /dev/video3 --set-fmt-video=width=720,height=480,pixelformat=UYVY v4l2-ctl --device /dev/video3 --stream-mmap --stream-to=/x.raw --stream-count=1 # capture single raw-frame [ 904.870444] ipu2_ic_prpvf: EOF timeout VIDIOC_DQBUF: failed: Input/output error [ 905.910702] ipu2_ic_prpvf: wait last EOF timeout ^^^^ not getting any frames The last patchset of yours I had running on this board was your v3 patchset - any ideas? As it looks like things have settled down with this patchset and it sounds like it will get merged for 4.13 I'm going to start working on a driver for the tda1997x HDMI receiver which is also on this board connected to IPU1_CSI0. Thanks, Tim --- a/arch/arm/boot/dts/imx6q-gw54xx.dts +++ b/arch/arm/boot/dts/imx6q-gw54xx.dts @@ -18,6 +18,76 @@ compatible = "gw,imx6q-gw54xx", "gw,ventana", "fsl,imx6q"; }; +&i2c3 { + adv7180: camera@20 { + compatible = "adi,adv7180"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_adv7180>; + reg = <0x20>; + powerdown-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>; + interrupt-parent = <&gpio3>; + interrupts = <30 GPIO_ACTIVE_LOW>; + inputs = <0x00 0x01 0x02>; + input-names = "ADV7180 Composite on Ain1", + "ADV7180 Composite on Ain2", + "ADV7180 Composite on Ain3"; + + port { + adv7180_to_ipu2_csi1_mux: endpoint { + remote-endpoint = <&ipu2_csi1_mux_from_parallel_sensor>; + bus-width = <8>; + }; + }; + }; +}; + +&ipu2_csi1_from_ipu2_csi1_mux { + bus-width = <8>; +}; + +&ipu2_csi1_mux_from_parallel_sensor { + remote-endpoint = <&adv7180_to_ipu2_csi1_mux>; + bus-width = <8>; +}; + +&ipu2_csi1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ipu2_csi1>; + + /* enable frame interval monitor on this port */ + fim { + status = "okay"; + }; +}; + &sata { status = "okay"; }; + +&iomuxc { + video { + pinctrl_adv7180: adv7180grp { + fsl,pins = < + MX6QDL_PAD_EIM_D30__GPIO3_IO30 0x0001b0b0 + MX6QDL_PAD_EIM_D31__GPIO3_IO31 0x4001b0b0 + >; + }; + + pinctrl_ipu2_csi1: ipu2_csi1grp { /* IPU2_CSI1: 8-bit input */ + fsl,pins = < + MX6QDL_PAD_EIM_EB2__IPU2_CSI1_DATA19 0x1b0b0 + MX6QDL_PAD_EIM_D16__IPU2_CSI1_DATA18 0x1b0b0 + MX6QDL_PAD_EIM_D18__IPU2_CSI1_DATA17 0x1b0b0 + MX6QDL_PAD_EIM_D19__IPU2_CSI1_DATA16 0x1b0b0 + MX6QDL_PAD_EIM_D20__IPU2_CSI1_DATA15 0x1b0b0 + MX6QDL_PAD_EIM_D26__IPU2_CSI1_DATA14 0x1b0b0 + MX6QDL_PAD_EIM_D27__IPU2_CSI1_DATA13 0x1b0b0 + MX6QDL_PAD_EIM_A17__IPU2_CSI1_DATA12 0x1b0b0 + MX6QDL_PAD_EIM_D29__IPU2_CSI1_VSYNC 0x1b0b0 + MX6QDL_PAD_EIM_EB3__IPU2_CSI1_HSYNC 0x1b0b0 + MX6QDL_PAD_EIM_A16__IPU2_CSI1_PIXCLK 0x1b0b0 + >; + };