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.

v4l2 capture problem

Other Parts Discussed in Thread: TVP7002

Greetings,

I have connected a CMOS sensor with custom hardware that outputs YUV pixel format with embedded syncs.

I have created a v4l2 subdevice driver according to this guide:

http://processors.wiki.ti.com/index.php/DM81xx_AM38xx_Adding_External_Decoders_to_V4L2_Capture_Driver

and have replaced references to tvp7002 in ti81xx_vpss.c accordingly.

I'm using EZSDK 5_04_00_11 (with the included PSP 04.04.00.01, syslink 2.10.03.20) and HDPVSS firmware 01_00_01_37.

After loading the syslink module, the firmware, vpss and ti81xxvin, my module gets registered and initializes the sensor successfully.

With a simple capture program, based on the saLoopBackFbdev example I set up the capture format, prime buffers and attempt to start streaming and capture some buffers.  At that point, the driver crashes and usually causes the shell to terminate, with this dump:

------------[ cut here ]------------
WARNING: at kernel/softirq.c:159 local_bh_enable+0x54/0xc4()
Modules linked in: ti81xxvin vpss mt9m2bt syslink ipv6
Backtrace:
[<c0049bb8>] (dump_backtrace+0x0/0x110) from [<c039bfe0>] (dump_stack+0x18/0x1c)
 r7:00000000 r6:c0072a18 r5:c046600c r4:0000009f
[<c039bfc8>] (dump_stack+0x0/0x1c) from [<c006d49c>] (warn_slowpath_common+0x54/0x6c)
[<c006d448>] (warn_slowpath_common+0x0/0x6c) from [<c006d4d8>] (warn_slowpath_null+0x24/0x2c)
 r9:c0516b44 r8:c888c700 r7:0000000c r6:c4a8ad00 r5:c04f02e8
r4:c0541e80
[<c006d4b4>] (warn_slowpath_null+0x0/0x2c) from [<c0072a18>] (local_bh_enable+0x54/0xc4)
[<c00729c4>] (local_bh_enable+0x0/0xc4) from [<c0067394>] (omap_mbox_msg_send+0xcc/0xdc)
 r5:c04f02e8 r4:00000000
[<c00672c8>] (omap_mbox_msg_send+0x0/0xdc) from [<c02dcfec>] (notify_shm_drv_send_event+0x1c8/0x208)
 r5:00000001 r4:00000000
[<c02dce24>] (notify_shm_drv_send_event+0x0/0x208) from [<c02da77c>] (notify_send_event+0x114/0x26c)
[<c02da668>] (notify_send_event+0x0/0x26c) from [<bf1d4a08>] (vps_fvid2_queue+0xe4/0x21c [vpss])
[<bf1d4924>] (vps_fvid2_queue+0x0/0x21c [vpss]) from [<bf1ddcfc>] (capture_queue+0x50/0x64 [vpss])
 r8:bf1f7484 r7:60000013 r6:c2812980 r5:00000000 r4:c37cf000
[<bf1ddcac>] (capture_queue+0x0/0x64 [vpss]) from [<bf1f6248>] (ti81xxvin_buffer_queue+0x9c/0xe8 [ti81xxvin])
 r5:c3798400 r4:c37cf000
[<bf1f61ac>] (ti81xxvin_buffer_queue+0x0/0xe8 [ti81xxvin]) from [<c02b3edc>] (videobuf_streamon+0x80/0xd0)
 r7:60000013 r6:c37985c4 r5:c3798504 r4:c2812980
[<c02b3e5c>] (videobuf_streamon+0x0/0xd0) from [<bf1f5cc0>] (vidioc_streamon+0x244/0x400 [ti81xxvin])
 r7:c4167c00 r6:00000001 r5:c3798400 r4:c3798504
[<bf1f5a7c>] (vidioc_streamon+0x0/0x400 [ti81xxvin]) from [<c02a97e4>] (__video_do_ioctl+0x1618/0x3f34)
 r6:40045612 r5:00000000 r4:00000001
[<c02a81cc>] (__video_do_ioctl+0x0/0x3f34) from [<c02a7fbc>] (__video_usercopy+0x2e4/0x428)
[<c02a7cd8>] (__video_usercopy+0x0/0x428) from [<c02a8130>] (video_ioctl2+0x30/0x38)
[<c02a8100>] (video_ioctl2+0x0/0x38) from [<c02a7170>] (v4l2_ioctl+0xe8/0x11c)
 r5:c4167c00 r4:c2812c80
[<c02a7088>] (v4l2_ioctl+0x0/0x11c) from [<c00d2abc>] (vfs_ioctl+0x28/0x44)
 r9:c429e000 r8:beaffcb0 r7:00000003 r6:00000003 r5:c2812c80
r4:00000000
[<c00d2a94>] (vfs_ioctl+0x0/0x44) from [<c00d31cc>] (do_vfs_ioctl+0x500/0x540)
[<c00d2ccc>] (do_vfs_ioctl+0x0/0x540) from [<c00d3264>] (sys_ioctl+0x58/0x7c)
[<c00d320c>] (sys_ioctl+0x0/0x7c) from [<c0045e00>] (ret_fast_syscall+0x0/0x30)
 r8:c0045fa8 r7:00000036 r6:00008654 r5:00000000 r4:00009300
---[ end trace 4b1775bde74e5a16 ]---

With the same setup, I am able to successfully capture images using OpenMax.

Any ideas what might be wrong?

Regards,

Dimitri