HI
I want to support two cameras on tx2 devboard, I have modified following code and resolved incompitable issue of MEDIA_BUS_FMT_YUYV8_2X8,However, when I config MEDIA_BUS_FMT_Y8_1X8, the kernal is corrupt.
I have added on: /drivers/media/platform/tegra/camera/camera_common.c
{
MEDIA_BUS_FMT_YUYV8_2X8,
V4L2_COLORSPACE_SMPTE240M,
V4L2_PIX_FMT_YUYV,
},
{
MEDIA_BUS_FMT_Y8_1X8,
V4L2_COLORSPACE_SMPTE170M,
V4L2_PIX_FMT_GREY,
},
Here are the error:
[ 7.003110] #0: tegra-hda at 0x3518000 irq 400
[ 7.003111] #1: tegra-snd-t186ref-mobile-rt565x
[ 7.004301] tegra-vi4 15700000.vi: initialized
[ 7.005686] Unable to handle kernel NULL pointer dereference at virtual address 0000001c
[ 7.005688] pgd = ffffffc001442000
[ 7.005693] [0000001c] *pgd=000000026cdd6003, *pud=000000026cdd6003, *pmd=000000026cdd7003, *pte=00e8000003881707
[ 7.005696] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[ 7.005698] Modules linked in:
[ 7.005702] CPU: 0 PID: 115 Comm: kworker/u12:2 Not tainted 4.4.38 #28
[ 7.005703] Hardware name: quill (DT)
[ 7.005709] Workqueue: events_unbound async_run_entry_fn
[ 7.005711] task: ffffffc1eaf27080 ti: ffffffc1ea928000 task.ti: ffffffc1ea928000
[ 7.005716] PC is at tegra_channel_fmts_bitmap_init+0x190/0x1f4
[ 7.005718] LR is at tegra_channel_fmts_bitmap_init+0x150/0x1f4
[ 7.005719] pc : [<ffffffc00076b3ec>] lr : [<ffffffc00076b3ac>] pstate: 60000045
[ 7.005720] sp : ffffffc1ea92b8d0
[ 7.005722] x29: ffffffc1ea92b8d0 x28: 0000000000000018
[ 7.005724] x27: ffffffc000fb0290 x26: ffffffc000fb0298
[ 7.005726] x25: ffffffc1eab76660 x24: ffffffc1eab76660
[ 7.005728] x23: ffffffc1ecdecb80 x22: ffffffc1ecdec018
[ 7.005729] x21: ffffffc1ea92b968 x20: 0000000000003012
[ 7.005731] x19: 00000000ffffffff x18: 0000000000000000
[ 7.005733] x17: ffffffc000b13a60 x16: ffffffc000b13a60
[ 7.005734] x15: 00000000fa83b2da x14: 0ffffffffffffffe
[ 7.005736] x13: 0000000000000020 x12: 0101010101010101
[ 7.005737] x11: 7f7f7f7f7f7f7f7f x10: fefefeff642f2f2f
[ 7.005739] x9 : 7f7f7f7f7f7f7f7f x8 : 0000000000000001
[ 7.005741] x7 : 0000000000000000 x6 : 0000000000000000
[ 7.005742] x5 : 0000000000000014 x4 : 0000000000000000
[ 7.005744] x3 : ffffffc1ecdec0b8 x2 : 00000000000001e0
[ 7.005745] x1 : 0000000000000280 x0 : 0000000000000000
[ 7.005745]
[ 7.005747] Process kworker/u12:2 (pid: 115, stack limit = 0xffffffc1ea928020)
[ 7.005748] Call trace:
[ 7.005750] [<ffffffc00076b3ec>] tegra_channel_fmts_bitmap_init+0x190/0x1f4
[ 7.005753] [<ffffffc00076c404>] tegra_channel_init_subdevices+0x12c/0x2c0
[ 7.005756] [<ffffffc00076d420>] tegra_vi_graph_notify_complete+0x44c/0x6a4
[ 7.005761] [<ffffffc00075dcd4>] v4l2_async_test_notify+0xfc/0x114
[ 7.005763] [<ffffffc00075de1c>] v4l2_async_notifier_register+0x130/0x194
[ 7.005765] [<ffffffc00076dc1c>] tegra_vi_graph_init+0xf0/0x19c
[ 7.005768] [<ffffffc00076a418>] tegra_vi_media_controller_init+0x188/0x1f8
[ 7.005772] [<ffffffc0008d7b04>] tegra_vi4_probe+0x1f8/0x2c0
[ 7.005776] [<ffffffc00054a400>] platform_drv_probe+0x50/0xbc
[ 7.005778] [<ffffffc000547e90>] driver_probe_device+0xc8/0x408
[ 7.005780] [<ffffffc00054826c>] __driver_attach+0x9c/0xa0
[ 7.005783] [<ffffffc000545f0c>] bus_for_each_dev+0x58/0x98
[ 7.005784] [<ffffffc000547938>] driver_attach+0x20/0x28
[ 7.005786] [<ffffffc0005463c8>] driver_attach_async+0x14/0x50
[ 7.005788] [<ffffffc0000c4264>] async_run_entry_fn+0x44/0x180
[ 7.005791] [<ffffffc0000bbc24>] process_one_work+0x154/0x434
[ 7.005792] [<ffffffc0000bc038>] worker_thread+0x134/0x40c
[ 7.005794] [<ffffffc0000c18c8>] kthread+0xe0/0xf4
[ 7.005797] [<ffffffc000084f90>] ret_from_fork+0x10/0x40
[ 7.005799] ---[ end trace f13605d0a5b20854 ]---
[ 7.006973] Unable to handle kernel paging request at virtual address ffffffffffffffd8
[ 7.006973] pgd = ffffffc001442000
[ 7.006976] [ffffffffffffffd8] *pgd=0000000000000000, *pud=0000000000000000
[ 7.006977] Internal error: Oops: 96000005 [#2] PREEMPT SMP
[ 7.006979] Modules linked in:
[ 7.006981] CPU: 0 PID: 115 Comm: kworker/u12:2 Tainted: G D 4.4.38 #28
[ 7.006982] Hardware name: quill (DT)
[ 7.006987] task: ffffffc1eaf27080 ti: ffffffc1ea928000 task.ti: ffffffc1ea928000
[ 7.006990] PC is at kthread_data+0x4/0xc
[ 7.006992] LR is at wq_worker_sleeping+0x10/0xc4
[ 7.006993] pc : [<ffffffc0000c1f90>] lr : [<ffffffc0000bcae4>] pstate: 600000c5
[ 7.006994] sp : ffffffc1ea92b4c0
[ 7.006996] x29: ffffffc1ea92b4c0 x28: ffffffc1ea928000
[ 7.006997] x27: ffffffc000fb0290 x26: ffffffc0011e5000
[ 7.006999] x25: 0000000000000000 x24: ffffffc000b04898
[ 7.007001] x23: 0000000000000000 x22: ffffffc1eaf27610
[ 7.007002] x21: ffffffc0011b6000 x20: ffffffc1eaf27080
[ 7.007004] x19: ffffffc1f5d6a500 x18: ffffffc000b83f38
[ 7.007005] x17: 000000000000000e x16: 0000000000000007
[ 7.007007] x15: 0000000000000001 x14: 0000000000000007
[ 7.007008] x13: 000000000000000e x12: 0000000000000013
[ 7.007010] x11: 000000000000001a x10: 000000000023dff7
[ 7.007011] x9 : 000000000023dff7 x8 : 0000000000000400
[ 7.007013] x7 : 0000000000000000 x6 : 0000000000a57cad
[ 7.007014] x5 : ffffffc1f5d6a500 x4 : ffffffc1f5d6aee0
[ 7.007016] x3 : 000000000001af3b x2 : ffffffc1ecc03000
[ 7.007017] x1 : 0000000000000000 x0 : 0000000000000000
[ 7.007018]
[ 7.007019] Process kworker/u12:2 (pid: 115, stack limit = 0xffffffc1ea928020)
[ 7.007019] Call trace:
[ 7.007021] [<ffffffc0000c1f90>] kthread_data+0x4/0xc
[ 7.007025] [<ffffffc000b044c8>] __schedule+0x348/0x6d4
[ 7.007027] [<ffffffc000b04898>] schedule+0x44/0xa8
[ 7.007029] [<ffffffc0000a6bc8>] do_exit+0x5b0/0x9a0
[ 7.007032] [<ffffffc000089bcc>] bug_handler.part.3+0x0/0x7c
[ 7.007036] [<ffffffc00009c780>] __do_kernel_fault.part.7+0x74/0x84
[ 7.007038] [<ffffffc00009a8f8>] do_page_fault+0x350/0x444
[ 7.007040] [<ffffffc00009aaac>] do_translation_fault+0xc0/0xf0
[ 7.007042] [<ffffffc00008139c>] do_mem_abort+0x40/0xa0
[ 7.007044] [<ffffffc000084540>] el1_da+0x18/0x78
[ 7.007047] [<ffffffc00076c404>] tegra_channel_init_subdevices+0x12c/0x2c0
[ 7.007049] [<ffffffc00076d420>] tegra_vi_graph_notify_complete+0x44c/0x6a4
[ 7.007052] [<ffffffc00075dcd4>] v4l2_async_test_notify+0xfc/0x114
[ 7.007054] [<ffffffc00075de1c>] v4l2_async_notifier_register+0x130/0x194
[ 7.007056] [<ffffffc00076dc1c>] tegra_vi_graph_init+0xf0/0x19c
[ 7.007058] [<ffffffc00076a418>] tegra_vi_media_controller_init+0x188/0x1f8
[ 7.007060] [<ffffffc0008d7b04>] tegra_vi4_probe+0x1f8/0x2c0
[ 7.007062] [<ffffffc00054a400>] platform_drv_probe+0x50/0xbc
[ 7.007063] [<ffffffc000547e90>] driver_probe_device+0xc8/0x408
[ 7.007065] [<ffffffc00054826c>] __driver_attach+0x9c/0xa0
[ 7.007067] [<ffffffc000545f0c>] bus_for_each_dev+0x58/0x98
[ 7.007068] [<ffffffc000547938>] driver_attach+0x20/0x28
[ 7.007070] [<ffffffc0005463c8>] driver_attach_async+0x14/0x50
[ 7.007072] [<ffffffc0000c4264>] async_run_entry_fn+0x44/0x180
[ 7.007074] [<ffffffc0000bbc24>] process_one_work+0x154/0x434
[ 7.007075] [<ffffffc0000bc038>] worker_thread+0x134/0x40c
[ 7.007077] [<ffffffc0000c18c8>] kthread+0xe0/0xf4
[ 7.007079] [<ffffffc000084f90>] ret_from_fork+0x10/0x40
[ 7.007080] ---[ end trace f13605d0a5b20855 ]---
[ 7.008212] Fixing recursive fault but reboot is needed!
[ 11.050088] random: nonblocking pool is initialized
Could anyone kindly advise if I should modify anywhere else to make TX2 support MEDIA_BUS_FMT_Y8_1X8?
Thank You