Received: by 10.223.164.202 with SMTP id h10csp6266722wrb; Wed, 22 Nov 2017 01:46:37 -0800 (PST) X-Google-Smtp-Source: AGs4zMZr99HxtO+eY8WuM8k+ZeNSY+sFseSALbIT9PfqdzP+bHcJVw4YIVGOBhItM+1S6sQROylb X-Received: by 10.98.33.203 with SMTP id o72mr18360773pfj.163.1511343997290; Wed, 22 Nov 2017 01:46:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511343997; cv=none; d=google.com; s=arc-20160816; b=Lh+CUA1izImZhvQZo+smsE0DBnRYK54reGqJhjnDWDGoJN8eo56amSC7vDAsz77k8O p5foH0cYuBHV/JmbGuG/r6Cg/pL+mRHNlY+VO1Ll6LzdKujgDwd6aSEczQ/+2rywE13N Gk87lKvvlmNtoHwCezTMmvHFza09Fa0+e379Ta61xGDYQQy9hzvQ9w8uwFf6GIGUbbDJ pKXG4HKtDHphE9R3x2ucl82U1DG1xQ9Hnr6L8OKSIYYUgfGbOdXqVXwHhBF4l7SEVtRy /85PcIzHPQRWybjBzSBxmZoInR9Blok9CPrveg6lW2GfWi66cSo3J718j/eZJBA6lJsj Gv+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=ROZakE7baAIIjMk8EDJS23ZFfSfujNT8umtRpCa6SGU=; b=nJuPTBzyUpQ/Z0W0ashwrrNIvJhNWKG0gohZfUNgiimIBvzyHoSry8giNQzZdb1FKh 0KfkPFxtHo+mxYAnbpmKlS/g717P3z1sK/K13+aQOtExET5DmUASnktzUEGT1tR9pQw+ wXM9tHixGag8rNCDkbZebEH4Blcghev1hJn3ZHS5RzaEQBrPix+r18yHTNXId8QfUmTE P0qZqjTU2xjezGNtvVQHfZk1SnGt9M7lqzZLaKFowXQ3JP0z7/CVuSXfhxP8Cpwz0CSv WK9HmLXbRHdw/oceSgyN6GywR5BaN1/eAlSDxsk+akLI+ZFKERfc+MPFsDcXUpkFmOkE iN2w== 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 q12si13132067pls.475.2017.11.22.01.46.25; Wed, 22 Nov 2017 01:46:37 -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 S1751934AbdKVJpl (ORCPT + 76 others); Wed, 22 Nov 2017 04:45:41 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:39915 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751559AbdKVJpi (ORCPT ); Wed, 22 Nov 2017 04:45:38 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 3903D20995; Wed, 22 Nov 2017 10:45:36 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.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 (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 0C56C2098B; Wed, 22 Nov 2017 10:45:26 +0100 (CET) Date: Wed, 22 Nov 2017 10:45:26 +0100 From: Maxime Ripard To: Yong Cc: Mauro Carvalho Chehab , Rob Herring , Mark Rutland , Chen-Yu Tsai , Greg Kroah-Hartman , "David S. Miller" , Hans Verkuil , Arnd Bergmann , Hugues Fruchet , Yannick Fertre , Philipp Zabel , Benoit Parrot , Benjamin Gaignard , Jean-Christophe Trotin , Ramesh Shanmugasundaram , Minghsiu Tsai , Krzysztof Kozlowski , Robert Jarzmik , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH v2 1/3] media: V3s: Add support for Allwinner CSI. Message-ID: <20171122094526.nqxfy2e5jzxw7nl4@flea.lan> References: <1501131697-1359-1-git-send-email-yong.deng@magewell.com> <1501131697-1359-2-git-send-email-yong.deng@magewell.com> <20171121154827.5a35xa6zlqrrvkxx@flea.lan> <20171122093306.d30fe641f269d62daa1f66b4@magewell.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="u6lfy6vuiynj7llz" Content-Disposition: inline In-Reply-To: <20171122093306.d30fe641f269d62daa1f66b4@magewell.com> User-Agent: NeoMutt/20171027 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --u6lfy6vuiynj7llz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Nov 22, 2017 at 09:33:06AM +0800, Yong wrote: > > On Thu, Jul 27, 2017 at 01:01:35PM +0800, Yong Deng wrote: > > > Allwinner V3s SoC have two CSI module. CSI0 is used for MIPI interface > > > and CSI1 is used for parallel interface. This is not documented in > > > datasheet but by testing and guess. > > >=20 > > > This patch implement a v4l2 framework driver for it. > > >=20 > > > Currently, the driver only support the parallel interface. MIPI-CSI2, > > > ISP's support are not included in this patch. > > >=20 > > > Signed-off-by: Yong Deng > >=20 > > Thanks again for this driver. > >=20 > > It seems like at least this iteration is behaving in a weird way with > > DMA transfers for at least YU12 and NV12 (and I would assume YV12). > >=20 > > Starting a transfer of multiple frames in either of these formats, > > using either ffmpeg (ffmpeg -f v4l2 -video_size 640x480 -framerate 30 > > -i /dev/video0 output.mkv) or yavta (yavta -c80 -p -F --skip 0 -f NV12 > > -s 640x480 $(media-c tl -e 'sun6i-csi')) will end up in a panic. > >=20 > > The panic seems to be generated with random data going into parts of > > the kernel memory, the pattern being in my case something like > > 0x8287868a which is very odd (always around 0x88) > >=20 > > It turns out that when you cover the sensor, the values change to > > around 0x28, so it really seems like it's pixels that have been copied > > there. > >=20 > > I've looked quickly at the DMA setup, and it seems reasonable to > > me. Do you have the same issue on your side? Have you been able to > > test those formats using your hardware? >=20 > I had tested the following formats with BT1120 input: > V4L2_PIX_FMT_NV12 -> NV12 > V4L2_PIX_FMT_NV21 -> NV21 > V4L2_PIX_FMT_NV16 -> NV16 > V4L2_PIX_FMT_NV61 -> NV61 > V4L2_PIX_FMT_YUV420 -> YU12 > V4L2_PIX_FMT_YVU420 -> YV12 > V4L2_PIX_FMT_YUV422P -> 422P > And they all work fine. Ok, that's good to know. > > Given that they all are planar formats and YUYV and the likes work > > just fine, maybe we can leave them aside for now? >=20 > V4L2_PIX_FMT_YUV422P and V4L2_PIX_FMT_YUYV is OK, and V4L2_PIX_FMT_NV12 > is bad? It's really weird. >=20 > What's your input bus code format, type and width? The sensor is an ov5640, so the MBUS code for the bus is MEDIA_BUS_FMT_YUYV8_2X8. Thanks! Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --u6lfy6vuiynj7llz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAloVRzIACgkQ0rTAlCFN r3Qv3A//TfchjwJNbD9sgLMM+WjOEgQykBu9mfhviY5AByF0eVBDsych+AZpO/4S eh6lfhiRSd6En348f4f6dMF2zT6dUT6NIAIWqNtiAidVVfYuY8XJXQY2xJ65SVm/ BiZtYFq8waIFS3ojbI8SAS5xh0OX6CNFXGYbWe6YpuWCgBnftNteh/L8HE/XnzPR Npc8kwBLNvvw+ZKSdz0rm7nnFzd6A9S4++tzFDb1ozolwLoRo9aulGrLJ9SP/3a2 P2ek0AnqdZbUYUHbsnzQVagbEsLQME8omKHe8ekxzprA+Jul05R8f+q0IbqOj3U0 YLe+YT91kGnfc49FEWOFsWJR0CVhNKeRTy0SzOJMHn44sW9NuxQyZ3wSyjRCc0t6 KL+rRsgZ/F+wr9wwSUZRtSoaj/9H2qTpKnCm1ODRQNa7sUv+Hl5KMPGWfPRZgJl4 6AFNhkimS59aMV1Jnoz1GNqfb43MULK3ZEN3bRhBg2ERl82edm81tl+QhBlT+Zrm tRRfkYnZgXpTcreFWNrnHsFw/vmFvxsIAk4963qQVnCk1WMN0HETNYn9yY+p+Br0 g6jyXNSi001iLsvqjknWbRCwTDSUD/fwFerse9ykxg4vnIGPPRfP6uzw+YMhQZ+7 la/fMcK1r4VOvX5EA9DrSRok5H5oQSVFTXRd5g2pJqJbBnB9FfI= =XFrr -----END PGP SIGNATURE----- --u6lfy6vuiynj7llz-- From 1584728113856546555@xxx Wed Nov 22 01:35:00 +0000 2017 X-GM-THRID: 1574046305313556524 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread