I'm using gstreamer 0.4 with EZSDK 5.2.0.30 on a EVM8148. I'm trying to run a simple capture and encode gstreamer chain copied directly from TI's DM814x gstreamer wiki. However, when I run it, I get a divide by zero kernel oops in ti81xxvin.
After adding some printk's to the driver source, it appears that the inst->win variables are all still initialized to zero thus causing the numlines calculation to divide by zero:
numlines = sizeimage / (hpitch);
The gstreamer command and stack trace are shown below.
-Scott
root@dm814x-evm:~# gst-launch v4l2src device=/dev/video0 always-copy=false queue-size=12 num-buffers=2000 ! 'video/x-raw-yuv-strided,format=(fourcc)NV12,width=1
280,height=720,framerate=(fraction)60/1' ! omxbufferalloc numBuffers=12 ! omx_h264enc bitrate=5000000 ! gstperf ! filesink location=v4l2cap.h264
Setting pipeline to PAUSED ...
Division by zero in kernel.
Backtrace:
[<c0048b70>] (dump_backtrace+0x0/0x110) from [<c039dd84>] (dump_stack+0x18/0x1c)
r7:00000001 r6:00000000 r5:ccbe0804 r4:00000001
[<c039dd6c>] (dump_stack+0x0/0x1c) from [<c0049364>] (__div0+0x18/0x20)
[<c004934c>] (__div0+0x0/0x20) from [<c01acfc4>] (Ldiv0+0x8/0x10)
[<bf20cd1c>] (ti81xxvin_check_format+0x0/0x31c [ti81xxvin]) from [<bf20d054>] (vidioc_try_fmt_vid_cap+0x1c/0x20 [ti81xxvin])
[<bf20d038>] (vidioc_try_fmt_vid_cap+0x0/0x20 [ti81xxvin]) from [<c02a1900>] (__video_do_ioctl+0xe48/0x3f34)
[<c02a0ab8>] (__video_do_ioctl+0x0/0x3f34) from [<c02a08a8>] (__video_usercopy+0x2e4/0x428)
[<c02a05c4>] (__video_usercopy+0x0/0x428) from [<c02a0a1c>] (video_ioctl2+0x30/0x38)
[<c02a09ec>] (video_ioctl2+0x0/0x38) from [<c029fa5c>] (v4l2_ioctl+0xe8/0x11c)
r5:caa1ba00 r4:caa85000
[<c029f974>] (v4l2_ioctl+0x0/0x11c) from [<c00d2514>] (vfs_ioctl+0x28/0x44)
r9:caa9c000 r8:bed7702c r7:0000001c r6:0000001c r5:caa85000
r4:00000000
[<c00d24ec>] (vfs_ioctl+0x0/0x44) from [<c00d2c24>] (do_vfs_ioctl+0x500/0x540)
[<c00d2724>] (do_vfs_ioctl+0x0/0x540) from [<c00d2cbc>] (sys_ioctl+0x58/0x7c)
[<c00d2c64>] (sys_ioctl+0x0/0x7c) from [<c0044da0>] (ret_fast_syscall+0x0/0x30)
r8:c0044f48 r7:00000036 r6:0000001c r5:00000001 r4:00000001
VPSS_CAPTURE: width(1) can't be odd!!
VPSS_CAPTURE: height(1) can't be odd for YUV420 format!!