Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3785394ima; Tue, 23 Oct 2018 11:12:45 -0700 (PDT) X-Google-Smtp-Source: AJdET5dhX5CpsOp86B5LAgemBtgGb6GttbDl7oYGxErmF5v68yOJXK7ANRDZe5bwNk4wPgmSUtxy X-Received: by 2002:a17:902:7847:: with SMTP id e7-v6mr10416628pln.104.1540318365010; Tue, 23 Oct 2018 11:12:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540318364; cv=none; d=google.com; s=arc-20160816; b=dDiYUmRGAjJPDoKbBZTiRo0OPYakSKdHVXYn77Lqe0ogl8gtF4hgMhQtGg9pT8mT2r hlR1DXP/D+MOcqI/R6xvhAIXcq46tFyzXumJBm1WAp655kjTtHkU7+ApBR1ddNV8OlgB uA1zw7aqDTTKbxTtRYKKxwgHUNUIMFLxZ7WK8r6nusobds4wG3vJFvD+LEwxvkh8G4Ji o/ILNxRp5vRxdTMioX6pSWk2Audk3apJ7wXAkA4QtvZm0GGMeNbNH5NSH/4ito1p9hFp j+DDvDTy4g15kcFrvOPwwBBbmXA4uSSVomkZY1BdJByQSNF+7P0th/NqwRktg8gZX91v gnIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=YPCq+FExOk+tE2ruB7HwXc3pfyS+DJhBmdM2CuYisU0=; b=HJD1ap8pTh+NWVAWbVQbXv1GrBxd8+v+JbNDOVHR4oCRA2CxXUz9axPxJB0ttMNXSB PS/LFJoT7/ml9g2CWnrgKkiEAa4YV6s1+IWJkJw8TnN1B4KS83MhVViyTtD985UroYCA 0eOjJjDSRb9nIiJPdYgw1YQXEj3ppbX5dZb0SQvS6MSwXkSWe4dPFwBVYyY5/emi61Ty QUaIT9kQqb4F2X9J/BMtMjKKluEwzzKRs+uQLvBrZl1DCZvBdwZGo3Y+4jVMxY0geY5C JkPSsuFDtK5HI6hA7Wcfd7pyiTZ2vsJfvReFF6Cu3bUwCcm8JW7jgkWnLqybtukHt8Tk vKPQ== 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 p9-v6si1753466pls.378.2018.10.23.11.12.28; Tue, 23 Oct 2018 11:12:44 -0700 (PDT) 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 S1728587AbeJXCgc (ORCPT + 99 others); Tue, 23 Oct 2018 22:36:32 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:41602 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725997AbeJXCgc (ORCPT ); Tue, 23 Oct 2018 22:36:32 -0400 Received: from svr-orw-mbx-02.mgc.mentorg.com ([147.34.90.202]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1gF19q-0006P7-9i from Steve_Longerbeam@mentor.com ; Tue, 23 Oct 2018 11:11:58 -0700 Received: from [172.30.89.8] (147.34.91.1) by svr-orw-mbx-02.mgc.mentorg.com (147.34.90.202) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Tue, 23 Oct 2018 11:11:55 -0700 Subject: Re: i.MX6 MIPI-CSI2 OV5640 Camera testing on Mainline Linux To: Adam Ford CC: Fabio Estevam , , Jagan Teki , , Fabio Estevam , , , Linux Kernel Mailing List References: <20180920145658.GE16851@w540> <20181017080103.GD11703@w540> <20181022113306.GB2867@w540> From: Steve Longerbeam Message-ID: <68f892ef-92b1-17ec-525c-af50b027c637@mentor.com> Date: Tue, 23 Oct 2018 11:11:54 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-ClientProxiedBy: svr-orw-mbx-08.mgc.mentorg.com (147.34.90.208) To svr-orw-mbx-02.mgc.mentorg.com (147.34.90.202) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/23/18 10:54 AM, Adam Ford wrote: > On Tue, Oct 23, 2018 at 12:39 PM Steve Longerbeam > wrote: >> >> On 10/23/18 10:34 AM, Adam Ford wrote: >>> On Tue, Oct 23, 2018 at 11:36 AM Steve Longerbeam >>> wrote: >>>> Hi Adam, >>>> >>>> On 10/23/18 8:19 AM, Adam Ford wrote: >>>>> On Mon, Oct 22, 2018 at 7:40 AM Fabio Estevam wrote: >>>>>> Hi Adam, >>>>>> >>>>>> On Mon, Oct 22, 2018 at 9:37 AM Adam Ford wrote: >>>>>> >>>>>>> Thank you! This tutorial web site is exactly what I need. The >>>>>>> documentation page in Linux touched on the media-ctl links, but it >>>>>>> didn't explain the syntax or the mapping. This graphical >>>>>>> interpretation really helps it make more sense. >>>>>> Is capturing working well on your i.MX6 board now? >>>>> Fabio, >>>>> >>>>> Unfortunately, no. I built the rootfs based on Jagan's instructions >>>>> at https://openedev.amarulasolutions.com/display/ODWIKI/i.CoreM6+1.5 >>>>> >>>>> I tried building both the 4.15-RC6 kernel, a 4.19 kernel and a 4.14 LTS kernel. >>>>> >>>>> Using the suggested method of generating the graphical display of the >>>>> pipeline options, I am able to enable various pipeline options >>>>> connecting different /dev/videoX options tot he camera. I have tried >>>>> both the suggested method above as well as the instructions found in >>>>> Documentation/media/v4l-drivers/imx.rst for their respective kernels, >>>>> and I have tried multiple options to capture through >>>>> ipu1_csi1_capture, ipu2_csi1_capture, and ip1_ic_prepenc capture, and >>>>> all yield a broken pipe. >>>>> >>>>> libv4l2: error turning on stream: Broken pipe >>>>> ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could >>>>> not read from resource. >>>>> Additional debug info: >>>>> gstv4l2bufferpool.c(1064): gst_v4l2_buffer_pool_poll (): >>>>> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: >>>>> poll error 1: Broken pipe (32) >>>>> >>>>> I can hear the camera click when I start gstreamer and click again >>>>> when it stops trying to stream. >>>>> >>>>> dmesg indicates a broken pipe as well.. >>>>> >>>>> [ 2419.851502] ipu2_csi1: pipeline start failed with -32 >>>>> >>>>> might you have any suggestions? >>>> This -EPIPE error might mean you have a mis-match of resolution, pixel >>>> format, or field type between one of the source->sink pad links. You can >>>> find out which pads have a mis-match by enabling dynamic debug in the >>>> kernel function __media_pipeline_start. >>> Following Jagan's suggestion, I tried to make sure all the resolution >>> and pixel formats were set the same between each source and sink. >>> >>> media-ctl --set-v4l2 "'ov5640 2-0010':0[fmt:UYVY2X8/640x480 >>> field:none]" >>> media-ctl --set-v4l2 "'imx6-mipi-csi2':1[fmt:UYVY2X8/640x480 >>> field:none]" >>> media-ctl --set-v4l2 "'ipu1_csi0_mux':2[fmt:UYVY2X8/640x480 >>> field:none]" >>> media-ctl --set-v4l2 "'ipu1_csi0':2[fmt:AYUV32/640x480 field:none]" >>> >>>> Also make sure you are attempting to stream from the correct /dev/videoN. >>> I have graphically plotted the pipeline using media-ctl --print-dot >>> and I can see the proper video is routed, but your dynamic debug >>> suggestion yielded something: >>> >>> imx-media capture-subsystem: link validation failed for 'ov5640 >>> 2-0010':0 -> 'imx6-mipi-csi2':0, error -32 >> >> It's what I expected, you have a format mismatch between those pads. > Is the mismatch something I am doing wrong with: > > media-ctl --set-v4l2 "'ov5640 2-0010':0[fmt:UYVY2X8/640x480 field:none]" > media-ctl --set-v4l2 "'imx6-mipi-csi2':2[fmt:UYVY2X8/640x480 field:none]" > > or is there something else I need to do? I just used Jagan's suggestion. Yeah, that looks correct, media-ctl _should_ automatically propagate the format at 'ov5640 2-0010':0 to 'imx6-mipi-csi2':0. What version of media-ctl are you using? If you have an older version of media-ctl tool that doesn't propagate formats from source->sink pads, you'll have to explicitly set the format at 'imx6-mipi-csi2':0, and at all the other sink pads in your pipeline. Better yet, upgrade! :) Steve > >>> I am assume this means the interface between the camera and the csi2 >>> isn't working. I am going to double check the power rails and the >>> clocks. i can hear it click when activated and deactivated, so >>> something is happening. >>> >>> adam >>> >>>> Steve >>>>