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