Rear camera issues and kernel oopsing
Hey, running Byzantium with this kernel: https://source.puri.sm/sebastian.krzyszkowiak/linux-next/-/jobs/346877/artifacts/raw/debian/output/linux-image-5.12.0-1-librem5_5.12.1pureos1+gitlabci1_arm64.deb
I set the camera parameters:
purism@poseidon:~$ v4l2-ctl --device=/dev/video1 --set-fmt-video=width=2000,height=2000,pixelformat=GRBG
When trying to take a picture with
purism@poseidon:~$ v4l2-ctl --device=/dev/video1 --stream-mmap --stream-to=frame.raw --stream-count=1
the command never returns (I can SIGTERM it though, but that leaves a file with 0 byte size).
Looking at dmesg I see a lot of oopses or something:
[ 2143.565408] ------------[ cut here ]------------
[ 2143.565429] WARNING: CPU: 3 PID: 13352 at drivers/media/common/videobuf2/videobuf2-core.c:806 vb2_core_reqbufs+0x150/0x480 [videobuf2_common]
[ 2143.565468] Modules linked in: aes_ce_ccm rfcomm algif_hash algif_skcipher af_alg bnep mousedev caam_jr caamhash_desc caamalg_desc crypto_engine ofpart spi_nor mtd uas redpine_sdio redpine_91x bluetooth mac80211 usb_storage st_lsm6dsx_spi hi846 cfg80211 edt_ft5x06 snd_soc_wm8962 mx6s_capture videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 vcnl4000 st_lsm6dsx_i2c st_lsm6dsx s5k3l6xx dw9714 videobuf2_common industrialio_triggered_buffer tps6598x bq25890_charger kfifo_buf mxc_mipi_csi2_yav gnss_mtk gnss_serial v4l2_fwnode typec gnss videodev leds_lm3560 mc caam error snvs_pwrkey snd_soc_fsl_sai imx_pcm_dma snd_soc_simple_card snd_soc_gtm601 snd_soc_simple_card_utils imx2_wdt watchdog aes_ce_blk snd_soc_core crypto_simd imx_sdma virt_dma crct10dif_ce snd_pcm_dmaengine ghash_ce snd_pcm sha2_ce pwm_vibra snd_timer sha1_ce snd soundcore rfkill_hks rfkill ledtrig_timer usb_f_acm u_serial usb_f_rndis g_multi usb_f_mass_storage u_ether libcomposite ledtrig_pattern fuse ip_tables x_tables
[ 2143.565715] ipv6 xhci_plat_hcd xhci_hcd usbcore dwc3 ulpi udc_core roles usb_common cdns_mhdp_imx phy_fsl_imx8mq_usb cdns_mhdp_drmcore imx_dcss clk_bd718x7
[ 2143.565761] CPU: 3 PID: 13352 Comm: v4l2-ctl Tainted: G W 5.12.0-1-librem5 #1
[ 2143.565769] Hardware name: Purism Librem 5r4 (DT)
[ 2143.565774] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--)
[ 2143.565780] pc : vb2_core_reqbufs+0x150/0x480 [videobuf2_common]
[ 2143.565800] lr : vb2_core_reqbufs+0x118/0x480 [videobuf2_common]
[ 2143.565818] sp : ffff800013a93ae0
[ 2143.565822] x29: ffff800013a93ae0 x28: ffff000019d85280
[ 2143.565831] x27: ffff000027756200 x26: 0000000000000001
[ 2143.565839] x25: ffff0000be547c30 x24: ffff800013a93d58
[ 2143.565848] x23: 0000000000000000 x22: ffff800011428908
[ 2143.565856] x21: ffff0000be547978 x20: 0000000000000000
[ 2143.565864] x19: ffff0000be547910 x18: 0000000000000000
[ 2143.565873] x17: 0000000000000000 x16: 0000000000000000
[ 2143.565881] x15: 0000000000000000 x14: 0000000000000000
[ 2143.565889] x13: 0000000000000000 x12: 0000000000000000
[ 2143.565897] x11: 0000000000000000 x10: 0000000000000000
[ 2143.565905] x9 : ffff800009002fd8 x8 : 0000000000000000
[ 2143.565913] x7 : 0000000000000000 x6 : 0000000000000000
[ 2143.565921] x5 : ffff800009039350 x4 : ffff0000be547978
[ 2143.565930] x3 : 0000000000000001 x2 : 0000000000000000
[ 2143.565938] x1 : 0000000000000001 x0 : 0000000000000000
[ 2143.565947] Call trace:
[ 2143.565951] vb2_core_reqbufs+0x150/0x480 [videobuf2_common]
[ 2143.565970] vb2_reqbufs+0x68/0x88 [videobuf2_v4l2]
[ 2143.565989] mx6s_vidioc_reqbufs+0x48/0x68 [mx6s_capture]
[ 2143.566007] v4l_reqbufs+0x54/0x68 [videodev]
[ 2143.566086] __video_do_ioctl+0x18c/0x3e0 [videodev]
[ 2143.566139] video_usercopy+0x168/0x6f0 [videodev]
[ 2143.566192] video_ioctl2+0x20/0x38 [videodev]
[ 2143.566246] v4l2_ioctl+0x48/0x68 [videodev]
[ 2143.566300] __arm64_sys_ioctl+0xb0/0xf0
[ 2143.566312] el0_svc_common.constprop.2+0x94/0x130
[ 2143.566324] do_el0_svc+0x24/0x30
[ 2143.566332] el0_svc+0x24/0x38
[ 2143.566342] el0_sync_handler+0x90/0xb8
[ 2143.566350] el0_sync+0x154/0x180
[ 2143.566358] ---[ end trace 3bc1f86aceda205e ]---
and a few more above that (this was most recent) a full log is attached here: dmesg_cam.log