参考网上的教程, 加载 ko文件后,出现了video0, 运行camerademo 无法选择摄像头,出现以下的异常,请问这是什么原因导致的?
加载ko log:
[ 21.396824] [VIN_WARN]sensor_helper_probe: cannot get sensor0_cameravdd supply, setting it to NULL!
[ 21.407049] [VIN_WARN]sensor_helper_probe: cannot get sensor0_iovdd supply, setting it to NULL!
[ 21.417898] [VIN_WARN]sensor_helper_probe: cannot get sensor0_avdd supply, setting it to NULL!
[ 21.427582] [VIN_WARN]sensor_helper_probe: cannot get sensor0_dvdd supply, setting it to NULL!
[ 21.461295] sun8iw20-pinctrl 2000000.pinctrl: pin PE11 already requested by 2000000.pinctrl:139; cannot claim for 5801000.csi
[ 21.474091] sun8iw20-pinctrl 2000000.pinctrl: pin-139 (5801000.csi) status -22
[ 21.482211] sun8iw20-pinctrl 2000000.pinctrl: could not request pin 139 (PE11) from group PE11 on device 2000000.pinctrl
[ 21.494522] vin_csi 5801000.csi: Error applying setting, reverse things back
[ 21.502502] vin_csi: probe of 5801000.csi failed with error -22
[ 21.509607] [VIN_ERR]failed to get ISP IRQ resource
[ 21.515090] [VIN_ERR]isp probe err!
[ 21.519784] [VIN_ERR]failed to get ISP IRQ resource
[ 21.525264] [VIN_ERR]isp probe err!
[ 21.532014] sunxi-vin-core 5809000.vinc: Adding to iommu group 0
[ 21.542123] [VIN_WARN]get csi isp clk fail
[ 21.546788] [VIN_WARN]get csi isp src clk fail
[ 21.551793] [VIN_WARN]get csi mipi clk fail
[ 21.556495] [VIN_WARN]get csi mipi src clk fail
[ 21.561600] [VIN_WARN]get csi isp mbus clk fail
[ 21.566700] [VIN_WARN]Get isp reset control fail
[ 21.573441] [ov5640]PWR_ON!
[ 21.633397] [ov5640]V4L2_IDENT_SENSOR = 5640
[ 21.683752] [ov5640]PWR_OFF!
[ 21.699603] [VIN]vinc1 is null
[ 21.703061] [VIN_ERR]Bt.601 Pipeline csi subdev is NULL, DevID is 0
[ 21.710112] [VIN_ERR]media_entity_find_link null
运行camerademo log:
[CAMERA] open /dev/video0!
[CAMERA]******[ 68.415932] pgd = f0308176
****************************************************
[CAMERA]**********************************************************
[CAMER[ 68.430050] [000000dd] *pgd=00000000
A] The path to data saving is /mnt/UDISK.
[CAMERA] The number of captured photos is 5.
[CAMERA] save bmp format
[CAMERA] ----[ 68.445166] Internal error: : 1 [#1] PREEMPT SMP ARM
[ 68.461783] Modules linked in: vin_v4l2 ov5640 vin_io videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops sunxi_gpadc
[ 68.474092] CPU: 0 PID: 219 Comm: camerademo Not tainted 5.4.61 #123
[ 68.481216] Hardware name: Generic DT based system
[ 68.486597] PC is at atomic_cmpxchg_relaxed+0x10/0x28
[ 68.492261] LR is at atomic_cmpxchg_relaxed+0xc/0x28
[ 68.497826] pc : [<c014c394>] lr : [<c014c390>] psr: 20000013
[ 68.504853] sp : c6b57d78 ip : 0000000c fp : c75a2780
[ 68.510709] r10: c74257bc r9 : 00000000 r8 : 00000000
[ 68.516567] r7 : 00000000 r6 : c7426040 r5 : 000000dd r4 : c6b57d88
[ 68.523886] r3 : 000000dd r2 : c7473000 r1 : 00000000 r0 : 000000dd
[ 68.531207] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 68.539208] Control: 10c5387d Table: 46b4c06a DAC: 00000051
[ 68.545651] Process camerademo (pid: 219, stack limit = 0x6b285f9b)
[ 68.552678] Stack: (0xc6b57d78 to 0xc6b58000)
[ 68.557563] 7d60: c6b57d88 c014c6f0
[ 68.566739] 7d80: c6b56000 c06c0f3c 00000000 504897fe 00000000 c6bad420 00000001 c048a000
[ 68.575915] 7da0: c6bad420 c6bad400 c7426040 bf03bdfc 00000000 c7425000 c7426040 bf03e594
[ 68.585092] 7dc0: 00000000 00000000 c7425108 c04920f4 c0045627 c0735d24 c74257bc c04926a8
[ 68.594268] 7de0: c68e0c00 00000fff 00000002 c6b57e5c bf0467d4 c75a2780 00000000 c6aafb00
[ 68.603444] 7e00: c68e0d90 c6b24428 00000051 c6b57e5c c0045627 504897fe 00000004 00000000
[ 68.612620] 7e20: 00000000 c0492478 00000000 c0045627 c6b57e5c 00000004 00000000 c0492fd0
[ 68.621796] 7e40: c014800c 00000000 bee727a8 c6aafb00 00000003 00000000 c6b56000 00000000
[ 68.630972] 7e60: 00000001 c01483d8 00000000 00000001 00000000 00000000 00000000 00000000
[ 68.640147] 7e80: 00000000 504897fe 00000001 c6a89b08 c76a73e8 00000002 c6b57f70 00000000
[ 68.649323] 7ea0: 00000002 00000000 0045ff3c c01c9500 00000000 00000000 00000027 504897fe
[ 68.658500] 7ec0: c6b57ef4 c6b56000 c6a89b00 00000027 c6b57ef4 c6b57f70 00000002 504897fe
[ 68.667676] 7ee0: 0045ff3c bee727a8 c6b24428 c6aafb00 c0045627 c6b56000 c6b56000 00000036
[ 68.676853] 7f00: 0045ff3c c01da624 bee727a8 c01dae34 00000026 bee72547 00000001 c01c3b90
[ 68.686029] 7f20: 00000020 c6aafb08 c6b24428 c748a000 00000000 504897fe c6b24428 00000003
[ 68.695206] 7f40: c6aafb00 00000020 c6b56000 504897fe c6a89b00 c6b57f70 c6a89b00 00000000
[ 68.704381] 7f60: c6a89b00 504897fe 00000000 c6aafb00 00000003 c6aafb00 c0045627 bee727a8
[ 68.713557] 7f80: c6b56000 00000036 0045ff3c c01db4b8 bee727a8 bee728e0 bee72848 00000036
[ 68.722724] 7fa0: c0101228 c0101000 bee727a8 bee728e0 00000003 c0045627 bee727a8 bee72558
[ 68.731901] 7fc0: bee727a8 bee728e0 bee72848 00000036 00000001 bee72748 0044cf8a 0045ff3c
[ 68.741077] 7fe0: 0045ff48 bee72540 004470e0 b6ee9440 60000010 00000003 00000000 00000000
[ 68.750256] [<c014c394>] (atomic_cmpxchg_relaxed) from [<c014c6f0>] (atomic_try_cmpxchg_acquire.constprop.10+0x10/0x28)
[ 68.762363] [<c014c6f0>] (atomic_try_cmpxchg_acquire.constprop.10) from [<c06c0f3c>] (mutex_lock+0x30/0x5c)
[ 68.773300] [<c06c0f3c>] (mutex_lock) from [<c048a000>] (media_entity_setup_link+0x18/0x3c)
[ 68.782756] [<c048a000>] (media_entity_setup_link) from [<bf03bdfc>] (vidioc_g_parm+0xe8/0x1f4 [vin_v4l2])
[ 68.793685] [<bf03bdfc>] (vidioc_g_parm [vin_v4l2]) from [<bf03e594>] (vidioc_s_input+0x64/0x368 [vin_v4l2])
[ 68.804762] [<bf03e594>] (vidioc_s_input [vin_v4l2]) from [<c04926a8>] (__video_do_ioctl+0x230/0x3ac)
[ 68.815111] [<c04926a8>] (__video_do_ioctl) from [<c0492fd0>] (video_usercopy+0x138/0x364)
[ 68.824389] [<c0492fd0>] (video_usercopy) from [<c01da624>] (vfs_ioctl+0x28/0x3c)
[ 68.832788] [<c01da624>] (vfs_ioctl) from [<c01dae34>] (do_vfs_ioctl+0x98/0x6e4)
[ 68.841088] [<c01dae34>] (do_vfs_ioctl) from [<c01db4b8>] (ksys_ioctl+0x38/0x54)
[ 68.849389] [<c01db4b8>] (ksys_ioctl) from [<c0101000>] (ret_fast_syscall+0x0/0x54)
[ 68.857976] Exception stack(0xc6b57fa8 to 0xc6b57ff0)
[ 68.863642] 7fa0: bee727a8 bee728e0 00000003 c0045627 bee727a8 bee72558
[ 68.872819] 7fc0: bee727a8 bee728e0 bee72848 00000036 00000001 bee72748 0044cf8a 0045ff3c
[ 68.881992] 7fe0: 0045ff48 bee72540 004470e0 b6ee9440
[ 68.887660] Code: e92d4010 e1a03000 ebfffffa e1930f9f (e3a0c000)
[ 68.894594] ---[ end trace 3493c285f38d303e ]---
代码错误处:
if (**ioctl(camera.videofd, VIDIOC_S_INPUT, &inp)** < 0) {
camera_err(" VIDIOC_S_INPUT failed! s_input: %d\n", inp.index);
close(camera.videofd);
return -1;
}