Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753639AbdGCJOq (ORCPT ); Mon, 3 Jul 2017 05:14:46 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.219]:9570 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753198AbdGCJOm (ORCPT ); Mon, 3 Jul 2017 05:14:42 -0400 X-RZG-AUTH: :JGIXVUS7cutRB/49FwqZ7WcecEarQROEYabkiUo6mSAGQ+qKID0oI1Bw5w== X-RZG-CLASS-ID: mo00 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: [PATCH v1 0/6] Add support of OV9655 camera From: "H. Nikolaus Schaller" In-Reply-To: Date: Mon, 3 Jul 2017 11:14:19 +0200 Cc: Pavel Machek , Discussions about the Letux Kernel , LKML Message-Id: References: <1498143942-12682-1-git-send-email-hugues.fruchet@st.com> <385A82AC-CC23-41BD-9F57-0232F713FED9@goldelico.com> <1E453955-0C1A-414B-BBB2-C64B6D0EF378@goldelico.com> <20170625091856.GA22791@amd> <20170626083927.GB9621@amd> <658307f3-7abe-5738-7a8a-2eff6e0902a1@st.com> <95B10899-9966-4844-9667-D2434968A492@goldelico.com> <85e62c47-e319-c801-376c-95f4d9cbf75a@st.com> <77bd3b8fe52643d68ecc821ec22bc0e6@SFHDAG5NODE1.st.com> <14B52F58-AE2B-46F7-851A-F31D4485C230@goldelico.com> To: Hugues FRUCHET , Laurent Pinchart , Sakari Ailus X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v639Eu0o030307 Content-Length: 13818 Lines: 204 Hi Hugues, > Am 03.07.2017 um 10:16 schrieb Hugues FRUCHET : > > Hi Nikolaus, > Could you enable V4L2 UAPI traces ? Something like: > echo 0xFF > /sys/devices/platform/soc/. name>/video4linux/video2/dev_debug > > you will see then in kernel dmesg the V4L2 calls and their > parameters/return values. Nice. > root@letux:~# echo 255 >/sys/devices/platform/68000000.ocp/480bc000.isp/video4linux/video2/dev_debug > root@letux:~# ./camera-demo sxga > Camera: /dev/v4l-subdev8 > Setting mode sxga > media-ctl -r > media-ctl -l '"ov965x":0 -> "OMAP3 ISP CCDC":0[1]' > media-ctl -l '"OMAP3 ISP CCDC":1 -> "OMAP3 ISP CCDC output":0[1]' > media-ctl -V '"ov965x":0 [UYVY2X8 1280x1024]' > media-ctl -V '"OMAP3 ISP CCDC":0 [UYVY2X8 1280x1024]' > media-ctl -V '"OMAP3 ISP CCDC":1 [UYVY 1280x1024]' > ### starting mplayer in sxga mode ### > mplayer tv:// -vf rotate=2 -tv driver=v4l2:device=/dev/video2:outfmt=uyvy:width=1280:height=1024:fps=15 -vo x11 > MPlayer2 2.0-728-g2c378c7-4+b1 (C) 2000-2012 MPlayer Team > > Playing tv://. > Detected file format: TV > Selected driver: v4l2 > name: Video 4 Linux 2 input > author: Martin Olschewski > comment: first try, more to come ;-) > [ 425.216094] video2: open (0) > [ 425.219329] video2: VIDIOC_QUERYCAP: driver=ispvideo, card=OMAP3 ISP CCDC output, bus=media, version=0x00040c00, capabilities=0x84200003, device_caps=0x04200001 > [ 425.236389] video2: VIDIOC_G_FMT: type=vid-cap, width=0, height=0, pixelformat=, field=any, bytesperline=0, sizeimage=0, colorspace=0, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0 > [ 425.254699] video2: VIDIOC_G_STD: error -25: std=0x00000000 > [ 425.260620] video2: VIDIOC_G_PARM: error -22: type=vid-cap, capability=0x0, capturemode=0x0, timeperframe=0/0, extendedmode=0, readbuffers=0 > v4l2: ioctl get standard failed: Invalid argumen[ 425.275573] video2: VIDIOC_ENUMSTD: error -25: index=0, id=0x0, name=, fps=0/0, framelines=0 > t > Selected device: OMAP3 ISP CCDC output > Capa[ 425.289398] video2: VIDIOC_ENUMINPUT: index=0, name=camera, type=2, audioset=0x0, tuner=0, std=0x00000000, status=0x0, capabilities=0x0 > bilities: video capture video output streamin[ 425.306396] video2: VIDIOC_ENUMINPUT: error -22: index=1, name=, type=0, audioset=0x0, tuner=0, std=0x00000000, status=0x0, capabilities=0x0 > g > supported norms: > inputs: 0 = camera;[ 425.323822] video2: VIDIOC_G_INPUT: value=0 > > Current input: 0 > [ 425.332580] video2: VIDIOC_ENUM_FMT: error -25: index=0, type=vid-cap, flags=0x0, pixelformat=, description='' > Current format: unknown (0x0) > [ 425.345428] video2: VIDIOC_G_FMT: type=vid-cap, width=0, height=0, pixelformat=, field=any, bytesperline=0, sizeimage=0, colorspace=0, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0 > [ 425.367858] video2: VIDIOC_S_FMT: type=vid-cap, width=640, height=480, pixelformat=, field=none, bytesperline=0, sizeimage=0, colorspace=0, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0 > [ 425.386627] video2: VIDIOC_G_FMT: type=vid-cap, width=640, height=480, pixelformat=, field=none, bytesperline=0, sizeimage=0, colorspace=0, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0 > [ 425.405334] video2: VIDIOC_S_FMT: type=vid-cap, width=640, height=480, pixelformat=UYVY, field=none, bytesperline=1280, sizeimage=614400, colorspace=0, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0 > [ 425.425720] video2: VIDIOC_ENUMINPUT: index=0, name=camera, type=2, audioset=0x0, tuner=0, std=0x00000000, status=0x0, capabilities=0x0 > [ 425.439727] video2: VIDIOC_S_INPUT: value=0 > [ 425.445159] video2: VIDIOC_ENUMSTD: error -25: index=0, id=0x0, name=, fps=0/0, framelines=0 > tv.c: norm_from_string(pal): Bogus norm paramete[ 425.455871] video2: VIDIOC_ENUMSTD: error -25: index=0, id=0x0, name=, fps=0/0, framelines=0 > r, setting default. > v4l2: ioctl enum norm failed: In[ 425.470397] video2: VIDIOC_G_FMT: type=vid-cap, width=640, height=480, pixelformat=UYVY, field=none, bytesperline=1280, sizeimage=614400, colorspace=0, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0 > appropriate ioctl for device > Error: Cannot set [ 425.493743] video2: VIDIOC_S_FMT: type=vid-cap, width=1280, height=1024, pixelformat=UYVY, field=none, bytesperline=2560, sizeimage=2621440, colorspace=0, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0 > norm! > [ 425.517669] video2: VIDIOC_G_FMT: type=vid-cap, width=1280, height=1024, pixelformat=UYVY, field=none, bytesperline=2560, sizeimage=2621440, colorspace=0, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0 > [ 425.538238] video2: VIDIOC_S_FMT: type=vid-cap, width=1280, height=1024, pixelformat=UYVY, field=none, bytesperline=2560, sizeimage=2621440, colorspace=0, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0 > [ 425.558990] video2: VIDIOC_G_FMT: type=vid-cap, width=1280, height=1024, pixelformat=UYVY, field=none, bytesperline=2560, sizeimage=2621440, colorspace=0, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0 > [ 425.579498] video2: VIDIOC_S_FMT: type=vid-cap, width=1280, height=1024, pixelformat=UYVY, field=none, bytesperline=2560, sizeimage=2621440, colorspace=0, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0 > Selected input hasn't got a tuner! > [ 425.600646] video2: VIDIOC_G_FMT: type=vid-cap, width=1280, height=1024, pixelformat=UYVY, field=none, bytesperline=2560, sizeimage=2621440, colorspace=0, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0 > [ 425.623840] video2: VIDIOC_G_FMT: type=vid-cap, width=1280, height=1024, pixelformat=UYVY, field=none, bytesperline=2560, sizeimage=2621440, colorspace=0, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0 > [ 425.644317] video2: VIDIOC_G_FMT: type=vid-cap, width=1280, height=1024, pixelformat=UYVY, field=none, bytesperline=2560, sizeimage=2621440, colorspace=0, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0 > [ 425.676971] video2: VIDIOC_REQBUFS: count=2, type=vid-cap, memory=mmap > [ 425.684082] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=0, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x0, length=2621440 > [ 425.702117] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000 > [ 425.713073] video2: mmap (0) > [ 425.716400] video2: VIDIOC_QBUF: 00:00:00.00000000 index=0, type=vid-cap, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=2621440, offset/userptr=0x0, length=2621440 > [ 425.734436] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000 > [ 425.743499] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=1, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x280000, length=2621440 > [ 425.761688] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000 > [ 425.772186] video2: mmap (0) > [ 425.775299] video2: VIDIOC_QBUF: 00:00:00.00000000 index=1, type=vid-cap, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=2621440, offset/userptr=0x280000, length=2621440 > [ 425.793670] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000 > [ 425.802703] video2: VIDIOC_S_CTRL: error -25: id=0x980909, value=0 > v4l2: ioctl set mute failed: Inappropriate ioctl[ 425.809661] video2: VIDIOC_QUERYCTRL: error -25: id=0x980900, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000 > for device > v4l2: ioctl query control failed: Inappropriate [ 425.826965] video2: VIDIOC_QUERYCTRL: error -25: id=0x980903, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000 > ioctl for device > v4l2: ioctl query control failed[ 425.844055] video2: VIDIOC_QUERYCTRL: error -25: id=0x980902, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000 > : Inappropriate ioctl for device > v4l2: ioctl quer[ 425.860198] video2: VIDIOC_QUERYCTRL: error -25: id=0x980901, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000 > y control failed: Inappropriate ioctl for device > v4l2: ioctl query control failed: Inappropriate ioctl for device > [ 425.930206] configuring for 1280(2560)x1024 > [ 425.943481] omap3isp 480bc000.isp: -------------CCDC Register dump------------- > [ 425.951171] omap3isp 480bc000.isp: ###CCDC PCR=0x00000000 > [ 425.958007] omap3isp 480bc000.isp: ###CCDC SYN_MODE=0x00071704 > [ 425.964996] omap3isp 480bc000.isp: ###CCDC HD_VD_WID=0x00000000 > [ 425.972656] omap3isp 480bc000.isp: ###CCDC PIX_LINES=0x00000000 > [ 425.978881] omap3isp 480bc000.isp: ###CCDC HORZ_INFO=0x000004ff > [ 425.986114] omap3isp 480bc000.isp: ###CCDC VERT_START=0x00000000 > [ 425.993255] omap3isp 480bc000.isp: ###CCDC VERT_LINES=0x000003ff > [ 425.999694] omap3isp 480bc000.isp: ###CCDC CULLING=0xffff00ff > [ 426.006530] omap3isp 480bc000.isp: ###CCDC HSIZE_OFF=0x00000a00 > [ 426.013580] omap3isp 480bc000.isp: ###CCDC SDOFST=0x00000000 > [ 426.019531] omap3isp 480bc000.isp: ###CCDC SDR_ADDR=0x40000000 > [ 426.026550] omap3isp 480bc000.isp: ###CCDC CLAMP=0x00000010 > [ 426.033142] omap3isp 480bc000.isp: ###CCDC DCSUB=0x00000000 > [ 426.039123] omap3isp 480bc000.isp: ###CCDC COLPTN=0xbb11bb11 > [ 426.046020] omap3isp 480bc000.isp: ###CCDC BLKCMP=0x00000000 > [ 426.052795] omap3isp 480bc000.isp: ###CCDC FPC=0x00000000 > [ 426.058532] omap3isp 480bc000.isp: ###CCDC FPC_ADDR=0x00000000 > [ 426.065551] omap3isp 480bc000.isp: ###CCDC VDINT=0x03fe02aa > [ 426.072143] omap3isp 480bc000.isp: ###CCDC ALAW=0x00000006 > [ 426.078033] omap3isp 480bc000.isp: ###CCDC REC656IF=0x00000000 > [ 426.084960] omap3isp 480bc000.isp: ###CCDC CFG=0x00008800 > [ 426.090759] omap3isp 480bc000.isp: ###CCDC FMTCFG=0x00000000 > [ 426.097869] omap3isp 480bc000.isp: ###CCDC FMT_HORZ=0x00000000 > [ 426.104949] omap3isp 480bc000.isp: ###CCDC FMT_VERT=0x00000000 > [ 426.111053] omap3isp 480bc000.isp: ###CCDC PRGEVEN0=0x00000000 > [ 426.118103] omap3isp 480bc000.isp: ###CCDC PRGEVEN1=0x00000000 > [ 426.124999] omap3isp 480bc000.isp: ###CCDC PRGODD0=0x00000000 > [ 426.131164] omap3isp 480bc000.isp: ###CCDC PRGODD1=0x00000000 > [ 426.138000] omap3isp 480bc000.isp: ###CCDC VP_OUT=0x00000000 > [ 426.144744] omap3isp 480bc000.isp: ###CCDC LSC_CONFIG=0x00006600 > [ 426.151062] omap3isp 480bc000.isp: ###CCDC LSC_INITIAL=0x00000000 > [ 426.158325] omap3isp 480bc000.isp: ###CCDC LSC_TABLE_BASE=0x00000000 > [ 426.165740] omap3isp 480bc000.isp: ###CCDC LSC_TABLE_OFFSET=0x00000000 > [ 426.173400] omap3isp 480bc000.isp: -------------------------------------------- > [ 426.188140] video2: VIDIOC_STREAMON: type=vid-cap > [ 426.194244] video2: poll: 00000000 > [ass] auto-open > Opening video filter: [rotate=2] > VIDEO: 1280x1024 15.000 fps 0.0 kbps ( 0.0 kB/s) > Could not find matching colorspace - retrying with -vf scale... > Opening video filter: [scale] > [swscaler @ 0xb5d45980]using unscaled uyvy422 -> yuv420p special converter > VO: [x11] 1024x1280 => 1024x1280 Planar YV12 > [swscaler @ 0xb5d45980]No accelerated colorspace conversion found from yuv420p to bgra. > Colorspace details not fully supported by selected vo. > Selected video codec: RAW UYVY [raw] > Audio: no sound > Starting playback... > [ 427.194793] video2: poll: 00000000 > v4l2: select timeout > [ 427.203033] video2: poll: 00000000 > [ 428.204498] video2: poll: 00000000 > > v4l2: select timeout > [ 428.215667] video2: poll: 00000000 > [ 429.217102] video2: poll: 00000000 > > v4l2: select timeout > [ 429.233978] video2: poll: 00000000 > [ 430.235656] video2: poll: 00000000 > > v4l2: select timeout > [ 430.240661] video2: poll: 00000000 > [ 431.242889] video2: poll: 00000000 > > v4l2: select timeout > [ 431.249114] video2: poll: 00000000 > V: 0.0 6/ 6 ??% ??% ??,?% 0 0 > > > MPlayer interrupted by signal 2 in module: filter_video > [ 432.251220] video2: poll: 00000000 > v4l2: select timeout > [ 432.256713] video2: poll: 00000000 > [ 433.258941] video2: poll: 00000000 > > v4l2: select timeout > [ 433.266632] omap3isp 480bc000.isp: OMAP3 ISP AEWB: user wants to disable module. > [ 433.280090] omap3isp 480bc000.isp: OMAP3 ISP AEWB: module is being disabled > [ 433.290130] omap3isp 480bc000.isp: OMAP3 ISP AF: user wants to disable module. > [ 433.300140] omap3isp 480bc000.isp: OMAP3 ISP AF: module is being disabled > [ 433.309631] omap3isp 480bc000.isp: OMAP3 ISP histogram: user wants to disable module. > [ 433.319885] omap3isp 480bc000.isp: OMAP3 ISP histogram: module is being disabled > [ 435.373168] omap3isp 480bc000.isp: CCDC stop timeout! > [ 435.380371] omap3isp 480bc000.isp: Unable to stop OMAP3 ISP CCDC > [ 435.391754] video2: VIDIOC_STREAMOFF: type=vid-cap > [ 435.397583] video2: VIDIOC_DQBUF: error -22: 00:00:00.00000000 index=0, type=vid-cap, flags=0x00000000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x0, length=0 > [ 435.417175] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000 > [ 435.431549] video2: VIDIOC_S_CTRL: error -25: id=0x980909, value=1 > v4l2: ioctl set mute failed: Inappropriate ioctl for device > [ 435.495422] video2: release > v4l2: 0 frames successfully processed, 1 frames dropped. > > Exiting... (Quit) > root@letux:~# Seem as if it tells me not much more than setting "pal" norm does fail and there is no "MUTE". VIDIOC_STREAMON is successful and the poll times out. Anyways, this indicates that the problem is probably not in the v4l2 layer but below, i.e. omap3isp+camera. Maybe as simple as the ISP ignoring the SYNC inputs and then of course failing to capture frames within given time. I have checked our pinmux setup but didn't find anything suspicious. So is it somehow possible to check if the omap3isp is running and receiving sync inpulses? BR and thanks, Nikolaus