<div dir="ltr"><div dir="ltr">Hi Helen,</div><div dir="ltr"><br></div><div dir="ltr">Thanks for your great work.<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">This branch worked fine on my Rock pi 4B.</div><div dir="ltr"><br></div><div dir="ltr">Show</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 19, 2020 at 4:46 AM Helen Koike <<a href="mailto:helen.koike@collabora.com">helen.koike@collabora.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
<br>
On 12/12/19 1:15 AM, Show Liu wrote:<br>
> Hi Andrey,<br>
> <br>
> <br>
> On Thu, Dec 12, 2019 at 7:11 AM Andrey Konovalov <<a href="mailto:andrey.konovalov@linaro.org" target="_blank">andrey.konovalov@linaro.org</a> <mailto:<a href="mailto:andrey.konovalov@linaro.org" target="_blank">andrey.konovalov@linaro.org</a>>> wrote:<br>
> <br>
> Hi Joacim,<br>
> <br>
> On 12.12.2019 01:45, Helen Koike wrote:<br>
> > Hi Joacim,<br>
> ><br>
> > On 12/11/19 3:14 PM, Joacim Zetterling wrote:<br>
> >> Hi!<br>
> >><br>
> >> My name is Joacim Zetterling and I'm following Your work of the Rockchip ISP implementation with a big interest (having a project involving a RockPi 4 and the imx219 camera sensor).<br>
> >> And I'm hopping You have some time to answer some questions?<br>
> ><br>
> > Sure<br>
> ><br>
> >><br>
> >> I have an own buildroot system with mainline u-boot and Your kernel branch for the RKISP (v12), modified the buildroot with Your libcamera package and an own implementation of the imx219 driver (based on the mainline version).<br>
> <br>
> Show,<br>
> <br>
> You've got the same hardware configuration (RockPi 4 plus imx219) working for you, right?<br>
> <br>
> Yes, It's work fine for me. And I use Helen's kernel branch as well.<br>
> In my case, I use<br>
> $ cam -l <br>
> To make sure if the camera available or not.<br>
> then<br>
> $ qcam -s width=640,height=480<br>
> to have camera preview on the monitor.<br>
> <br>
> <br>
> Did you use RKISP v12 or v11?<br>
> <br>
> I still in v11. <br>
> <br>
> The imx219 driver was almost the same as <a href="https://patchwork.linuxtv.org/patch/60635/" rel="noreferrer" target="_blank">https://patchwork.linuxtv.org/patch/60635/</a> (the patch submitted upstream has few minor<br>
> changes added).<br>
> <br>
> Thanks,<br>
> Andrey<br>
<br>
I just pushed a branch that works on top of mainline kernel and imx219.<br>
libcamera patches are also upstreamed.<br>
<br>
In case it is useful: <a href="https://gitlab.collabora.com/koike/linux/tree/rockchip/isp/rpicamv2" rel="noreferrer" target="_blank">https://gitlab.collabora.com/koike/linux/tree/rockchip/isp/rpicamv2</a><br>
<br>
Tested with:<br>
cam -c "imx219 4-0010" -C --file="/tmp/libcamframe#.data" -s width=1280,height=960<br>
<br>
Files viewed with:<br>
ffplay -f rawvideo -pixel_format nv12 -video_size 1280x960 /tmp/libcamframe-000048.data<br>
<br>
Images are a bit dark and greenish though, I get the same with Scarlet, but not with ov5647.<br>
I was hoping that 3A would solve this, but it could be a regression (to be verified).<br>
<br>
Regards,<br>
Helen<br>
<br>
> <br>
> >> Every seems OK, ISP, driver, camera etc. but I can not capture any correct images and is hopping You can give me some hints. I'm usually only working with network drivers and switches ;-).<br>
> >><br>
> >> I've posted some logs down below in the mail.<br>
> >><br>
> >> Some questions!<br>
> >> How did You test the ISP+driver? With libcam/cam for the ov5647?<br>
> ><br>
> > I'm streaming with libcamera<br>
> ><br>
> > cam -c "ov5647 4-0036" -C --file="/tmp/libcamframe#.data" -s width=1280,height=960<br>
> ><br>
> > And viewing the files with:<br>
> ><br>
> > ffplay -loglevel warning -v info -f rawvideo -pixel_format nv12 -video_size 1280x960 nfsshare/arm64_rootfs/tmp/libcamframe-000013.data<br>
> ><br>
> > You need to patch libcamera, the branch I was using was this one:<br>
> > <a href="https://gitlab.collabora.com/koike/libcamera.git" rel="noreferrer" target="_blank">https://gitlab.collabora.com/koike/libcamera.git</a><br>
> ><br>
> > I have a more up-to-date version, but for some reason I can't push to my repo (probably some silly local setting error), but it should work with the current one.<br>
> ><br>
> ><br>
> >> Can You use v4l2-ctl or media-ctl to capture images in Your system?<br>
> ><br>
> > Yes<br>
> ><br>
> >> Do You have examples of v4l2-ctl or media-ctl sequences?<br>
> ><br>
> > # Sensor<br>
> > --------<br>
> > v4l2-ctl --set-subdev-fmt pad=0,width=1280,height=960,code=0x3001 -d /dev/v4l-subdev1<br>
> ><br>
> > root@rockpi:~# v4l2-ctl --get-subdev-fmt 0 -d /dev/v4l-subdev1<br>
> > ioctl: VIDIOC_SUBDEV_G_FMT (pad=0)<br>
> > Width/Height : 1280/960<br>
> > Mediabus Code : 0x3001 (MEDIA_BUS_FMT_SBGGR8_1X8)<br>
> > Field : None<br>
> > Colorspace : Default<br>
> > Transfer Function : Default (maps to Rec. 709)<br>
> > YCbCr/HSV Encoding: Default (maps to ITU-R 601)<br>
> > Quantization : Default (maps to Full Range)<br>
> ><br>
> > # ISP<br>
> > --------<br>
> > v4l2-ctl --set-subdev-fmt pad=0,width=1280,height=960,code=0x3001 -d /dev/v4l-subdev0<br>
> > v4l2-ctl --set-subdev-fmt pad=2,width=800,height=600,code=0x2008 -d /dev/v4l-subdev0<br>
> ><br>
> > v4l2-ctl --get-subdev-fmt 0 -d /dev/v4l-subdev0<br>
> > ioctl: VIDIOC_SUBDEV_G_FMT (pad=0)<br>
> > Width/Height : 1280/960<br>
> > Mediabus Code : 0x3001 (MEDIA_BUS_FMT_SBGGR8_1X8)<br>
> > Field : None<br>
> > Colorspace : Default<br>
> > Transfer Function : Default (maps to Rec. 709)<br>
> > YCbCr/HSV Encoding: Default (maps to ITU-R 601)<br>
> > Quantization : Default (maps to Full Range)<br>
> ><br>
> ><br>
> > v4l2-ctl --get-subdev-fmt 2 -d /dev/v4l-subdev0<br>
> > ioctl: VIDIOC_SUBDEV_G_FMT (pad=2)<br>
> > Width/Height : 800/600<br>
> > Mediabus Code : 0x2008 (MEDIA_BUS_FMT_YUYV8_2X8)<br>
> > Field : None<br>
> > Colorspace : Default<br>
> > Transfer Function : Default (maps to Rec. 709)<br>
> > YCbCr/HSV Encoding: Default (maps to ITU-R 601)<br>
> > Quantization : Full Range<br>
> ><br>
> > # Main capture<br>
> > --------------<br>
> ><br>
> > v4l2-ctl -v width=1280,height=960,pixelformat=NV12 -d /dev/video1<br>
> ><br>
> > v4l2-ctl -V -d /dev/video1<br>
> > Format Video Capture Multiplanar:<br>
> > Width/Height : 1280/960<br>
> > Pixel Format : 'NV12' (Y/CbCr 4:2:0)<br>
> > Field : None<br>
> > Number of planes : 1<br>
> > Flags :<br>
> > Colorspace : Default<br>
> > Transfer Function : Default<br>
> > YCbCr/HSV Encoding: Default<br>
> > Quantization : Full Range<br>
> > Plane 0 :<br>
> > Bytes per Line : 1280<br>
> > Size Image : 1843200<br>
> ><br>
> > # Stream<br>
> > ---------<br>
> > v4l2-ctl --stream-mmap --stream-count=10 -d /dev/video1 --stream-to=/tmp/test.raw<br>
> > ffplay -loglevel warning -v info -f rawvideo -pixel_format nv12 -video_size "1280x960" /tmp/test.raw<br>
> ><br>
> ><br>
> > NOTE: there is a bug setting the format on pad 2 in the ISP (fix is wip), but it should work anyway.<br>
> ><br>
> ><br>
> >> What kind of system are You using?<br>
> ><br>
> > I'm using a Debian through nfs<br>
> ><br>
> >><br>
> >> If You need any help of investigate or test, I'm gladly to help You! ;-)<br>
> ><br>
> > Thanks!<br>
> ><br>
> >><br>
> >> Regards!<br>
> >> /Joacim<br>
> >><br>
> >> #########################################################<br>
> >> Log of a running session:<br>
> >> #########################################################<br>
> >><br>
> >> U-Boot 2020.01-rc4 (Dec 11 2019 - 09:19:21 +0100)<br>
> >><br>
> >> Model: Radxa ROCK Pi 4<br>
> >> DRAM: 3.9 GiB<br>
> >> PMIC: RK808<br>
> >> MMC: dwmmc@fe320000: 1, sdhci@fe330000: 0<br>
> >> Loading Environment from MMC... Card did not respond to voltage select!<br>
> >> *** Warning - No block device, using default environment<br>
> >><br>
> >> In: serial@ff1a0000<br>
> >> Out: serial@ff1a0000<br>
> >> Err: serial@ff1a0000<br>
> >> Model: Radxa ROCK Pi 4<br>
> >> rockchip_dnl_key_pressed: adc_channel_single_shot fail!<br>
> >> Net: eth0: ethernet@fe300000<br>
> >> Hit any key to stop autoboot: 0<br>
> >> Card did not respond to voltage select!<br>
> >> switch to partitions #0, OK<br>
> >> mmc1 is current device<br>
> >> Scanning mmc 1:4...<br>
> >> Found /extlinux/extlinux.conf<br>
> >> Retrieving file: /extlinux/extlinux.conf<br>
> >> 290 bytes read in 11 ms (25.4 KiB/s)<br>
> >> 1: kernel-mainline<br>
> >> Retrieving file: /Image<br>
> >> 26155520 bytes read in 1802 ms (13.8 MiB/s)<br>
> >> append: earlycon=uart8250,mmio32,0xff1a0000 swiotlb=1 coherent_pool=1m earlyprintk console=ttyS2,1500000n8 video=HDMI-A-1:12<br>
> >> 80x1024@60 root=/dev/mmcblk1p5 rootwait rw rootfstype=ext4 init=/sbin/init ipv6.disable=1 loglevel=9<br>
> >> Retrieving file: /rk3399-rock-pi-4.dtb<br>
> >> 54919 bytes read in 17 ms (3.1 MiB/s)<br>
> >> ## Flattened Device Tree blob at 01f00000<br>
> >> Booting using the fdt blob at 0x1f00000<br>
> >> Loading Device Tree to 00000000f5f14000, end 00000000f5f24686 ... OK<br>
> >><br>
> >> Starting kernel ...<br>
> >><br>
> >> [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]<br>
> >> [ 0.000000] Linux version 5.4.0-rc1 (joaze@wsevst-c0022) (gcc version 8.3.0 (Buildroot 2020.02-git-00280-gaf42fc988e-dirt<br>
> >> y)) #1 SMP PREEMPT Wed Dec 11 09:18:01 CET 2019<br>
> >> [ 0.000000] Machine model: Radxa ROCK Pi 4<br>
> >> [ 0.000000] earlycon: uart8250 at MMIO32 0x00000000ff1a0000 (options '')<br>
> >> [ 0.000000] printk: bootconsole [uart8250] enabled<br>
> >> [ 0.000000] efi: Getting EFI parameters from FDT:<br>
> >> [ 0.000000] efi: UEFI not found.<br>
> >> [ 0.000000] cma: Reserved 32 MiB at 0x00000000f6000000<br>
> >> [ 0.000000] NUMA: No NUMA configuration found<br>
> >> [ 0.000000] NUMA: Faking a node at [mem 0x0000000000200000-0x00000000f7ffffff]<br>
> >> [ 0.000000] NUMA: NODE_DATA [mem 0xf57e0800-0xf57e1fff]<br>
> >> [ 0.000000] Zone ranges:<br>
> >> [ 0.000000] DMA32 [mem 0x0000000000200000-0x00000000f7ffffff]<br>
> >> [ 0.000000] Normal empty<br>
> >> [ 0.000000] Movable zone start for each node<br>
> >> [ 0.000000] Early memory node ranges<br>
> >> [ 0.000000] node 0: [mem 0x0000000000200000-0x00000000f7ffffff]<br>
> >> [ 0.000000] Initmem setup node 0 [mem 0x0000000000200000-0x00000000f7ffffff]<br>
> >> [ 0.000000] On node 0 totalpages: 1015296<br>
> >> [ 0.000000] DMA32 zone: 15864 pages used for memmap<br>
> >> [ 0.000000] DMA32 zone: 0 pages reserved<br>
> >> [ 0.000000] DMA32 zone: 1015296 pages, LIFO batch:63<br>
> >> [ 0.000000] psci: probing for conduit method from DT.<br>
> >> [ 0.000000] psci: PSCIv1.0 detected in firmware.<br>
> >> [ 0.000000] psci: Using standard PSCI v0.2 function IDs<br>
> >> [ 0.000000] psci: Trusted OS migration not required<br>
> >> [ 0.000000] psci: SMC Calling Convention v1.0<br>
> >> [ 0.000000] percpu: Embedded 22 pages/cpu s52952 r8192 d28968 u90112<br>
> >> [ 0.000000] pcpu-alloc: s52952 r8192 d28968 u90112 alloc=22*4096<br>
> >> [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [0] 4 [0] 5<br>
> >> [ 0.000000] Detected VIPT I-cache on CPU0<br>
> >> [ 0.000000] CPU features: detected: ARM erratum 845719<br>
> >> [ 0.000000] CPU features: detected: GIC system register CPU interface<br>
> >> [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 999432<br>
> >> [ 0.000000] Policy zone: DMA32<br>
> >> [ 0.000000] Kernel command line: earlycon=uart8250,mmio32,0xff1a0000 swiotlb=1 coherent_pool=1m earlyprintk console=ttyS2<br>
> >> ,1500000n8 video=HDMI-A-1:1280x1024@60 root=/dev/mmcblk1p5 rootwait rw rootfstype=ext4 init=/sbin/init ipv6.disable=1 loglev<br>
> >> el=9<br>
> >> ...<br>
> >> ...<br>
> >> ...<br>
> >> #<br>
> >> #<br>
> >> # media-ctl -p -d /dev/media0<br>
> >> Media controller API version 5.4.0<br>
> >><br>
> >> Media device information<br>
> >> ------------------------<br>
> >> driver rkisp1<br>
> >> model rkisp1<br>
> >> serial<br>
> >> bus info platform: rkisp1<br>
> >> hw revision 0x0<br>
> >> driver version 5.4.0<br>
> >><br>
> >> Device topology<br>
> >> - entity 1: rkisp1-isp-subdev (4 pads, 5 links)<br>
> >> type V4L2 subdev subtype Unknown flags 0<br>
> >> device node name /dev/v4l-subdev0<br>
> >> pad0: Sink<br>
> >> [fmt:SRGGB10_1X10/800x600 field:none<br>
> >> crop.bounds:(0,0)/800x600<br>
> >> crop:(0,0)/800x600]<br>
> >> <- "imx219 4-0010":0 [ENABLED]<br>
> >> pad1: Sink<br>
> >> [fmt:FIXED/800x600 field:none]<br>
> >> <- "rkisp1-input-params":0 [ENABLED]<br>
> >> pad2: Source<br>
> >> [fmt:YUYV8_2X8/800x600 field:none<br>
> >> crop.bounds:(0,0)/800x600<br>
> >> crop:(0,0)/800x600]<br>
> >> -> "rkisp1_mainpath":0 [ENABLED]<br>
> >> -> "rkisp1_selfpath":0 [ENABLED]<br>
> >> pad3: Source<br>
> >> [fmt:FIXED/800x600 field:none]<br>
> >> -> "rkisp1-statistics":0 [ENABLED]<br>
> >><br>
> >> - entity 6: rkisp1_selfpath (1 pad, 1 link)<br>
> >> type Node subtype V4L flags 0<br>
> >> device node name /dev/video0<br>
> >> pad0: Sink<br>
> >> <- "rkisp1-isp-subdev":2 [ENABLED]<br>
> >><br>
> >> - entity 10: rkisp1_mainpath (1 pad, 1 link)<br>
> >> type Node subtype V4L flags 0<br>
> >> device node name /dev/video1<br>
> >> pad0: Sink<br>
> >> <- "rkisp1-isp-subdev":2 [ENABLED]<br>
> >><br>
> >> - entity 14: rkisp1-statistics (1 pad, 1 link)<br>
> >> type Node subtype V4L flags 0<br>
> >> device node name /dev/video2<br>
> >> pad0: Sink<br>
> >> <- "rkisp1-isp-subdev":3 [ENABLED]<br>
> >><br>
> >> - entity 18: rkisp1-input-params (1 pad, 1 link)<br>
> >> type Node subtype V4L flags 0<br>
> >> device node name /dev/video3<br>
> >> pad0: Source<br>
> >> -> "rkisp1-isp-subdev":1 [ENABLED]<br>
> >><br>
> >> - entity 22: imx219 4-0010 (1 pad, 1 link)<br>
> >> type V4L2 subdev subtype Sensor flags 0<br>
> >> device node name /dev/v4l-subdev1<br>
> >> pad0: Source<br>
> >> [fmt:SBGGR10_1X10/1920x1080@10000/300000 field:none]<br>
> >> -> "rkisp1-isp-subdev":0 [ENABLED]<br>
> >> #<br>
> >> # v4l2-ctl -d /dev/video0 --all<br>
> >> Driver Info:<br>
> >> Driver name : rkisp1<br>
> >> Card type : rkisp1<br>
> >> Bus info : platform: rkisp1<br>
> >> Driver version : 5.4.0<br>
> >> Capabilities : 0x84201000<br>
> >> Video Capture Multiplanar<br>
> >> Streaming<br>
> >> Extended Pix Format<br>
> >> Device Capabilities<br>
> >> Device Caps : 0x04201000<br>
> >> Video Capture Multiplanar<br>
> >> Streaming<br>
> >> Extended Pix Format<br>
> >> Media Driver Info:<br>
> >> Driver name : rkisp1<br>
> >> Model : rkisp1<br>
> >> Serial :<br>
> >> Bus info : platform: rkisp1<br>
> >> Media version : 5.4.0<br>
> >> Hardware revision: 0x00000000 (0)<br>
> >> Driver version : 5.4.0<br>
> >> Interface Info:<br>
> >> ID : 0x03000007<br>
> >> Type : V4L Video<br>
> >> Entity Info:<br>
> >> ID : 0x00000006 (6)<br>
> >> Name : rkisp1_selfpath<br>
> >> Function : V4L2 I/O<br>
> >> Pad 0x01000009 : 0: Sink<br>
> >> Link 0x0200001e: from remote pad 0x1000004 of entity 'rkisp1-isp-subdev': Data, Enabled<br>
> >> Priority: 2<br>
> >> Format Video Capture Multiplanar:<br>
> >> Width/Height : 800/600<br>
> >> Pixel Format : 'YUYV' (YUYV 4:2:2)<br>
> >> Field : None<br>
> >> Number of planes : 1<br>
> >> Flags :<br>
> >> Colorspace : Default<br>
> >> Transfer Function : Default<br>
> >> YCbCr/HSV Encoding: Default<br>
> >> Quantization : Full Range<br>
> >> Plane 0 :<br>
> >> Bytes per Line : 1600<br>
> >> Size Image : 960000<br>
> >> #<br>
> >> # v4l2-ctl -d /dev/v4l-subdev1 --all<br>
> >> Priority: 0<br>
> >> Frequency for tuner 0: 0 (0.000000 MHz)<br>
> >> Tuner 0:<br>
> >> Name :<br>
> >> Type : unknown<br>
> >> Capabilities : 62.5 kHz<br>
> >> Frequency range : 0.000 MHz - 0.000 MHz<br>
> >> Signal strength/AFC : 0%/0<br>
> >> Current audio mode : mono<br>
> >> Available subchannels:<br>
> >> Modulator 0:<br>
> >> Name :<br>
> >> Type : unknown<br>
> >> Capabilities : 62.5 kHz<br>
> >> Frequency range : 0.0 MHz - 0.0 MHz<br>
> >> Subchannel modulation:<br>
> >> Video input : 0 (: ok)<br>
> >> Video output: 0 ()<br>
> >> Audio input : 0 ()<br>
> >> Audio output: 0 ()<br>
> >> Format Video Capture:<br>
> >> Width/Height : 0/0<br>
> >> Pixel Format : '' ()<br>
> >> Field : Any<br>
> >> Bytes per Line : 0<br>
> >> Size Image : 0<br>
> >> Colorspace : Default<br>
> >> Transfer Function : Default (maps to Rec. 709)<br>
> >> YCbCr/HSV Encoding: Default (maps to ITU-R 601)<br>
> >> Quantization : Default (maps to Full Range)<br>
> >> Format Video Output:<br>
> >> Width/Height : 0/0<br>
> >> Pixel Format : '' ()<br>
> >> Field : Any<br>
> >> Bytes per Line : 0<br>
> >> Size Image : 0<br>
> >> Colorspace : Default<br>
> >> Transfer Function : Default (maps to Rec. 709)<br>
> >> YCbCr/HSV Encoding: Default (maps to ITU-R 601)<br>
> >> Quantization : Default (maps to Full Range)<br>
> >> Format Video Output Overlay:<br>
> >> Left/Top : 0/0<br>
> >> Width/Height: 0/0<br>
> >> Field : Any<br>
> >> Chroma Key : 0x00000000<br>
> >> Global Alpha: 0x00<br>
> >> Clip Count : 0<br>
> >> Clip Bitmap : Yes, 0 bits of 0 are set<br>
> >> Framebuffer Format:<br>
> >> Capability :<br>
> >> Flags :<br>
> >> Width : 0<br>
> >> Height : 0<br>
> >> Pixel Format : ''<br>
> >> Bytes per Line: 0<br>
> >> Size image : 0<br>
> >> Colorspace : Default<br>
> >> Format Sliced VBI Capture:<br>
> >> Service Set :<br>
> >> Service Line 0: /<br>
> >> Service Line 1: /<br>
> >> Service Line 2: /<br>
> >> Service Line 3: /<br>
> >> Service Line 4: /<br>
> >> Service Line 5: /<br>
> >> Service Line 6: /<br>
> >> Service Line 7: /<br>
> >> Service Line 8: /<br>
> >> Service Line 9: /<br>
> >> Service Line 10: /<br>
> >> Service Line 11: /<br>
> >> Service Line 12: /<br>
> >> Service Line 13: /<br>
> >> Service Line 14: /<br>
> >> Service Line 15: /<br>
> >> Service Line 16: /<br>
> >> Service Line 17: /<br>
> >> Service Line 18: /<br>
> >> Service Line 19: /<br>
> >> Service Line 20: /<br>
> >> Service Line 21: /<br>
> >> Service Line 22: /<br>
> >> Service Line 23: /<br>
> >> I/O Size : 0<br>
> >> Format Sliced VBI Output:<br>
> >> Service Set :<br>
> >> Service Line 0: /<br>
> >> Service Line 1: /<br>
> >> Service Line 2: /<br>
> >> Service Line 3: /<br>
> >> Service Line 4: /<br>
> >> Service Line 5: /<br>
> >> Service Line 6: /<br>
> >> Service Line 7: /<br>
> >> Service Line 8: /<br>
> >> Service Line 9: /<br>
> >> Service Line 10: /<br>
> >> Service Line 11: /<br>
> >> Service Line 12: /<br>
> >> Service Line 13: /<br>
> >> Service Line 14: /<br>
> >> Service Line 15: /<br>
> >> Service Line 16: /<br>
> >> Service Line 17: /<br>
> >> Service Line 18: /<br>
> >> Service Line 19: /<br>
> >> Service Line 20: /<br>
> >> Service Line 21: /<br>
> >> Service Line 22: /<br>
> >> Service Line 23: /<br>
> >> I/O Size : 0<br>
> >> Format VBI Capture:<br>
> >> Sampling Rate : 0 Hz<br>
> >> Offset : 0 samples (nan secs after leading edge)<br>
> >> Samples per Line: 0<br>
> >> Sample Format : ''<br>
> >> Start 1st Field : 0<br>
> >> Count 1st Field : 0<br>
> >> Start 2nd Field : 0<br>
> >> Count 2nd Field : 0<br>
> >> Format VBI Output:<br>
> >> Sampling Rate : 0 Hz<br>
> >> Offset : 0 samples (nan secs after leading edge)<br>
> >> Samples per Line: 0<br>
> >> Sample Format : ''<br>
> >> Start 1st Field : 0<br>
> >> Count 1st Field : 0<br>
> >> Start 2nd Field : 0<br>
> >> Count 2nd Field : 0<br>
> >> Format SDR Capture:<br>
> >> Sample Format : '' ()<br>
> >> Buffer Size : 0<br>
> >> Format SDR Output:<br>
> >> Sample Format : '' ()<br>
> >> Buffer Size : 0<br>
> >> Format Metadata Capture:<br>
> >> Sample Format : '' ()<br>
> >> Buffer Size : 0<br>
> >> Format Metadata Output:<br>
> >> Sample Format : '' ()<br>
> >> Buffer Size : 0<br>
> >> Crop Capability Video Capture:<br>
> >> Bounds : Left 0, Top 0, Width 0, Height 0<br>
> >> Default : Left 0, Top 0, Width 0, Height 0<br>
> >> Pixel Aspect: 0/0<br>
> >> Crop Capability Video Output:<br>
> >> Bounds : Left 0, Top 0, Width 0, Height 0<br>
> >> Default : Left 0, Top 0, Width 0, Height 0<br>
> >> Pixel Aspect: 0/0<br>
> >> Selection Video Capture: crop, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Capture: crop_default, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Capture: crop_bounds, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Capture: compose, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Capture: compose_default, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Capture: compose_bounds, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Capture: compose_padded, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Capture: native_size, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Output: crop, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Output: crop_default, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Output: crop_bounds, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Output: compose, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Output: compose_default, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Output: compose_bounds, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Output: compose_padded, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Output: native_size, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> JPEG compression:<br>
> >> Quality: 0<br>
> >> Markers: 0x00000000<br>
> >> Streaming Parameters Video Capture:<br>
> >> Frames per second: invalid (0/0)<br>
> >> Read buffers : 0<br>
> >> Streaming Parameters Video Output:<br>
> >> Frames per second: invalid (0/0)<br>
> >> Write buffers : 0<br>
> >><br>
> >> User Controls<br>
> >><br>
> >> exposure 0x00980911 (int) : min=0 max=4095 step=1 default=1575 value=1575 flags=volatile<br>
> >> digital_gain 0x00980913 (int) : min=256 max=43663 step=1 default=256 value=256 flags=volatile<br>
> >> horizontal_flip 0x00980914 (bool) : default=0 value=0<br>
> >> vertical_flip 0x00980915 (bool) : default=0 value=0<br>
> >><br>
> >> Image Source Controls<br>
> >><br>
> >> vertical_blanking 0x009e0901 (int) : min=686 max=686 step=1 default=686 value=686<br>
> >> horizontal_blanking 0x009e0902 (int) : min=1524 max=1524 step=1 default=1524 value=1524<br>
> >> analog_gain 0x009e0903 (int) : min=256 max=2816 step=1 default=512 value=512 flags=volatile<br>
> >><br>
> >> Image Processing Controls<br>
> >><br>
> >> link_frequency 0x009f0901 (intmenu): min=0 max=0 default=0 value=0<br>
> >> 0: 456000000 (0x1b2e0200)<br>
> >> pixel_rate 0x009f0902 (int64) : min=0 max=182463120 step=1 default=182463120 value=182463120 flags=rea<br>
> >> d-only<br>
> >> test_pattern 0x009f0903 (menu) : min=0 max=13 default=0 value=0<br>
> >> 0: Disabled<br>
> >> 1: Solid Black<br>
> >> 2: Solid White<br>
> >> 3: Solid Red<br>
> >> 4: Solid Green<br>
> >> 5: Solid Blue<br>
> >> 6: Color Bar<br>
> >> 7: Fade to Grey Color Bar<br>
> >> 8: PN9<br>
> >> 9: 16 Split Color Bar<br>
> >> 10: 16 Split Inverted Color Bar<br>
> >> 11: Column Counter<br>
> >> 12: Inverted Column Counter<br>
> >> 13: PN31<br>
> >> # cam -c "imx219 4-0010" -C --file="frame#.data" -s width=1280,height=720,pixelformat=7<br>
> >> Using camera imx219 4-0010<br>
> >> Camera configuration adjusted<br>
> >> [0:06:35.214317519] INFO Camera camera.cpp:654 configuring streams: (0) 1280x720-0x3231564e<br>
> >> [0:06:36.220371770] ERR V4L2 v4l2_videodevice.cpp:935 /dev/video1[cap]: Failed to queue buffer 2: Input/output error<br>
> ><br>
> > hmm, I need to take a better look.<br>
> > Also, I'll see if I can get a rpi camera v2 to test this.<br>
> ><br>
> > btw, I have a WIP branch (with a bunch of non-ready things, tests, todos, and temporary commits), but is the one I'm<br>
> > constantly testing, in case you want to check:<br>
> ><br>
> > <a href="https://gitlab.collabora.com/koike/linux/tree/rockchip/isp/v12" rel="noreferrer" target="_blank">https://gitlab.collabora.com/koike/linux/tree/rockchip/isp/v12</a><br>
> ><br>
> > Let me know if the commands above work or not.<br>
> ><br>
> > Thanks<br>
> > Helen<br>
> ><br>
> >> Can't queue request<br>
> >> #<br>
> >> # media-ctl -d /dev/media0 --set-v4l2 '"imx219 4-0010":0[fmt:SBGGR10_1X10/2592x1944]'<br>
> >> # media-ctl -d /dev/media0 --set-v4l2 '"rkisp1-isp-subdev":0[fmt:SBGGR10_1X10/2592x1944]'<br>
> >> # media-ctl -d /dev/media0 --set-v4l2 '"rkisp1-isp-subdev":0[crop:(0,0)/2592x1944]'<br>
> >> # media-ctl -d /dev/media0 --set-v4l2 '"rkisp1-isp-subdev":2[fmt:YUYV8_2X8/2592x1944]'<br>
> >> # media-ctl -d /dev/media0 --set-v4l2 '"rkisp1-isp-subdev":2[crop:(0,0)/2592x1944]'<br>
> >> # v4l2-ctl -d /dev/video0 --set-selection=target=crop,top=336,left=432,width=1920,height=1080 --set-fmt-video=width=1280,height=720,pixelformat=NV21 --stream-mmap=3 --stream-to=mp_yuv.out --stream-count=1 --stream-poll<br>
> >> VIDIOC_G_SELECTION: failed: Invalid argument<br>
> >> select timeout<br>
> >> #<br>
> >> # media-ctl -p -d /dev/media0<br>
> >> Media controller API version 5.4.0<br>
> >><br>
> >> Media device information<br>
> >> ------------------------<br>
> >> driver rkisp1<br>
> >> model rkisp1<br>
> >> serial<br>
> >> bus info platform: rkisp1<br>
> >> hw revision 0x0<br>
> >> driver version 5.4.0<br>
> >><br>
> >> Device topology<br>
> >> - entity 1: rkisp1-isp-subdev (4 pads, 5 links)<br>
> >> type V4L2 subdev subtype Unknown flags 0<br>
> >> device node name /dev/v4l-subdev0<br>
> >> pad0: Sink<br>
> >> [fmt:SBGGR10_1X10/2592x1944 field:none<br>
> >> crop.bounds:(0,0)/2592x1944<br>
> >> crop:(0,0)/2592x1944]<br>
> >> <- "imx219 4-0010":0 [ENABLED]<br>
> >> pad1: Sink<br>
> >> [fmt:FIXED/800x600 field:none]<br>
> >> <- "rkisp1-input-params":0 []<br>
> >> pad2: Source<br>
> >> [fmt:YUYV8_2X8/2592x1944 field:none<br>
> >> crop.bounds:(0,0)/2592x1944<br>
> >> crop:(0,0)/2592x1944]<br>
> >> -> "rkisp1_mainpath":0 [ENABLED]<br>
> >> -> "rkisp1_selfpath":0 []<br>
> >> pad3: Source<br>
> >> [fmt:FIXED/800x600 field:none]<br>
> >> -> "rkisp1-statistics":0 []<br>
> >><br>
> >> - entity 6: rkisp1_selfpath (1 pad, 1 link)<br>
> >> type Node subtype V4L flags 0<br>
> >> device node name /dev/video0<br>
> >> pad0: Sink<br>
> >> <- "rkisp1-isp-subdev":2 []<br>
> >><br>
> >> - entity 10: rkisp1_mainpath (1 pad, 1 link)<br>
> >> type Node subtype V4L flags 0<br>
> >> device node name /dev/video1<br>
> >> pad0: Sink<br>
> >> <- "rkisp1-isp-subdev":2 [ENABLED]<br>
> >><br>
> >> - entity 14: rkisp1-statistics (1 pad, 1 link)<br>
> >> type Node subtype V4L flags 0<br>
> >> device node name /dev/video2<br>
> >> pad0: Sink<br>
> >> <- "rkisp1-isp-subdev":3 []<br>
> >><br>
> >> - entity 18: rkisp1-input-params (1 pad, 1 link)<br>
> >> type Node subtype V4L flags 0<br>
> >> device node name /dev/video3<br>
> >> pad0: Source<br>
> >> -> "rkisp1-isp-subdev":1 []<br>
> >><br>
> >> - entity 22: imx219 4-0010 (1 pad, 1 link)<br>
> >> type V4L2 subdev subtype Sensor flags 0<br>
> >> device node name /dev/v4l-subdev1<br>
> >> pad0: Source<br>
> >> [fmt:SBGGR10_1X10/3280x2464@10000/210000 field:none]<br>
> >> -> "rkisp1-isp-subdev":0 [ENABLED]<br>
> >><br>
> >> # v4l2-ctl -d /dev/video0 --all<br>
> >> Driver Info:<br>
> >> Driver name : rkisp1<br>
> >> Card type : rkisp1<br>
> >> Bus info : platform: rkisp1<br>
> >> Driver version : 5.4.0<br>
> >> Capabilities : 0x84201000<br>
> >> Video Capture Multiplanar<br>
> >> Streaming<br>
> >> Extended Pix Format<br>
> >> Device Capabilities<br>
> >> Device Caps : 0x04201000<br>
> >> Video Capture Multiplanar<br>
> >> Streaming<br>
> >> Extended Pix Format<br>
> >> Media Driver Info:<br>
> >> Driver name : rkisp1<br>
> >> Model : rkisp1<br>
> >> Serial :<br>
> >> Bus info : platform: rkisp1<br>
> >> Media version : 5.4.0<br>
> >> Hardware revision: 0x00000000 (0)<br>
> >> Driver version : 5.4.0<br>
> >> Interface Info:<br>
> >> ID : 0x03000007<br>
> >> Type : V4L Video<br>
> >> Entity Info:<br>
> >> ID : 0x00000006 (6)<br>
> >> Name : rkisp1_selfpath<br>
> >> Function : V4L2 I/O<br>
> >> Pad 0x01000009 : 0: Sink<br>
> >> Link 0x0200001e: from remote pad 0x1000004 of entity 'rkisp1-isp-subdev': Data<br>
> >> Priority: 2<br>
> >> Format Video Capture Multiplanar:<br>
> >> Width/Height : 1280/720<br>
> >> Pixel Format : 'NV21' (Y/CrCb 4:2:0)<br>
> >> Field : None<br>
> >> Number of planes : 1<br>
> >> Flags :<br>
> >> Colorspace : Default<br>
> >> Transfer Function : Default<br>
> >> YCbCr/HSV Encoding: Default<br>
> >> Quantization : Full Range<br>
> >> Plane 0 :<br>
> >> Bytes per Line : 1280<br>
> >> Size Image : 1382400<br>
> >> # v4l2-ctl -d /dev/v4l-subdev1 --all<br>
> >> Priority: 0<br>
> >> Frequency for tuner 0: 0 (0.000000 MHz)<br>
> >> Tuner 0:<br>
> >> Name :<br>
> >> Type : unknown<br>
> >> Capabilities : 62.5 kHz<br>
> >> Frequency range : 0.000 MHz - 0.000 MHz<br>
> >> Signal strength/AFC : 0%/0<br>
> >> Current audio mode : mono<br>
> >> Available subchannels:<br>
> >> Modulator 0:<br>
> >> Name :<br>
> >> Type : unknown<br>
> >> Capabilities : 62.5 kHz<br>
> >> Frequency range : 0.0 MHz - 0.0 MHz<br>
> >> Subchannel modulation:<br>
> >> Video input : 0 (: ok)<br>
> >> Video output: 0 ()<br>
> >> Audio input : 0 ()<br>
> >> Audio output: 0 ()<br>
> >> Format Video Capture:<br>
> >> Width/Height : 0/0<br>
> >> Pixel Format : '' ()<br>
> >> Field : Any<br>
> >> Bytes per Line : 0<br>
> >> Size Image : 0<br>
> >> Colorspace : Default<br>
> >> Transfer Function : Default (maps to Rec. 709)<br>
> >> YCbCr/HSV Encoding: Default (maps to ITU-R 601)<br>
> >> Quantization : Default (maps to Full Range)<br>
> >> Format Video Output:<br>
> >> Width/Height : 0/0<br>
> >> Pixel Format : '' ()<br>
> >> Field : Any<br>
> >> Bytes per Line : 0<br>
> >> Size Image : 0<br>
> >> Colorspace : Default<br>
> >> Transfer Function : Default (maps to Rec. 709)<br>
> >> YCbCr/HSV Encoding: Default (maps to ITU-R 601)<br>
> >> Quantization : Default (maps to Full Range)<br>
> >> Format Video Output Overlay:<br>
> >> Left/Top : 0/0<br>
> >> Width/Height: 0/0<br>
> >> Field : Any<br>
> >> Chroma Key : 0x00000000<br>
> >> Global Alpha: 0x00<br>
> >> Clip Count : 0<br>
> >> Clip Bitmap : Yes, 0 bits of 0 are set<br>
> >> Framebuffer Format:<br>
> >> Capability :<br>
> >> Flags :<br>
> >> Width : 0<br>
> >> Height : 0<br>
> >> Pixel Format : ''<br>
> >> Bytes per Line: 0<br>
> >> Size image : 0<br>
> >> Colorspace : Default<br>
> >> Format Sliced VBI Capture:<br>
> >> Service Set :<br>
> >> Service Line 0: /<br>
> >> Service Line 1: /<br>
> >> Service Line 2: /<br>
> >> Service Line 3: /<br>
> >> Service Line 4: /<br>
> >> Service Line 5: /<br>
> >> Service Line 6: /<br>
> >> Service Line 7: /<br>
> >> Service Line 8: /<br>
> >> Service Line 9: /<br>
> >> Service Line 10: /<br>
> >> Service Line 11: /<br>
> >> Service Line 12: /<br>
> >> Service Line 13: /<br>
> >> Service Line 14: /<br>
> >> Service Line 15: /<br>
> >> Service Line 16: /<br>
> >> Service Line 17: /<br>
> >> Service Line 18: /<br>
> >> Service Line 19: /<br>
> >> Service Line 20: /<br>
> >> Service Line 21: /<br>
> >> Service Line 22: /<br>
> >> Service Line 23: /<br>
> >> I/O Size : 0<br>
> >> Format Sliced VBI Output:<br>
> >> Service Set :<br>
> >> Service Line 0: /<br>
> >> Service Line 1: /<br>
> >> Service Line 2: /<br>
> >> Service Line 3: /<br>
> >> Service Line 4: /<br>
> >> Service Line 5: /<br>
> >> Service Line 6: /<br>
> >> Service Line 7: /<br>
> >> Service Line 8: /<br>
> >> Service Line 9: /<br>
> >> Service Line 10: /<br>
> >> Service Line 11: /<br>
> >> Service Line 12: /<br>
> >> Service Line 13: /<br>
> >> Service Line 14: /<br>
> >> Service Line 15: /<br>
> >> Service Line 16: /<br>
> >> Service Line 17: /<br>
> >> Service Line 18: /<br>
> >> Service Line 19: /<br>
> >> Service Line 20: /<br>
> >> Service Line 21: /<br>
> >> Service Line 22: /<br>
> >> Service Line 23: /<br>
> >> I/O Size : 0<br>
> >> Format VBI Capture:<br>
> >> Sampling Rate : 0 Hz<br>
> >> Offset : 0 samples (nan secs after leading edge)<br>
> >> Samples per Line: 0<br>
> >> Sample Format : ''<br>
> >> Start 1st Field : 0<br>
> >> Count 1st Field : 0<br>
> >> Start 2nd Field : 0<br>
> >> Count 2nd Field : 0<br>
> >> Format VBI Output:<br>
> >> Sampling Rate : 0 Hz<br>
> >> Offset : 0 samples (nan secs after leading edge)<br>
> >> Samples per Line: 0<br>
> >> Sample Format : ''<br>
> >> Start 1st Field : 0<br>
> >> Count 1st Field : 0<br>
> >> Start 2nd Field : 0<br>
> >> Count 2nd Field : 0<br>
> >> Format SDR Capture:<br>
> >> Sample Format : '' ()<br>
> >> Buffer Size : 0<br>
> >> Format SDR Output:<br>
> >> Sample Format : '' ()<br>
> >> Buffer Size : 0<br>
> >> Format Metadata Capture:<br>
> >> Sample Format : '' ()<br>
> >> Buffer Size : 0<br>
> >> Format Metadata Output:<br>
> >> Sample Format : '' ()<br>
> >> Buffer Size : 0<br>
> >> Crop Capability Video Capture:<br>
> >> Bounds : Left 0, Top 0, Width 0, Height 0<br>
> >> Default : Left 0, Top 0, Width 0, Height 0<br>
> >> Pixel Aspect: 0/0<br>
> >> Crop Capability Video Output:<br>
> >> Bounds : Left 0, Top 0, Width 0, Height 0<br>
> >> Default : Left 0, Top 0, Width 0, Height 0<br>
> >> Pixel Aspect: 0/0<br>
> >> Selection Video Capture: crop, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Capture: crop_default, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Capture: crop_bounds, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Capture: compose, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Capture: compose_default, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Capture: compose_bounds, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Capture: compose_padded, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Capture: native_size, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Output: crop, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Output: crop_default, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Output: crop_bounds, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Output: compose, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Output: compose_default, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Output: compose_bounds, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Output: compose_padded, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> Selection Video Output: native_size, Left 0, Top 0, Width 0, Height 0, Flags:<br>
> >> JPEG compression:<br>
> >> Quality: 0<br>
> >> Markers: 0x00000000<br>
> >> Streaming Parameters Video Capture:<br>
> >> Frames per second: invalid (0/0)<br>
> >> Read buffers : 0<br>
> >> Streaming Parameters Video Output:<br>
> >> Frames per second: invalid (0/0)<br>
> >> Write buffers : 0<br>
> >><br>
> >> User Controls<br>
> >><br>
> >> exposure 0x00980911 (int) : min=0 max=4095 step=1 default=1575 value=1575 flags=volatile<br>
> >> digital_gain 0x00980913 (int) : min=256 max=43663 step=1 default=256 value=256 flags=volatile<br>
> >> horizontal_flip 0x00980914 (bool) : default=0 value=0<br>
> >> vertical_flip 0x00980915 (bool) : default=0 value=0<br>
> >><br>
> >> Image Source Controls<br>
> >><br>
> >> vertical_blanking 0x009e0901 (int) : min=36 max=36 step=1 default=36 value=686<br>
> >> horizontal_blanking 0x009e0902 (int) : min=164 max=164 step=1 default=164 value=1524<br>
> >> analog_gain 0x009e0903 (int) : min=256 max=2816 step=1 default=512 value=512 flags=volatile<br>
> >><br>
> >> Image Processing Controls<br>
> >><br>
> >> link_frequency 0x009f0901 (intmenu): min=0 max=0 default=0 value=0<br>
> >> 0: 456000000 (0x1b2e0200)<br>
> >> pixel_rate 0x009f0902 (int64) : min=180810000 max=180810000 step=1 default=180810000 value=182463120 f<br>
> >> lags=read-only<br>
> >> test_pattern 0x009f0903 (menu) : min=0 max=13 default=0 value=0<br>
> >> 0: Disabled<br>
> >> 1: Solid Black<br>
> >> 2: Solid White<br>
> >> 3: Solid Red<br>
> >> 4: Solid Green<br>
> >> 5: Solid Blue<br>
> >> 6: Color Bar<br>
> >> 7: Fade to Grey Color Bar<br>
> >> 8: PN9<br>
> >> 9: 16 Split Color Bar<br>
> >> 10: 16 Split Inverted Color Bar<br>
> >> 11: Column Counter<br>
> >> 12: Inverted Column Counter<br>
> >> 13: PN31<br>
> >> #<br>
> >><br>
> >><br>
> > _______________________________________________<br>
> > libcamera-devel mailing list<br>
> > <a href="mailto:libcamera-devel@lists.libcamera.org" target="_blank">libcamera-devel@lists.libcamera.org</a> <mailto:<a href="mailto:libcamera-devel@lists.libcamera.org" target="_blank">libcamera-devel@lists.libcamera.org</a>><br>
> > <a href="https://lists.libcamera.org/listinfo/libcamera-devel" rel="noreferrer" target="_blank">https://lists.libcamera.org/listinfo/libcamera-devel</a><br>
> ><br>
> <br>
</blockquote></div></div>