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.

TI's encoders , Decoders not working with DaVinci-PSP-SDK-03.21.00.04 & filesystem from DVSDK 4.02.00.06 on DM368

Hi all,

I'm currently trying to use TI encoder's i:e TIvidenc1 using the linux filesystem from DVSDK 4.02.00.06 and a upgraded kernel from the PSP 03.21.00.04 (that is Linux 2.6.37). 

I am using the below pipeline

gst-launch videotestsrc num-buffers=10 ! video/x-raw-yuv, format=(fourcc)NV12 ! TIVidenc1 codecName=h264enc engineName=codecServer ! filesink location=output_gen_D1.m4v


But Kernel oops during H.264 video encode on DM368 with following debug


unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c2568000
[00000000] *pgd=82564031, *pte=00000000, *ppte=00000000
Internal error: Oops: 817 [#1] PREEMPT
last sysfs file: /sys/kernel/uevent_seqnum
Modules linked in: dm365mmap edmak irqk cmemk ipv6
CPU: 0 Not tainted (2.6.37 #2)
PC is at __down_interruptible+0x34/0xf0
LR is at down_interruptible+0x44/0x78
pc : [<c0350c3c>] lr : [<c0062298>] psr: 60000093
sp : c2567e70 ip : c2567ea0 fp : c2567e9c
r10: bf05a5d8 r9 : bf059b54 r8 : 00000190
r7 : 0000000a r6 : c3473200 r5 : c2566000 r4 : bf059d00
r3 : 00000000 r2 : c2567e70 r1 : 00000000 r0 : bf059d00
Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
Control: 0005317f Table: 82568000 DAC: 00000015
Process ticapturesrc0:s (pid: 1455, stack limit = 0xc2566270)
Stack: (0xc2567e70 to 0xc2568000)
7e60: bf059d04 c003cc9c c2567e9c c2567e88
7e80: c003cc9c bf059d00 a0000013 412d96f0 c2567eb4 c2567ea0 c0062298 c0350c18
7ea0: 0000fc00 bf059ce4 c2567efc c2567eb8 bf059304 c0062264 c2567efc 4168b000
7ec0: 00000065 c35ca300 00000004 00000000 c01bf310 c2537e70 c35ca300 00000004
7ee0: c35ca300 412d96f0 c2566000 00000000 c2567f0c c2567f00 c00b4914 bf05921c
7f00: c2567f7c c2567f10 c00b50a4 c00b48fc c2cf3200 00000028 c2566000 c0464d0c
7f20: c2567f4c c2567f30 00000028 00000000 c2567f4c c2567f40 c35ca300 00000004
7f40: c2567f84 00000036 c002f144 c2566000 c2567f7c 00000004 412d96f0 0000fc00
7f60: c35ca300 c002f144 c2566000 00000000 c2567fa4 c2567f80 c00b5140 c00b4b5c
7f80: 408bd214 00000001 00000004 00000000 00000000 00000036 00000000 c2567fa8
7fa0: c002efc0 c00b5110 00000004 00000000 00000004 0000fc00 412d96f0 00000000
7fc0: 00000004 00000000 00000000 00000036 40092000 00000000 408bb460 412d9814
7fe0: 408bda08 412d96f0 40773340 405dcaec 60000010 00000004 f77acf99 eddadeff
Backtrace:
[<c0350c08>] (__down_interruptible+0x0/0xf0) from [<c0062298>] (down_interruptible+0x44/0x78)
r6:412d96f0 r5:a0000013 r4:bf059d00
[<c0062254>] (down_interruptible+0x0/0x78) from [<bf059304>] (ioctl+0xf8/0x3e4 [irqk])
r5:bf059ce4 r4:0000fc00
[<bf05920c>] (ioctl+0x0/0x3e4 [irqk]) from [<c00b4914>] (vfs_ioctl+0x28/0x44)
[<c00b48ec>] (vfs_ioctl+0x0/0x44) from [<c00b50a4>] (do_vfs_ioctl+0x558/0x5b4)
[<c00b4b4c>] (do_vfs_ioctl+0x0/0x5b4) from [<c00b5140>] (sys_ioctl+0x40/0x64)
[<c00b5100>] (sys_ioctl+0x0/0x64) from [<c002efc0>] (ret_fast_syscall+0x0/0x2c)
r7:00000036 r6:00000000 r5:00000000 r4:00000004
Code: e2803004 e24b202c e50b302c e3a03000 (e5812000)
0m begin init_vi---[ end trace 0e3b2b42c2741b9c ]---
deo

0:00:01.3note: ticapturesrc0:s[1455] exited with preempt_count 1
28492375 BUG: scheduling while atomic: ticapturesrc0:s/1455/0x40000002
1454 0xdModules linked in:ccb0 LOG dm365mmap edmak TIVidenc1 irqk gsttividenc1.c: cmemk1194:gst_tividen ipv6c1_codec_start:
opening codBacktrace: ec engine "codec
Server"

0:00:[<c0032584>] (dump_backtrace+0x0/0x114) from [<c034e8ec>] (dump_stack+0x18/0x1c)
01.329625917 7:c2560f7833m 1454 r6:00000000 0xdccb0 LO r5:c3473200G r4:00000000 TIVid
enc1 gsttividenc[<c034e8d4>] (dump_stack+0x0/0x1c) from [<c003ca20>] (__schedule_bug+0x54/0x60)
1.c:1302:gst_tiv[<c003c9cc>] (__schedule_bug+0x0/0x60) from [<c034ec50>] (schedule+0x78/0x3d4)
idenc1_codec_sta r5:c3473200rt: configu r4:c3473200ring video encod
e width=480, hei[<c034ebd8>] (schedule+0x0/0x3d4) from [<c003cd58>] (__cond_resched+0x18/0x24)
ght=272, bitrate[<c003cd40>] (__cond_resched+0x0/0x24) from [<c034f150>] (_cond_resched+0x34/0x44)
=2000000

0:00[<c034f11c>] (_cond_resched+0x0/0x44) from [<c00929ec>] (__get_user_pages+0x230/0x240)
:01.330431250 <c00927bc>] (__get_user_pages+0x0/0x240) from [<c0092b04>] (get_user_pages+0x58/0x60)
333m 1454 [<c0092aac>] (get_user_pages+0x0/0x60) from [<c008cee0>] (get_user_pages_fast+0x68/0x80)
0xdccb0 L r5:00000001OG 4:c2566000m TIVi
denc1 gsttividen[<c008ce78>] (get_user_pages_fast+0x0/0x80) from [<c006b5cc>] (get_futex_key+0x98/0x158)
c1.c:1304:gst_ti[<c006b534>] (get_futex_key+0x0/0x158) from [<c006bd60>] (futex_wake+0x4c/0x138)
videnc1_codec_st r7:00000001art: openin r6:00000001g video encoder r5:412da4d8"h264enc"

0:0 r4:c2567a5c0:01.498208292
1454 [<c006bd14>] (futex_wake+0x0/0x138) from [<c006d6f0>] (do_futex+0xe4/0xd40)
0xdccb0 r8:00000000LOG 7:000000010m TIV r6:00000000idenc1 gsttivide r5:412da4d8nc1.c:1350:gst_t r4:00000001ividenc1_codec_s
tart: creat[<c006d60c>] (do_futex+0x0/0xd40) from [<c006e49c>] (sys_futex+0x150/0x164)
ing output buffe[<c006e34c>] (sys_futex+0x0/0x164) from [<c0040e10>] (mm_release+0xb0/0xc0)
r table

0:00:[<c0040d60>] (mm_release+0x0/0xc0) from [<c004508c>] (exit_mm+0x20/0x164)
01.499453000 7:c2567e2833m 1454 r6:c3473200 0xdccb0 LO r5:c2fcdc00G r4:0000000b TIVid
enc1 gsttividenc[<c004506c>] (exit_mm+0x0/0x164) from [<c0046bf8>] (do_exit+0x1c8/0x6a4)
1.c:1042:gst_tiv r7:c2567e28idenc1_init_vide r6:c3473200o: end init r5:c3473200_video

0:00:0 r4:0000000b1.500448542
1454 [<c0046a30>] (do_exit+0x0/0x6a4) from [<c0032ae8>] (die+0x1d4/0x204)
0xdccb0 LOG[<c0032914>] (die+0x0/0x204) from [<c00343b8>] (__do_kernel_fault+0x6c/0x8c)
[<c003434c>] (__do_kernel_fault+0x0/0x8c) from [<c00345a8>] (do_page_fault+0x1d0/0x1e8)
TIVide r9:c2567e28nc1 gsttividenc1 r8:00000817.c:1451:gst_tivi r7:c2fcdc00denc1_encode:6:000000000m invoking the r5:c3473200video encoder

r4:c045e064

[<c00343d8>] (do_page_fault+0x0/0x1e8) from [<c002e324>] (do_DataAbort+0x3c/0x9c)
[<c002e2e8>] (do_DataAbort+0x0/0x9c) from [<c002eb6c>] (__dabt_svc+0x4c/0x60)
Exception stack(0xc2567e28 to 0xc2567e70)
7e20: bf059d00 00000000 c2567e70 00000000 bf059d00 c2566000
7e40: c3473200 0000000a 00000190 bf059b54 bf05a5d8 c2567e9c c2567ea0 c2567e70
7e60: c0062298 c0350c3c 60000093 ffffffff
r8:00000190 r7:0000000a r6:c3473200 r5:c2567e5c r4:ffffffff
[<c0350c08>] (__down_interruptible+0x0/0xf0) from [<c0062298>] (down_interruptible+0x44/0x78)
r6:412d96f0 r5:a0000013 r4:bf059d00
[<c0062254>] (down_interruptible+0x0/0x78) from [<bf059304>] (ioctl+0xf8/0x3e4 [irqk])
r5:bf059ce4 r4:0000fc00
[<bf05920c>] (ioctl+0x0/0x3e4 [irqk]) from [<c00b4914>] (vfs_ioctl+0x28/0x44)
[<c00b48ec>] (vfs_ioctl+0x0/0x44) from [<c00b50a4>] (do_vfs_ioctl+0x558/0x5b4)
[<c00b4b4c>] (do_vfs_ioctl+0x0/0x5b4) from [<c00b5140>] (sys_ioctl+0x40/0x64)
[<c00b5100>] (sys_ioctl+0x0/0x64) from [<c002efc0>] (ret_fast_syscall+0x0/0x2c)
r7:00000036 r6:00000000 r5:00000000 r4:00000004



Can any one help me out to fix this issue ?
How i can get TI encoders working with filesystem from DVSDK 4.02.00.06 and a upgraded kernel from the PSP 03.21.00.04 (that is Linux 2.6.37) on DM368 ?

Thanks in advance 
Mayur.