I'm using TI814X EZSDK 5_03_01_15 and Graphics_SDK 4_06_00_02.
The vpss.ko, pvrsrvkm.ko, omaplfb.ko are recompiled from source. When running the OGLES2ChameleonMan demo application, in the beginning several seconds, the LCD can display the running Chameleon Man very well, then the kernel Oops Error occurs. Here is the log:
root@localhost:/opt/gfx/gfxsdkdemos> ./OGLES2ChameleonMan
Can't open keypad input device (/dev/input/event0)
PVRShell: EGL 1.4 initialized
Unable to handle kernel paging request at virtual address 48aaaaa8
pgd = c0004000
[48aaaaa8] *pgd=00000000
Internal error: Oops: 80000005 [#1] PREEMPT
last sysfs file: /sys/devices/virtual/pvr/pvrsrvkm/uevent
Modules linked in: omaplfb pvrsrvkm ti81xxfb vpss syslink tlc59108 [last unloaded: scsi_wait_scan]
CPU: 0 Not tainted (2.6.37 #1)
PC is at 0x48aaaaa8
LR is at vps_grpx_vsync_cb+0xdc/0x144 [vpss]
pc : [<48aaaaa8>] lr : [<bf14895c>] psr: 20000013
sp : c41e3dc8 ip : c41e3cb0 fp : c41e3de4
r10: c7aa596c r9 : bfb00298 r8 : c0541430
r7 : bf152f04 r6 : c7208040 r5 : 001000f8 r4 : c7208000
r3 : 48aaaaaa r2 : 48aaaaaa r1 : c41e3ce0 r0 : aabe6bba
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c5387d Table: 8643c019 DAC: 00000017
Process kworker/0:2 (pid: 870, stack limit = 0xc41e22e8)
Stack: (0xc41e3dc8 to 0xc41e4000)
3dc0: 00000002 c7b5f300 d1400298 00000002 c41e3e04 c41e3de8
3de0: bf144288 bf14888c c56a5a00 0000000c 00000000 00000002 c41e3e3c c41e3e08
3e00: c02ff59c bf1441cc bfb00298 00000000 20000193 0000000c c7aa5868 bfb00298
3e20: ffffffff 00000000 c051e3b4 0000000c c41e3e64 c41e3e40 c02fe77c c02ff4cc
3e40: bfb00298 c41e3e50 c0047768 c7a8ac00 00000000 000fffff c41e3e8c c41e3e68
3e60: c0300cb8 c02fe6ec 0000000c 00000000 fffffffe 00000000 00000004 c051e3b4
3e80: c41e3ea4 c41e3e90 c0300d74 c0300c30 00000000 00000000 c41e3ecc c41e3ea8
3ea0: c03da1f8 c0300d54 c051b194 ffffffff 0000000c 00000004 c051b1a0 c41c1a90
3ec0: c41e3efc c41e3ed0 c008d854 c03da1d0 00000000 00000000 c41e3efc c7ab14c0
3ee0: c41e2000 c41e3f1c 00000000 00000004 c41e3f14 c41e3f00 c008d88c c008d80c
3f00: 00000000 c41e2000 c41e3f44 c41e3f18 c0065ce0 c008d878 00000000 0000000c
3f20: c41e3f44 c41c1a80 c787b000 c0065c84 00000000 c7ab14d4 c41e3f7c c41e3f48
3f40: c00836a0 c0065c90 c03da1b4 c787b005 00000000 c41c1a80 c051e3b4 c41e2000
3f60: c056e06c c051e534 c051e3b4 c41c1a90 c41e3fbc c41e3f80 c0083bf8 c0083448
3f80: c03d5ce8 c03d9ffc c6437a24 c41c1a90 c41e3fbc c7835ec8 c41c1a80 c41e3fcc
3fa0: c00839c0 00000000 00000000 00000000 c41e3ff4 c41e3fc0 c0087d14 c00839cc
3fc0: c7835ec8 00000000 c41c1a80 00000000 c41e3fd0 c41e3fd0 c7835ec8 c0087c88
3fe0: c0070dcc 00000013 00000000 c41e3ff8 c0070dcc c0087c94 98083007 8051090c
Backtrace:
[<bf148880>] (vps_grpx_vsync_cb+0x0/0x144 [vpss]) from [<bf144288>] (vps_callback+0xc8/0xe8 [vpss])
r7:00000002 r6:d1400298 r5:c7b5f300 r4:00000002
[<bf1441c0>] (vps_callback+0x0/0xe8 [vpss]) from [<c02ff59c>] (_notify_exec_many+0xdc/0x128)
r7:00000002 r6:00000000 r5:0000000c r4:c56a5a00
[<c02ff4c0>] (_notify_exec_many+0x0/0x128) from [<c02fe77c>] (notify_exec+0x9c/0xb0)
[<c02fe6e0>] (notify_exec+0x0/0xb0) from [<c0300cb8>] (notify_shmdrv_isr_callback+0x94/0xac)
r6:000fffff r5:00000000 r4:c7a8ac00
[<c0300c24>] (notify_shmdrv_isr_callback+0x0/0xac) from [<c0300d74>] (notify_shmdrv_vpss_isr+0x2c/0x3c)
r9:c051e3b4 r8:00000004 r7:00000000 r6:fffffffe r5:00000000
r4:0000000c
[<c0300d48>] (notify_shmdrv_vpss_isr+0x0/0x3c) from [<c03da1f8>] (notifier_call_chain+0x34/0x78)
r5:00000000 r4:00000000
[<c03da1c4>] (notifier_call_chain+0x0/0x78) from [<c008d854>] (__blocking_notifier_call_chain+0x54/0x6c)
[<c008d800>] (__blocking_notifier_call_chain+0x0/0x6c) from [<c008d88c>] (blocking_notifier_call_chain+0x20/0x28)
r8:00000004 r7:00000000 r6:c41e3f1c r5:c41e2000 r4:c7ab14c0
[<c008d86c>] (blocking_notifier_call_chain+0x0/0x28) from [<c0065ce0>] (mbox_rx_work+0x5c/0x118)
[<c0065c84>] (mbox_rx_work+0x0/0x118) from [<c00836a0>] (process_one_work+0x264/0x3c0)
r8:c7ab14d4 r7:00000000 r6:c0065c84 r5:c787b000 r4:c41c1a80
[<c008343c>] (process_one_work+0x0/0x3c0) from [<c0083bf8>] (worker_thread+0x238/0x444)
[<c00839c0>] (worker_thread+0x0/0x444) from [<c0087d14>] (kthread+0x8c/0x94)
[<c0087c88>] (kthread+0x0/0x94) from [<c0070dcc>] (do_exit+0x0/0x67c)
r7:00000013 r6:c0070dcc r5:c0087c88 r4:c7835ec8
Code: bad PC value
---[ end trace ce523c8599721b46 ]---
The interesting thing is that the r3 value 48aaaaaa repeatedly appears as 0x48aaaaaa in the FinalChameleonManHeadBody.cpp and FinalChameleonManLegs.cpp generated from FinalChameleonManHeadBody.pvr and FinalChameleonManLegs.pvr. When I used the TI prebuilt OGLES2ChameleonMan demp app, the r3 value in the backtrace log is 3ece3ece, which I think also comes from the two named files.
I have tried using printk but it is not convenient because I have to use dmesg to display the printk strings, if the demo app crashes, the console is unavailable, and I cannot use dmesg. So I run the demo app in background using "./OGLES2ChameleonMan &", after it stops, use dmesg to show the debug info. I found that the vps_grpx_register_isr function is not called. This function adds vsync callback functions to the gctrl->cb_list. If the gctrl->cb_list is NULL or has some other problems, in the vps_grpx_vsync_cb function, the for loop on gctrl->cb_list may encounter issues. That is probably the key reason of the failure. Am I right?
Could anyone please help me figure it out?
Thanks in advance