Thank you for your reply!
The tc358840 driver is include in LT4 using kernel 4.4 but Jestson NANO is using Kernel 4.9 now.
We have some question about driver implementation.
- Use tegra_media_entity_init() or media_entity_pads_init()?
- How to set parameter is_subdev and is_sensor with tegra_media_entity_init() ?
- Is the implementation of v4l2_subdev_internal_ops->open() necessary?
After modify device tree and driver(I put the modified device tree in the attachment), kernel panic after running capture command
tegra210-it6510_delete_node_pltfrm.dtsi (1.6 KB)
sudo v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RGB888 --stream-mmap --stream-count=100 --set-ctrl bypass_mode=0 -d /dev/video0
it seems we need modify something for tegra-camera-platform?
[ 98.112623] Unable to handle kernel read from unreadable memory at virtual address 000000a0
[ 98.122279] Mem abort info:
[ 98.125095] ESR = 0x96000005
[ 98.128162] Exception class = DABT (current EL), IL = 32 bits
[ 98.134084] SET = 0, FnV = 0
[ 98.137144] EA = 0, S1PTW = 0
[ 98.140290] Data abort info:
[ 98.143177] ISV = 0, ISS = 0x00000005
[ 98.147001] CM = 0, WnR = 0
[ 98.149977] user pgtable: 4k pages, 39-bit VAs, pgd = ffffffc09b820000
[ 98.156505] [00000000000000a0] *pgd=0000000000000000, *pud=0000000000000000
[ 98.164968] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[ 98.170525] Modules linked in: fuse zram userspace_alert overlay it6510 nvgpu ip_tables x_tables [last unloaded: gpio_bb]
[ 98.181536] CPU: 1 PID: 7142 Comm: vi-output, it65 Not tainted 4.9.253-tegra #47
[ 98.188914] Hardware name: NVIDIA Jetson Nano Developer Kit (DT)
[ 98.194904] task: ffffffc0f9177000 task.stack: ffffffc093610000
[ 98.200813] PC is at tegra_camera_update_clknbw+0x28/0x2a8
[ 98.206286] LR is at tegra_channel_set_stream+0x1a8/0x4f0
[ 98.211670] pc : [] lr : [] pstate: 20400045
[ 98.219046] sp : ffffffc093613c90
[ 98.222349] x29: ffffffc093613c90 x28: 0000000000000001
[ 98.227661] x27: ffffffc0f6c22018 x26: ffffffc0f6c228a0
[ 98.232973] x25: ffffffc0f6c22818 x24: 0000000000000001
[ 98.238283] x23: ffffffc0f6c22018 x22: ffffffc0f6c228a0
[ 98.243595] x21: 0000000000000001 x20: 0000000000000000
[ 98.248906] x19: ffffffc0f6c22018 x18: 0000000000000000
[ 98.254218] x17: 0000000000000001 x16: 0000000000000000
[ 98.259527] x15: 000000000000008c x14: 0000000002b513fc
[ 98.264839] x13: 00000000000014d6 x12: ffffffc0fa7baa00
[ 98.270149] x11: 000000000000000b x10: 0000000000000a10
[ 98.275460] x9 : ffffffc093613d70 x8 : ffffffc0f9177a70
[ 98.280772] x7 : fefefeff646c606d x6 : 00000000781dd0ff
[ 98.286084] x5 : ffffffc0f6c2251c x4 : 0000000000000000
[ 98.291395] x3 : 0000000000000008 x2 : ffffffc0f6c22018
[ 98.296706] x1 : 0000000000000001 x0 : 0000000000000000
[ 98.303500] Process vi-output, it65 (pid: 7142, stack limit = 0xffffffc093610000)
[ 98.310963] Call trace:
[ 98.313402] [] tegra_camera_update_clknbw+0x28/0x2a8
[ 98.319914] [] tegra_channel_set_stream+0x1a8/0x4f0
[ 98.326338] [] tegra_channel_kthread_capture_start+0x7f8/0x9e0
[ 98.333717] [] kthread+0xec/0xf0
[ 98.338494] [] ret_from_fork+0x10/0x30
[ 98.343793] —[ end trace 8bde0ee4758787a8 ]—
[ 102.452862] Unable to handle kernel read from unreadable memory at virtual address 00000000
[ 102.461467] Mem abort info:
[ 102.464491] ESR = 0x96000005
[ 102.467646] Exception class = DABT (current EL), IL = 32 bits
[ 102.473615] SET = 0, FnV = 0
[ 102.476693] EA = 0, S1PTW = 0
[ 102.479844] Data abort info:
[ 102.482716] ISV = 0, ISS = 0x00000005
[ 102.486556] CM = 0, WnR = 0
[ 102.489532] user pgtable: 4k pages, 39-bit VAs, pgd = ffffffc0ed681000
[ 102.496063] [0000000000000000] *pgd=0000000000000000, *pud=0000000000000000
[ 102.503047] Internal error: Oops: 96000005 [#2] PREEMPT SMP
[ 102.508643] Modules linked in: fuse zram userspace_alert overlay it6510 nvgpu ip_tables x_tables [last unloaded: gpio_bb]
[ 102.520136] CPU: 2 PID: 7141 Comm: v4l2-ctl Tainted: G D 4.9.253-tegra #47
[ 102.528194] Hardware name: NVIDIA Jetson Nano Developer Kit (DT)
[ 102.534262] task: ffffffc093632a00 task.stack: ffffffc0f2d74000
[ 102.540281] PC is at __ll_sc_atomic_sub_return+0x4/0x20
[ 102.545579] LR is at exit_creds+0x2c/0x78
[ 102.549657] pc : [] lr : [] pstate: 60400045
[ 102.557094] sp : ffffffc0f2d779b0
[ 102.560458] x29: ffffffc0f2d779b0 x28: ffffffc093632a00
[ 102.565917] x27: ffffff8008f32000 x26: ffffffc0f6c22018
[ 102.571366] x25: ffffffc0a3a5ede8 x24: ffffffc0f3342830
[ 102.576817] x23: 0000000000000001 x22: ffffffc0f6c22018
[ 102.582261] x21: ffffffc0f9177030 x20: 000000000000000b
[ 102.587704] x19: ffffffc0f9177000 x18: 00000000ffffffff
[ 102.593143] x17: 0000000000000000 x16: 000000000000009f
[ 102.598579] x15: 0000000000000001 x14: ffffff8008f399f8
[ 102.604017] x13: 0000000000000000 x12: 00000000ffffffff
[ 102.609453] x11: ffffffc0a3a5ed80 x10: 00000000000000ba
[ 102.614893] x9 : 0000000000000001 x8 : 0000000000000000
[ 102.620332] x7 : 000000007f200000 x6 : ffffffc093632a00
[ 102.625768] x5 : 0000000000000800 x4 : 0000000000000000
[ 102.631200] x3 : 000000000000009f x2 : 0000000000000000
[ 102.636633] x1 : 0000000000000000 x0 : 0000000000000001
[ 102.643625] Process v4l2-ctl (pid: 7141, stack limit = 0xffffffc0f2d74000)
[ 102.650544] Call trace:
[ 102.653084] [] __ll_sc_atomic_sub_return+0x4/0x20
[ 102.659424] [] __put_task_struct+0x4c/0x140
[ 102.665238] [] kthread_stop+0x1e4/0x1e8
[ 102.670712] [] vi2_channel_stop_streaming+0xe0/0x658
[ 102.677316] [] tegra_channel_stop_streaming+0x34/0x48
[ 102.683992] [] __vb2_queue_cancel+0x34/0x188
[ 102.689885] [] vb2_core_queue_release+0x2c/0x58
[ 102.696038] [] _vb2_fop_release+0x84/0xa0
[ 102.701678] [] tegra_channel_close+0x64/0x140
[ 102.707675] [] v4l2_release+0x48/0xa0
[ 102.712977] [] __fput+0x90/0x1d0
[ 102.717835] [] ____fput+0x20/0x30
[ 102.722788] [] task_work_run+0xbc/0xd8
[ 102.728168] [] do_exit+0x2e0/0xa88
[ 102.733199] [] do_group_exit+0x40/0xa8
[ 102.738580] [] get_signal+0xbc/0x750
[ 102.743790] [] do_signal+0x130/0x500
[ 102.748992] [] do_notify_resume+0x90/0xb0
[ 102.754625] [] work_pending+0x8/0x10
[ 102.759837] —[ end trace 8bde0ee4758787a9 ]—
[ 102.899659] Fixing recursive fault but reboot is needed!
[ 125.067485] Bridge firewalling registered
[ 125.091334] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[ 125.487678] Netfilter messages via NETLINK v0.30.
[ 125.494436] ctnetlink v0.93: registering with nfnetlink.
[ 125.706552] IPv6: ADDRCONF(NETDEV_UP): docker0: link is not ready