I tried to build a driver for another ov sensor og02b10
The driver seems loading correctly but when I try to get image from the sensor using v4l2-ctl I got kernel error
Opening in BLOCKING MODE
VIDIOC_QUERYCAP: ok
VIDIOC_S_EXT_CTRLS: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
Width/Height : 1600/1300
Pixel Format : 'RG10'
Field : None
Bytes per Line : 3200
Size Image : 4160000
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
VIDIOC_REQBUFS: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_STREAMON: ok
and it stuck here.
the dmesg error shows:
[ 6649.251584] og02b10 6-0010: og02b10_power_off: power off
[ 6649.272323] og02b10 6-0010: og02b10_power_on: power on
[ 6649.458655] Unable to handle kernel read from unreadable memory at virtual address 000000a0
[ 6649.467027] Mem abort info:
[ 6649.469813] ESR = 0x96000005
[ 6649.472881] Exception class = DABT (current EL), IL = 32 bits
[ 6649.478838] SET = 0, FnV = 0
[ 6649.481888] EA = 0, S1PTW = 0
[ 6649.485036] Data abort info:
[ 6649.487928] ISV = 0, ISS = 0x00000005
[ 6649.491769] CM = 0, WnR = 0
[ 6649.494745] user pgtable: 4k pages, 39-bit VAs, pgd = ffffffc0eaad1000
[ 6649.501275] [00000000000000a0] *pgd=0000000000000000, *pud=0000000000000000
[ 6649.508265] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[ 6649.513824] Modules linked in: fuse overlay zram binfmt_misc nvgpu bluedroid_pm ip_tables x_tables
[ 6649.522969] CPU: 3 PID: 9018 Comm: vi-output, og02 Not tainted 4.9.140-tegra #30
[ 6649.530376] Hardware name: NVIDIA Jetson Nano Developer Kit (DT)
[ 6649.536398] task: ffffffc0f29b8000 task.stack: ffffffc0be294000
[ 6649.542368] PC is at tegra_camera_update_clknbw+0x28/0x2a8
[ 6649.547895] LR is at tegra_channel_set_stream+0x1a8/0x4c8
[ 6649.553325] pc : [<ffffff8008529fe0>] lr : [<ffffff8008b2e048>] pstate: 20400045
[ 6649.560736] sp : ffffffc0be297c80
[ 6649.564076] x29: ffffffc0be297c80 x28: ffffffc0f97b1e28
[ 6649.569451] x27: ffffffc0f97b1018 x26: 0000000000000000
[ 6649.574828] x25: 0000000000000001 x24: 0000000000000001
[ 6649.580244] x23: ffffffc0f97b1018 x22: ffffffc0be297dec
[ 6649.585690] x21: 0000000000000001 x20: 0000000000000000
[ 6649.591134] x19: ffffffc0f97b1018 x18: 0000000000000000
[ 6649.596574] x17: 0000000000000001 x16: 0000000000000000
[ 6649.602015] x15: 0000000000000000 x14: ffffffc0fa7bc600
[ 6649.607459] x13: 00000040f5801000 x12: 0000000034d5d91d
[ 6649.612905] x11: 000000000000000b x10: 0000000000000a20
[ 6649.618346] x9 : ffffffc0be297d70 x8 : ffffffc0f29b8a80
[ 6649.623787] x7 : 0000000000085c00 x6 : 00000000000efc00
[ 6649.629230] x5 : 000000000000000f x4 : 0000000000000000
[ 6649.634672] x3 : 0000000000000008 x2 : ffffffc0f97b1018
[ 6649.640115] x1 : 0000000000000001 x0 : 0000000000000000
[ 6649.647126] Process vi-output, og02 (pid: 9018, stack limit = 0xffffffc0be294000)
[ 6649.654679] Call trace:
[ 6649.657227] [<ffffff8008529fe0>] tegra_camera_update_clknbw+0x28/0x2a8
[ 6649.663841] [<ffffff8008b2e048>] tegra_channel_set_stream+0x1a8/0x4c8
[ 6649.670367] [<ffffff8008b309e8>] tegra_channel_enable_stream+0x48/0x60
[ 6649.676976] [<ffffff8008b32390>] tegra_channel_kthread_capture_start+0x760/0x8b0
[ 6649.684461] [<ffffff80080dbee4>] kthread+0xec/0xf0
[ 6649.689339] [<ffffff8008083850>] ret_from_fork+0x10/0x40
[ 6649.694745] ---[ end trace 82c7752a97d9c5b8 ]---
How can I debug this kind of error. Where I can start? thanks,