Good Evening,
I have bought and been trying hard to get the Raspberry PI V2 Camera with an IMX219-Chip running on my Visionfive 2, as this was one of the suggested cameras in the docs.
Sadly, I can’t get the camera working.
This is what I am doing:
I installed the latest debian-sd image (202405) and updated packets via the provided script.
As suggested in one of the edge-detection tutorials, I run
/opt/media-ctl-pipeline.sh -d /dev/media0 -i csiphy0 -s ISP0 -a start
/opt/ISP/stf_isp_ctrl -m imx219mipi -j 0 -a 1
in a seperate terminal.
Here is the first error, the script prints libv4l2: error set_fmt gave us a different result than try_fmt!
In another terminal, I try creating a simple foto with ffmpeg ffmpeg -f v4l2 -video_size 1920x1080 -i /dev/video1 -frames 1 out.jpg
(using video1 for the csi camera as suggested by the tutorial). This doesn’t work, and returns the error code “Broken pipe”.
Furthermore, I can see in dmesg that everytime I try to create a picture, there is actually a kernel exception in the v4l2 module:
[ 1711.067555] —[ end trace 0000000000000000 ]—
[ 1720.532622] [st_video] error: Failed to video_device_pipeline_start: -32
[ 1720.539425] ------------[ cut here ]------------
[ 1720.539427] WARNING: CPU: 3 PID: 1483 at drivers/media/common/videobuf2/videobuf2-core.c:1613 vb2_start_streaming+0xb2/0x10c
[ 1720.539446] Modules linked in: vdec(O) jpu(O) venc(O)
[ 1720.539461] CPU: 3 PID: 1483 Comm: ffmpeg Tainted: G W O T 6.6.20-starfive #1
[ 1720.539467] Hardware name: StarFive VisionFive 2 v1.3B (DT)
[ 1720.539470] epc : vb2_start_streaming+0xb2/0x10c
[ 1720.539476] ra : vb2_start_streaming+0x6a/0x10c
[ 1720.539482] epc : ffffffff807885d6 ra : ffffffff8078858e sp : ffffffc8035b3bf0
[ 1720.539487] gp : ffffffff81915af0 tp : ffffffd8e63ee9c0 t0 : ffffffff80b30fb8
[ 1720.539491] t1 : 0000000000000001 t2 : 6f656469765f7473 s0 : ffffffc8035b3c30
[ 1720.539494] s1 : ffffffffffffffe0 a0 : ffffffffffffffe0 a1 : ffffffd9f8f9c688
[ 1720.539498] a2 : ffffffd9f8f9f598 a3 : 0000000000000000 a4 : 0000000000000000
[ 1720.539502] a5 : 0000000000000020 a6 : 0000000000000000 a7 : ffffffc8035b39c0
[ 1720.539506] s2 : ffffffd8c16a8f48 s3 : ffffffd8c16a9138 s4 : 0000000000000001
[ 1720.539509] s5 : 0000000000000004 s6 : ffffffd8c5142000 s7 : ffffffff819170a8
[ 1720.539513] s8 : 0000000000000000 s9 : 0000000000000000 s10: ffffffd8c16a9830
[ 1720.539516] s11: 0000000000000000 t3 : ffffffd8c0078f00 t4 : ffffffd8c0078f00
[ 1720.539520] t5 : ffffffd8c0078000 t6 : ffffffd8c0078f00
[ 1720.539523] status: 0000000200000120 badaddr: 0000000000000000 cause: 0000000000000003
[ 1720.539527] [] vb2_start_streaming+0xb2/0x10c
[ 1720.539534] [] vb2_core_streamon+0x9c/0x154
[ 1720.539541] [] vb2_ioctl_streamon+0x32/0x6a
[ 1720.539549] [] v4l_streamon+0x16/0x1e
[ 1720.539558] [] __video_do_ioctl+0x140/0x3a4
[ 1720.539566] [] video_usercopy+0x130/0x44a
[ 1720.539573] [] video_ioctl2+0x14/0x1c
[ 1720.539580] [] v4l2_ioctl+0x30/0x44
[ 1720.539586] [] __riscv_sys_ioctl+0x7c/0x8e
[ 1720.539593] [] do_trap_ecall_u+0xbe/0x130
[ 1720.539600] [] ret_from_exception+0x0/0x64
[ 1720.539610] —[ end trace 0000000000000000 ]—
If I look into the 6.6 kernel sources at the relevant line, I can see a atomic beeing used (linux/drivers/media/common/videobuf2/videobuf2-core.c at v6.6 · torvalds/linux · GitHub)… running dmesg | grep atomic
yields this, which looks suspicious to me: [ 25.431796] broken atomic modeset userspace detected, disabling atomic
…
but this is where I don’t know what else to do.
Does anyone would have an idea how I can get my camera working? Any help would be mutch apreceated!