This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

dm8168 VIP0 capture with 640X480 resolution cause kernel crash

       HI! Currently we were testing OV5640 CMOS sensor and conect it to VIP0 capture port,camera work with 8 bit discrete SYNC mode,we can well capture 352x288,320x240,1280x720,1920x1080 and so on resolutions  ,but except 640x480, everytime when we capture a few frames, it cause a Oops kernel crash as follow 

Unable to handle kernel paging request at virtual address 8f8f8f8e
pgd = d5890000
[8f8f8f8e] *pgd=00000000
Internal error: Oops: 80000005 [#1]
last sysfs file: /sys/devices/platform/davinci_emac.1/net/eth1/ifindex
Modules linked in: omaplfb pvrsrvkm ti81xxvin ov5640 ti81xxvo ti81xxfb vpss syslink
CPU: 0    Not tainted  (2.6.37 #441)
PC is at 0x8f8f8f8e
LR is at notifier_call_chain+0x34/0x78
pc : [<8f8f8f8e>]    lr : [<c040b64c>]    psr: 60000033
sp : cfb97d90  ip : 00000000  fp : cfb97db4
r10: c00a6050  r9 : 7fffffff  r8 : cfb96000
r7 : d516e2c0  r6 : d2484a80  r5 : cf63eb00  r4 : 00000000
r3 : 00000000  r2 : cfb96000  r1 : 00000002  r0 : d516e2c0
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA Thumb  Segment user
Control: 10c5387d  Table: 95890019  DAC: 00000015

LR: 0xc040b5cc:
b5cc  e24304c0 e3520000 0a000008 e7943181 e0802006 e7803181 e5953004 e5823004
b5ec  ee072f3a f57ff04f e3a00000 e89dabf0 e1a0000c e1a01008 e1a02007 ebf10db4
b60c  e3a00000 e89dabf0 c0589440 e1a0c00d e92dddf0 e24cb004 e3a05000 e1a0a001
b62c  e1a08002 e1a06003 e590c000 e59b7004 ea00000a e59c4004 e1a0e00f e59cf000
b64c  e3570000 15973000 e1a0c004 12833001 15873000 e3100902 e1a05000 1a000006
b66c  e35c0000 13560000 e1a0000c e1a0100a e1a02008 e2466001 1affffed e1a00005
b68c  e89dadf0 e1a0c00d e92dd800 e24cb004 e24dd008 e59bc004 e58dc000 ebffffda
b6ac  e24bd00c e89da800 e1a0c00d e92dd800 e24cb004 e24dd008 e3e03000 e3a0c000

SP: 0xcfb97d10:
7d10  cf63eb00 74d1ebca 00000000 00000000 fffffffd ffffffff cfb97d7c d2484a80
7d30  d516e2c0 cfb96000 cfb97db4 cfb97d48 c0409690 c003d1d8 d516e2c0 00000002
7d50  cfb96000 00000000 00000000 cf63eb00 d2484a80 d516e2c0 cfb96000 7fffffff
7d70  c00a6050 cfb97db4 00000000 cfb97d90 c040b64c 8f8f8f8e 60000033 ffffffff
7d90  cfb96000 c057de30 c057e230 cfb97e1c 00000002 7fffffff cfb97dd4 cfb97db8
7db0  c0407e34 c0407ad4 0000000d cfb97e14 c0c6f298 cfb97e1c cfb97de4 cfb97dd8
7dd0  c00a6094 c0407df8 cfb97e0c cfb97de8 c04081d4 c00a605c 0000000d cf63eb00
7df0  c0b03620 cfb97e14 ffffffff 00000001 cfb97e4c cfb97e10 c00a62a8 c040817c

FP: 0xcfb97d34:
7d34  cfb96000 cfb97db4 cfb97d48 c0409690 c003d1d8 d516e2c0 00000002 cfb96000
7d54  00000000 00000000 cf63eb00 d2484a80 d516e2c0 cfb96000 7fffffff c00a6050
7d74  cfb97db4 00000000 cfb97d90 c040b64c 8f8f8f8e 60000033 ffffffff cfb96000
7d94  c057de30 c057e230 cfb97e1c 00000002 7fffffff cfb97dd4 cfb97db8 c0407e34
7db4  c0407ad4 0000000d cfb97e14 c0c6f298 cfb97e1c cfb97de4 cfb97dd8 c00a6094
7dd4  c0407df8 cfb97e0c cfb97de8 c04081d4 c00a605c 0000000d cf63eb00 c0b03620
7df4  cfb97e14 ffffffff 00000001 cfb97e4c cfb97e10 c00a62a8 c040817c d41eca3c
7e14  c0b03620 0000000d 00000000 cf63eb00 c008835c cfb97e28 cfb97e28 c0b03620

R0: 0xd516e240:
e240  00000000 00000000 00000000 00000000 d516e250 d516e250 d516e258 d516e258
e260  00000000 00000000 00000000 d524df8c 00000000 00000000 00000000 00000000
e280  00000000 d516e284 d516e284 00000000 00000000 00000000 00000000 00000000
e2a0  00000000 00000000 00000000 0000c350 0000c350 00000000 25257876 2ad508ec
e2c0  00000000 d524e000 00000002 84208160 00000000 ffffffff 00000078 00000078
e2e0  00000078 00000000 c0410058 00000000 00000400 00400000 00000001 00000000
e300  00000000 cf63eb44 c057dea0 00000001 0e5d1480 0000001e f4610900 00000000
e320  74a4250a 0000000e f4610900 00000000 00000000 00000000 d516e338 d516e338

R2: 0xcfb95f80:
5f80  96db8fdd 93df8ede 98df90dd 9ae289e2 9cde90de 97e18cdf 97e38ce2 96e588e6
5fa0  95e58de5 94e88de7 95ea8aea 98e68ae6 98e78fe6 95ea89eb 97e78fe9 96e990e6
5fc0  96eb8aeb 95eb8aeb 94ed8beb 94eb94ec 92ee92ec 92ee93ed 91ee94ee 8ef290ef
5fe0  8ef18ff2 8df38df0 8bf28df4 8df38ff1 8bf38df4 8bf38cf3 8bf58cf4 8bf58cf5
6000  00000002 00000001 00000000 cf63eb00 c057e2d0 00000000 00000017 00000000
6020  cf63eb00 d2484a80 d516e2c0 cfb96000 7fffffff c00a6050 cfb97db4 cfb97d90
6040  8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f
6060  8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f

R5: 0xcf63ea80:
ea80  00000000 00000002 00000003 00000000 cf63ea90 cf63ea90 cf63ea98 cf63ea98
eaa0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
eac0  40017050 cf63eac4 cf63eac4 00000000 00000000 00000000 00000000 00000000
eae0  00000001 00000000 00000000 0000c350 0000c350 00000000 0000000a 00000002
eb00  00000000 cfb96000 00000002 00400100 00000000 ffffffff 00000078 00000078
eb20  00000078 00000000 c0410058 00000000 00000400 00400000 00000001 00000000
eb40  00000000 c057dea0 d516e304 00000001 0e5d1480 0000001e 00989680 00000000
eb60  74d1ebca 0000000e 00989680 00000000 00000000 00000000 cf63eb78 cf63eb78

R6: 0xd2484a00:
4a00  00000000 00000017 00000000 00000019 bedecd2b 0000001f bedecfe4 0000000f
4a20  bedecd3b 00000000 00000000 00000000 00000000 00000000 00000000 00000f5a
4a40  00000f18 00000000 c0589eec 00000001 00001bcd 00000000 00000000 00000000
4a60  00000000 0000008d 00000000 00000000 d5761700 00000002 00000000 00000000
4a80  d2650f20 d265038c d26501b8 c004fad8 c00be0e4 40000000 bf000000 00000000
4aa0  40125000 d5890000 00000001 00000002 00000019 00000000 d2484ab8 d2484ab8
4ac0  d2484ac0 d2484ac0 0000003e 000000e0 00000102 00000000 00000097 00000085
4ae0  00000022 00000000 00000000 00000004 00008000 00015048 00016000 00016afc

R7: 0xd516e240:
e240  00000000 00000000 00000000 00000000 d516e250 d516e250 d516e258 d516e258
e260  00000000 00000000 00000000 d524df8c 00000000 00000000 00000000 00000000
e280  00000000 d516e284 d516e284 00000000 00000000 00000000 00000000 00000000
e2a0  00000000 00000000 00000000 0000c350 0000c350 00000000 25257876 2ad508ec
e2c0  00000000 d524e000 00000002 84208160 00000000 ffffffff 00000078 00000078
e2e0  00000078 00000000 c0410058 00000000 00000400 00400000 00000001 00000000
e300  00000000 cf63eb44 c057dea0 00000001 0e5d1480 0000001e f4610900 00000000
e320  74a4250a 0000000e f4610900 00000000 00000000 00000000 d516e338 d516e338

R8: 0xcfb95f80:
5f80  96db8fdd 93df8ede 98df90dd 9ae289e2 9cde90de 97e18cdf 97e38ce2 96e588e6
5fa0  95e58de5 94e88de7 95ea8aea 98e68ae6 98e78fe6 95ea89eb 97e78fe9 96e990e6
5fc0  96eb8aeb 95eb8aeb 94ed8beb 94eb94ec 92ee92ec 92ee93ed 91ee94ee 8ef290ef
5fe0  8ef18ff2 8df38df0 8bf28df4 8df38ff1 8bf38df4 8bf38cf3 8bf58cf4 8bf58cf5
6000  00000002 00000001 00000000 cf63eb00 c057e2d0 00000000 00000017 00000000
6020  cf63eb00 d2484a80 d516e2c0 cfb96000 7fffffff c00a6050 cfb97db4 cfb97d90
6040  8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f
6060  8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f 8f8f8f8f

R10: 0xc00a5fd0:
5fd0  e1a0200d e3c23d7f e1a06000 e3c3303f e3a01000 e3a0201c e1a00005 e593400c
5ff0  eb046fa2 e59f3034 e2852014 e50b6038 e1a00006 e50b2020 e50b3028 e50b2024
6010  e50b402c ebfffb8b e1a01005 e59f2010 e3a03002 eb0d88a0 e24bd018 e89da870
6030  c008835c c00a6050 e1a0c00d e92dd800 e24cb004 eb0d8768 e3a00000 e89da800
6050  e1a0c00d e92dd800 e24cb004 e5902010 e5903000 e3120001 1a000008 e3520000
6070  0a000006 e5923030 e3530000 0a000003 e5933008 e3530000 0a000000 e12fff33
6090  eb0d8755 e3a00000 e89da800 e1a0c00d e92dd800 e24cb004 ebffffe8 e1a0200d
60b0  e3c23d7f e3c3303f e593200c e5923004 e5933000 e3130001 0a000003 e5923224
Process dhcpcd (pid: 4017, stack limit = 0xcfb962e8)
Stack: (0xcfb97d90 to 0xcfb98000)
7d80:                                     cfb96000 c057de30 c057e230 cfb97e1c
7da0: 00000002 7fffffff cfb97dd4 cfb97db8 c0407e34 c0407ad4 0000000d cfb97e14
7dc0: c0c6f298 cfb97e1c cfb97de4 cfb97dd8 c00a6094 c0407df8 cfb97e0c cfb97de8
7de0: c04081d4 c00a605c 0000000d cf63eb00 c0b03620 cfb97e14 ffffffff 00000001
7e00: cfb97e4c cfb97e10 c00a62a8 c040817c d41eca3c c0b03620 0000000d 00000000
7e20: cf63eb00 c008835c cfb97e28 cfb97e28 c0b03620 cfb97e60 00000000 d41eca3c
7e40: cfb97ec4 cfb97e50 c00a6d18 c00a621c 0000000e 00000000 cfb97e74 00000001
7e60: 00000000 c0b03620 cfb97ec4 cfb97e78 c00a6e90 c00acd10 00000001 00000000
7e80: 00000000 7ffffffe 00000000 00000000 00000000 00000000 ffffffff 00000001
7ea0: 00000000 d41eca3c 00000000 00000000 ffffffff 00000000 cfb97efc cfb97ec8
7ec0: c00a6ef8 c00a6c94 ffffffff 7fffffff 00000001 c008ca1c ffffffff 7fffffff
7ee0: cf616180 d41eca3c c0047fa8 cfb96000 cfb97f24 cfb97f00 c00edbb0 c00a6ea4
7f00: ffffffff 7fffffff ffffffff 7fffffff d54d7780 00000006 cfb97f4c cfb97f28
7f20: c00edcb8 c00edb7c ffffffff 7fffffff 00000000 cfb97f40 cf616180 d41ec998
7f40: cfb97f64 cfb97f50 c014d62c c00edc98 cf616180 d54d7780 cfb97f84 cfb97f68
7f60: c00cc0cc c014d5cc d54d77a8 d54d7780 cf616180 00000006 cfb97fa4 cfb97f88
7f80: c00cc180 c00cc08c 4004a7b4 00000000 4003c3b3 00000006 00000000 cfb97fa8
7fa0: c0047e00 c00cc110 4004a7b4 00000000 00000003 40104008 00000001 4001da25
7fc0: 4004a7b4 00000000 4003c3b3 00000006 00000000 00000000 00000000 00000000
7fe0: 00000018 beecfab8 4001da2f 4000e4f4 60000010 00000003 00003ba0 00003bb0
Backtrace: 
[<c0407ac8>] (schedule+0x0/0x324) from [<c0407e34>] (io_schedule+0x48/0x74)
 r9:7fffffff r8:00000002 r7:cfb97e1c r6:c057e230 r5:c057de30
r4:cfb96000
[<c0407dec>] (io_schedule+0x0/0x74) from [<c00a6094>] (sync_page+0x44/0x4c)
 r7:cfb97e1c r6:c0c6f298 r5:cfb97e14 r4:0000000d
[<c00a6050>] (sync_page+0x0/0x4c) from [<c04081d4>] (__wait_on_bit+0x64/0xb0)
[<c0408170>] (__wait_on_bit+0x0/0xb0) from [<c00a62a8>] (wait_on_page_bit+0x98/0xa8)
[<c00a6210>] (wait_on_page_bit+0x0/0xa8) from [<c00a6d18>] (filemap_fdatawait_range+0x90/0x150)
 r7:d41eca3c r6:00000000 r5:cfb97e60 r4:c0b03620
[<c00a6c88>] (filemap_fdatawait_range+0x0/0x150) from [<c00a6ef8>] (filemap_write_and_wait_range+0x60/0x74)
[<c00a6e98>] (filemap_write_and_wait_range+0x0/0x74) from [<c00edbb0>] (vfs_fsync_range+0x40/0x8c)
 r9:cfb96000 r8:c0047fa8 r7:d41eca3c r6:cf616180 r5:7fffffff
r4:ffffffff
[<c00edb70>] (vfs_fsync_range+0x0/0x8c) from [<c00edcb8>] (vfs_fsync+0x2c/0x34)
 r7:00000006 r6:d54d7780 r5:7fffffff r4:ffffffff
[<c00edc8c>] (vfs_fsync+0x0/0x34) from [<c014d62c>] (nfs_file_flush+0x6c/0x78)
 r5:d41ec998 r4:cf616180
[<c014d5c0>] (nfs_file_flush+0x0/0x78) from [<c00cc0cc>] (filp_close+0x4c/0x84)
 r5:d54d7780 r4:cf616180
[<c00cc080>] (filp_close+0x0/0x84) from [<c00cc180>] (sys_close+0x7c/0xb0)
 r7:00000006 r6:cf616180 r5:d54d7780 r4:d54d77a8
[<c00cc104>] (sys_close+0x0/0xb0) from [<c0047e00>] (ret_fast_syscall+0x0/0x30)
 r7:00000006 r6:4003c3b3 r5:00000000 r4:4004a7b4
Code: bad PC value
---[ end trace 8065f5daea314382 ]---
Kernel panic - not syncing: Fatal exception
Backtrace: 
[<c004c0bc>] (dump_backtrace+0x0/0x110) from [<c04074f4>] (dump_stack+0x18/0x1c)
 r7:8f8f8f7e r6:cfb97bab r5:8f8f8f86 r4:c05b0bd8
[<c04074dc>] (dump_stack+0x0/0x1c) from [<c0407558>] (panic+0x60/0x17c)
[<c04074f8>] (panic+0x0/0x17c) from [<c004c450>] (die+0x284/0x2d8)
 r3:00000001 r2:c05bf068 r1:00000000 r0:c04d591d
[<c004c1cc>] (die+0x0/0x2d8) from [<c004ecc0>] (__do_kernel_fault+0x6c/0x8c)
[<c004ec54>] (__do_kernel_fault+0x0/0x8c) from [<c040b554>] (do_page_fault+0x1f0/0x20c)
 r9:80000005 r8:d2484ab4 r7:d2484a80 r6:cf63eb00 r5:cfb97d48
r4:00010000
[<c040b364>] (do_page_fault+0x0/0x20c) from [<c040b594>] (do_translation_fault+0x24/0xa8)
[<c040b570>] (do_translation_fault+0x0/0xa8) from [<c003d208>] (do_PrefetchAbort+0x3c/0x9c)
 r9:20000113 r8:8f8f8f8e r7:cfb97d48 r6:00000005 r5:c056853c
r4:c05684ec
[<c003d1cc>] (do_PrefetchAbort+0x0/0x9c) from [<c0409690>] (__pabt_svc+0x50/0xa0)
Exception stack(0xcfb97d48 to 0xcfb97d90)
7d40:                   d516e2c0 00000002 cfb96000 00000000 00000000 cf63eb00
7d60: d2484a80 d516e2c0 cfb96000 7fffffff c00a6050 cfb97db4 00000000 cfb97d90
7d80: c040b64c 8f8f8f8e 60000033 ffffffff
 r8:cfb96000 r7:d516e2c0 r6:d2484a80 r5:cfb97d7c r4:ffffffff
[<c0407ac8>] (schedule+0x0/0x324) from [<c0407e34>] (io_schedule+0x48/0x74)
 r9:7fffffff r8:00000002 r7:cfb97e1c r6:c057e230 r5:c057de30
r4:cfb96000
[<c0407dec>] (io_schedule+0x0/0x74) from [<c00a6094>] (sync_page+0x44/0x4c)
 r7:cfb97e1c r6:c0c6f298 r5:cfb97e14 r4:0000000d
[<c00a6050>] (sync_page+0x0/0x4c) from [<c04081d4>] (__wait_on_bit+0x64/0xb0)
[<c0408170>] (__wait_on_bit+0x0/0xb0) from [<c00a62a8>] (wait_on_page_bit+0x98/0xa8)
[<c00a6210>] (wait_on_page_bit+0x0/0xa8) from [<c00a6d18>] (filemap_fdatawait_range+0x90/0x150)
 r7:d41eca3c r6:00000000 r5:cfb97e60 r4:c0b03620
[<c00a6c88>] (filemap_fdatawait_range+0x0/0x150) from [<c00a6ef8>] (filemap_write_and_wait_range+0x60/0x74)
[<c00a6e98>] (filemap_write_and_wait_range+0x0/0x74) from [<c00edbb0>] (vfs_fsync_range+0x40/0x8c)
 r9:cfb96000 r8:c0047fa8 r7:d41eca3c r6:cf616180 r5:7fffffff
r4:ffffffff
[<c00edb70>] (vfs_fsync_range+0x0/0x8c) from [<c00edcb8>] (vfs_fsync+0x2c/0x34)
 r7:00000006 r6:d54d7780 r5:7fffffff r4:ffffffff
[<c00edc8c>] (vfs_fsync+0x0/0x34) from [<c014d62c>] (nfs_file_flush+0x6c/0x78)
 r5:d41ec998 r4:cf616180
[<c014d5c0>] (nfs_file_flush+0x0/0x78) from [<c00cc0cc>] (filp_close+0x4c/0x84)
 r5:d54d7780 r4:cf616180
[<c00cc080>] (filp_close+0x0/0x84) from [<c00cc180>] (sys_close+0x7c/0xb0)
 r7:00000006 r6:cf616180 r5:d54d7780 r4:d54d77a8
[<c00cc104>] (sys_close+0x0/0xb0) from [<c0047e00>] (ret_fast_syscall+0x0/0x30)
 r7:00000006 r6:4003c3b3 r5:00000000 r4:4004a7b4
(LR addr is kernel/notifier.c line 95 if (nr_calls)) 。Even we test another CMOS sensor(GC2035),it also cause this problem.

       we use EZSDK_05_02 kernel linux-2.6.37-psp04.04.00.01,apply 5 patchs from   http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/p/186865/675884.aspx and also modify maxOutHeight/maxOutWidth  configs as flow:

#if 0
out_stream_info->maxOutHeight = VPS_CAPT_MAX_OUT_HEIGHT_UNLIMITED;
out_stream_info->maxOutWidth = VPS_CAPT_MAX_OUT_WIDTH_UNLIMITED;
#else
//width zeng
if(inst->buf_obj.fmt.fmt.pix.width<=352)
out_stream_info->maxOutWidth = VPS_CAPT_MAX_OUT_WIDTH_352_PIXELS;
else if(inst->buf_obj.fmt.fmt.pix.width<=768)
out_stream_info->maxOutWidth = VPS_CAPT_MAX_OUT_WIDTH_768_PIXELS;
else if(inst->buf_obj.fmt.fmt.pix.width<=1280)
out_stream_info->maxOutWidth = VPS_CAPT_MAX_OUT_WIDTH_1280_PIXELS;
else if(inst->buf_obj.fmt.fmt.pix.width<=1920)
out_stream_info->maxOutWidth = VPS_CAPT_MAX_OUT_WIDTH_1920_PIXELS;
else
out_stream_info->maxOutWidth = VPS_CAPT_MAX_OUT_WIDTH_UNLIMITED;
//height zeng
if(inst->buf_obj.fmt.fmt.pix.height<=288)
out_stream_info->maxOutHeight = VPS_CAPT_MAX_OUT_HEIGHT_288_LINES;
else if(inst->buf_obj.fmt.fmt.pix.height<=576)
out_stream_info->maxOutHeight = VPS_CAPT_MAX_OUT_HEIGHT_576_LINES;
else if(inst->buf_obj.fmt.fmt.pix.height<=720)
out_stream_info->maxOutHeight = VPS_CAPT_MAX_OUT_HEIGHT_720_LINES;
else if(inst->buf_obj.fmt.fmt.pix.height<=1080)
out_stream_info->maxOutHeight = VPS_CAPT_MAX_OUT_HEIGHT_1080_LINES;
else
out_stream_info->maxOutHeight = VPS_CAPT_MAX_OUT_HEIGHT_UNLIMITED;
#endif

can somebody help solve this problem or give me some advice? thanks!