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.

dvr_rdk SharedRegion_isCacheEnabled issue

Hi TI expert

I use dvr_rdk 3.0 for our project, my hardware is custom dm8148 board and my video device 

connected to VIP1 POARTA , The video format is yuv422, 16bit, with discrete hsync and vsync.

I am able to run  vcap_venc_vdec_vdisp usecase . If our video device not stop, the usecase work

well for long time. But if I stop my video device manually (eg: shutdown video device or no hsync and vsync),

the usecase will be report error. The error message is show below.

Assertion at Line no: 1616 in /opt/DVRRDK_03.00.00.00/ti_tools/syslink/syslink_2_10_02_17_patched/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/SharedRegion.c: (id < SharedRegion_module->cfg.numEntries) : failed
*** SharedRegion_isCacheEnabled: Id cannot be larger than numEntries!
Error [0xfffffffe] at Line no: 1634 in file /opt/DVRRDK_03.00.00.00/ti_tools/syslink/syslink_2_10_02_17_patched/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/SharedRegion.c
Assertion at Line no: 1616 in /opt/DVRRDK_03.00.00.00/ti_tools/syslink/syslink_2_10_02_17_patched/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/SharedRegion.c: (id < SharedRegion_module->cfg.numEntries) : failed
*** SharedRegion_isCacheEnabled: Id cannot be larger than numEntries!
Error [0xfffffffe] at Line no: 1634 in file /opt/DVRRDK_03.00.00.00/ti_tools/syslink/syslink_2_10_02_17_patched/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/SharedRegion.c
Assertion at Line no: 854 in /opt/DVRRDK_03.00.00.00/ti_tools/syslink/syslink_2_10_02_17_patched/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/SharedRegion.c: (id != SharedRegion_INVALIDREGIONID) : failed
Assertion at Line no: 857 in /opt/DVRRDK_03.00.00.00/ti_tools/syslink/syslink_2_10_02_17_patched/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/SharedRegion.c: ( (id != SharedRegion_INVALIDREGIONID) && (id < SharedRegion_module->cfg.numEntries)) : failed
*** SharedRegion_getSRPtr: Invalid id SharedRegion_INVALIDREGIONID passed!
Error [0xfffffffe] at Line no: 864 in file /opt/DVRRDK_03.00.00.00/ti_tools/syslink/syslink_2_10_02_17_patched/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/SharedRegion.c
Assertion at Line no: 1616 in /opt/DVRRDK_03.00.00.00/ti_tools/syslink/syslink_2_10_02_17_patched/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/SharedRegion.c: (id < SharedRegion_module->cfg.numEntries) : failed
*** SharedRegion_isCacheEnabled: Id cannot be larger than numEntries!
Error [0xfffffffe] at Line no: 1634 in file /opt/DVRRDK_03.00.00.00/ti_tools/syslink/syslink_2_10_02_17_patched/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/SharedRegion.c
Unable to handle kernel paging request at virtual address 0c91808f
pgd = c670c000
[0c91808f] *pgd=00000000
Internal error: Oops: 5 [#1]
last sysfs file: /sys/devices/virtual/gpio/gpio27/value
Modules linked in: ti81xxfb vpss osa_kermod syslink ipv6
CPU: 0 Not tainted (2.6.37 #66)
PC is at ListMP_getHead+0x19c/0x2a4 [syslink]
LR is at SharedRegion_isCacheEnabled+0x148/0x180 [syslink]
pc : [<bf089a24>] lr : [<bf080ee8>] psr: 60000093
sp : c44dfe70 ip : 00000101 fp : c44dfe9c
r10: 00000000 r9 : c44de000 r8 : 80000013
r7 : 00000017 r6 : 4cfa71bc r5 : cba42000 r4 : 0c91808f
r3 : 00000000 r2 : 00000000 r1 : 00060000 r0 : 00000000
Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c5387d Table: 8670c019 DAC: 00000015
Process dvr_rdk_demo_mc (pid: 1224, stack limit = 0xc44de2e8)
Stack: (0xc44dfe70 to 0xc44e0000)
fe60: c44dfe94 c44dfe80 c03c576c c44de000
fe80: c01cf35a 4cfa71bc 00000017 4cfa71bc c44dfef4 c44dfea0 bf0c8cdc bf089894
fea0: c01cf35a 4cfa71bc cba42000 ffffffff 0042f148 0034d4ec 0034d4ec 5075c5c2
fec0: 000ede5c 00000000 c44dff0c c44dfed8 c03c2ab8 c0085cf0 00000000 00000000
fee0: c442e980 00000017 c44dff04 c44dfef8 c00d1fe4 bf0c885c c44dff74 c44dff08
ff00: c00d26f4 c00d1fc8 c44dff24 c44dff18 c0050b88 c0063f34 c44dff5c c44dff28
ff20: c008adc4 c0050b7c 00000000 00000000 1f619d19 c44dff80 4cfa71d0 c44dff80
ff40: 0000004e c0043fa8 c44de000 00000000 4cfa71bc c01cf35a 00000017 c442e980
ff60: c44de000 00000000 c44dffa4 c44dff78 c00d278c c00d2200 00000000 00000001
ff80: 5075c5c2 4cfa71bc c01cf35a 0034d4c8 00000036 c0043fa8 00000000 c44dffa8
ffa0: c0043e00 c00d2740 4cfa71bc c01cf35a 00000017 c01cf35a 4cfa71bc 00000001
ffc0: 4cfa71bc c01cf35a 0034d4c8 00000036 00218a14 4cfa7388 4cfa74cc 00218914
ffe0: 0034d4ec 4cfa7190 0006b668 40300aec 20000010 00000017 7f7ffbf7 b7bbb7ff
Backtrace:
[<bf089888>] (ListMP_getHead+0x0/0x2a4 [syslink]) from [<bf0c8cdc>] (ListMPDrv_ioctl+0x48c/0x8c0 [syslink])
r8:4cfa71bc r7:00000017 r6:4cfa71bc r5:c01cf35a r4:c44de000
[<bf0c8850>] (ListMPDrv_ioctl+0x0/0x8c0 [syslink]) from [<c00d1fe4>] (vfs_ioctl+0x28/0x44)
r6:00000017 r5:c442e980 r4:00000000
[<c00d1fbc>] (vfs_ioctl+0x0/0x44) from [<c00d26f4>] (do_vfs_ioctl+0x500/0x540)
[<c00d21f4>] (do_vfs_ioctl+0x0/0x540) from [<c00d278c>] (sys_ioctl+0x58/0x7c)
[<c00d2734>] (sys_ioctl+0x0/0x7c) from [<c0043e00>] (ret_fast_syscall+0x0/0x30)
r8:c0043fa8 r7:00000036 r6:0034d4c8 r5:c01cf35a r4:4cfa71bc
Code: e3a01008 e30f2fff e3a03001 ebffa296 (e5940000)
---[ end trace 07f6767875b5bbdf ]---
Assertion at Line no: 1616 in /opt/DVRRDK_03.00.00.00/ti_tools/syslink/syslink_2_10_02_17_patched/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/SharedRegion.c: (id < SharedRegion_module->cfg.numEntries) : failed
*** SharedRegion_isCacheEnabled: Id cannot be larger than numEntries!
Error [0xfffffffe] at Lin4 in file /opt/DVRDK_03.00.00.00/ti_tools/syslink/syslink_2_10_02_17_patched/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/SharedRegion.c
Assertion at Line no: 854 in /opt/DVRRDK_03.00.00.00/ti_tools/syslink/syslink_2_10_02_17_patched/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/SharedRegion.c: (id != SharedRegion_INVALIDREGIONID) : failed
Assertion at Line no: 857 in /opt/DVRRDK_03.00.00.00/ti_tools/syslink/syslink_2_10_02_17_patched/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/SharedRegion.c: ( (id != SharedRegion_INVALIDREGIONID) && (id < SharedRegion_module->cfg.numEntries)) : failed
*** SharedRegion_getSRPtr: Invalid id SharedRegion_INVALIDREGIONID passed!
Error [0xfffffffe] at Line no: 864 in file /opt/DVRRDK_03.00.00.00/ti_tools/syslink/syslink_2_10_02_17_patched/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/SharedRegion.c
Assertion at Line no: 1616 in /opt/DVRRDK_03.00.00.00/ti_tools/syslink/syslink_2_10_02_17_patched/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/SharedRegion.c: (id < SharedRegion_module->cfg.numEntries) : failed
*** SharedRegion_isCacheEnabled: Id cannot be larger than numEntries!
Error [0xfffffffe] at Line no: 1634 in file /opt/DVRRDK_03.00.00.00/ti_tools/syslink/syslink_2_10_02_17_patched/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/SharedRegion.c
Unable to handle kernel paging request at virtual address 0c8d7f91
pgd = c670c000
[0c8d7f91] *pgd=00000000
Internal error: Oops: 805 [#2]
last sysfs file: /sys/devices/virtual/gpio/gpio27/value
Modules linked in: ti81xxfb vpss osa_kermod syslink ipv6
CPU: 0 Tainted: G D (2.6.37 #66)
PC is at ListMP_getHead+0x1f8/0x2a4 [syslink]
LR is at SharedRegion_isCacheEnabled+0x148/0x180 [syslink]
pc : [<bf089a80>] lr : [<bf080ee8>] psr: 60000013
sp : c4475e70 ip : 00000101 fp : c4475e9c
r10: 00000000 r9 : c4474000 r8 : 00000000
r7 : 00000000 r6 : 0c8d7f8d r5 : cbbc4000 r4 : cd000000
r3 : 00010101 r2 : 7e8d7f8d r1 : 00060000 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c5387d Table: 8670c019 DAC: 00000015
Process dvr_rdk_demo_mc (pid: 1214, stack limit = 0xc44742e8)
Stack: (0xc4475e70 to 0xc4476000)
5e60: bf081654 bf07280c fffffffe c4474000
5e80: c01cf35a 47a8ed64 00000017 47a8ed64 c4475ef4 c4475ea0 bf0c8cdc bf089894
5ea0: c01cf35a 47a8ed64 cbbc4000 ffffffff 00000000 4036c03c 00000000 5075c5c3
5ec0: 0005e9fa 00000017 00005452 c020660b 00000000 c442e980 00000017 00000000
5ee0: c442e980 00000017 c4475f04 c4475ef8 c00d1fe4 bf0c885c c4475f74 c4475f08
5f00: c00d26f4 c00d1fc8 c4475f24 c4475f18 c0050b88 c0063f34 c4475f5c c4475f28
5f20: c008adc4 c0050b7c 00000001 00000000 003eb9d0 c4475f80 47a8ed78 c4475f80
5f40: 0000004e c0043fa8 c4474000 00000000 47a8ed64 c01cf35a 00000017 c442e980
5f60: c4474000 00000000 c4475fa4 c4475f78 c00d278c c00d2200 00000000 00000001
5f80: 5075c5c3 47a8ed64 c01cf35a 0034d4c8 00000036 c0043fa8 00000000 c4475fa8
5fa0: c0043e00 c00d2740 47a8ed64 c01cf35a 00000017 c01cf35a 47a8ed64 00000001
5fc0: 47a8ed64 c01cf35a 0034d4c8 00000036 000754c1 003ebcd8 00004c78 0000025c
5fe0: 0034d4ec 47a8ed38 0006b668 40300aec 20000010 00000017 00000000 00000000
Backtrace:
[<bf089888>] (ListMP_getHead+0x0/0x2a4 [syslink]) from [<bf0c8cdc>] (ListMPDrv_ioctl+0x48c/0x8c0 [syslink])
r8:47a8ed64 r7:00000017 r6:47a8ed64 r5:c01cf35a r4:c4474000
[<bf0c8850>] (ListMPDrv_ioctl+0x0/0x8c0 [syslink]) from [<c00d1fe4>] (vfs_ioctl+0x28/0x44)
r6:00000017 r5:c442e980 r4:00000000
[<c00d1fbc>] (vfs_ioctl+0x0/0x44) from [<c00d26f4>] (do_vfs_ioctl+0x500/0x540)
[<c00d21f4>] (do_vfs_ioctl+0x0/0x540) from [<c00d278c>] (sys_ioctl+0x58/0x7c)
[<c00d2734>] (sys_ioctl+0x0/0x7c) from [<c0043e00>] (ret_fast_syscall+0x0/0x30)
r8:c0043fa8 r7:00000036 r6:0034d4c8 r5:c01cf35a r4:47a8ed64
Code: e5942000 e5953008 e5832008 e5943004 (e5863004)
---[ end trace 07f6767875b5bbe0 ]---

[host] IPC_BITSINLINK:!WARNING!.Commands not being processed by link.TimeSinceLastAlloc:4068,TimeSinceLastFree:4068
[host] IPC_BITSINLINK:!WARNING!.Commands not being processed by link.TimeSinceLastAlloc:4084,TimeSinceLastFree:4084
[host] IPC_BITSINLINK:!WARNING!.Commands not being processed by link.TimeSinceLastAlloc:4100,TimeSinceLastFree:4100
[host] IPC_BITSINLINK:!WARNING!.Commands not being processed by link.TimeSinceLastAlloc:4116,TimeSinceLastFree:4116
[host] IPC_BITSINLINK:!WARNING!.Commands not being processed by link.TimeSinceLastAlloc:4132,TimeSinceLastFree:4132
[host] IPC_BITSINLINK:!WARNING!.Commands not being processed by link.TimeSinceLastAlloc:4148,TimeSinceLastFree:4148
[host] IPC_BITSINLINK:!WARNING!.Commands not being processed by link.TimeSinceLastAlloc:4164,TimeSinceLastFree:4164
[host] IPC_BITSINLINK:!WARNING!.Commands not being processed by link.TimeSinceLastAlloc:4180,TimeSinceLastFree:4180
[host] IPC_BITSINLINK:!WARNING!.Commands not being processed by link.TimeSinceLastAlloc:4196,TimeSinceLastFree:4196
[host] IPC_BITSINLINK:!WARNING!.Commands not being processed by link.TimeSinceLastAlloc:4212,TimeSinceLastFree:4212
[host] IPC_BITSINLINK:!WARNING!.Commands not being processed by link.TimeSinceLastAlloc:4228,TimeSinceLastFree:4228
[host] IPC_BITSINLINK:!WARNING!.Commands not being processed by link.TimeSinceLastAlloc:4244,TimeSinceLastFree:4244
[host] IPC_BITSINLINK:!WARNING!.Commands not being processed by link.TimeSinceLastAlloc:4260,TimeSinceLastFree:4260
[host] IPC_BITSINLINK:!WARNING!.Commands not being processed by link.TimeSinceLastAlloc:4277,TimeSinceLastFree:4277
[host] IPC_BITSINLINK:!WARNING!.Commands not being processed by link.TimeSinceLastAlloc:4293,TimeSinceLastFree:4293
[host] IPC_BITSINLINK:!WARNING!.Commands not being processed by link.TimeSinceLastAlloc:4309,TimeSinceLastFree:4309

Who can tell me how to fix this issue.

I look foward to see expert reply.

Best Regards.

  • The error indicates that SharedRegion memory is corrupted. This can happen due to VIP overflow or due to VIP capture writing beyond allocated buffer.

    What is the silicon revision you are using.

    Do you see any VIP overflow msg when you disconnect the capture.

    Check if the following code marked in bold is present in your codebase.Below code ensures VIP will not write beyond configured size.

    /dvr_rdk/mcfw/src_bios6/links_m3vpss/capture/captureLink_drv.c

     

    Int32 CaptureLink_drvCreateInst(CaptureLink_Obj * pObj, UInt16 instId)

     

            if (CaptureLink_drvIsDataFormatTiled(pVipCreateArgs, outId))
            {
                pVipOutPrm->pitch[0] = VPSUTILS_TILER_CNT_8BIT_PITCH;
                pVipOutPrm->pitch[1] = VPSUTILS_TILER_CNT_16BIT_PITCH;
            }

            pVipOutPrm->pitch[2] = 0;

            pVipOutPrm->scEnable = pOutPrm->scEnable;

            if (pInst->maxHeight <= 288)
            {
                pVipOutPrm->maxOutHeight = VPS_CAPT_MAX_OUT_HEIGHT_288_LINES;
            }
            else if (pInst->maxHeight <= 576)
            {
                pVipOutPrm->maxOutHeight = VPS_CAPT_MAX_OUT_HEIGHT_576_LINES;
            }
            else if (pInst->maxHeight <= 720)
            {
                pVipOutPrm->maxOutHeight = VPS_CAPT_MAX_OUT_HEIGHT_720_LINES;
            }
            else if (pInst->maxHeight <= 1080)
            {
                pVipOutPrm->maxOutHeight = VPS_CAPT_MAX_OUT_HEIGHT_1080_LINES;
            }
            else
            {
                pVipOutPrm->maxOutHeight = VPS_CAPT_MAX_OUT_HEIGHT_UNLIMITED;
            }

            /* KC:
                 No need to keep unlimited height
                 This was kept mainly for debug and statistics collection purpose.
                 In real system we should limit the height to max expected
            */
            // pVipOutPrm->maxOutHeight = VPS_CAPT_MAX_OUT_HEIGHT_UNLIMITED;

            if (pInst->maxWidth <= 352)
            {
                pVipOutPrm->maxOutWidth = VPS_CAPT_MAX_OUT_WIDTH_352_PIXELS;
            }
            else if (pInst->maxWidth <= 768)
            {
                pVipOutPrm->maxOutWidth = VPS_CAPT_MAX_OUT_WIDTH_768_PIXELS;
            }
            else if (pInst->maxWidth <= 1280)
            {
                pVipOutPrm->maxOutWidth = VPS_CAPT_MAX_OUT_WIDTH_1280_PIXELS;
            }
            else if (pInst->maxWidth <= 1920)
            {
                pVipOutPrm->maxOutWidth = VPS_CAPT_MAX_OUT_WIDTH_1920_PIXELS;
            }
            else
            {
                pVipOutPrm->maxOutWidth = VPS_CAPT_MAX_OUT_WIDTH_UNLIMITED;
            }

     

     

  • Hi Badri

    Very happy see your reply, thanks you!

    1. I use TMS320DM8148BCYEA0, PG2.1

    2. Yes, I  often see  VIP overflow message when start run the usecase, But when I stop

       video device, I don't see  VIP overflow message, I will check and tell you later.

    3. My video resolution is 1600x1200, How to change code to fit my video resolution?

    Best Regards.

        

  • First configure capture driver maxWidth height to 1920 x 1080 and check you no longer see the memory corruption issue. The 1200 will get cropped to 1080 but this is expected and this is only for test.

    To support 1200 maxHeight is difficult as you have to configure the VIP maxHeight as UNLIMITED as only maxHeight of upto 1080 is supported by VIP hardware.

    I discussed with Brijesh who is the HDVPSS expert and his advice is :

    "The fix is to add x line interrupt in the VIP driver and x line is set to 1201, so whenever this interrupt comes, it is sure that the VPDMA is receiving more than 1200 lines, to in this case, stop the VIP port in the interrupt and restart it. It will still store few more lines, because this is client interrupt, so we could keep buffer of size, 1210 and restart the VIP port when this interrupt comes."

    This fix requires a change in HDVPSS driver and is not available in DVR RDK HDVPSS driver package.

    DVR RDK HDVPSS has support for xline interrupt. The HDVPSS driver code has to be modified to restart the VIP from the xline interrupt.

  • Hi Badri

    Thanks for your reply.

    1. I am sure when stop video device , I didn't see the VIP overflow message. But when start

    run usecase , the overflow message show ervery times.

    2. I will follow your advice test with 1920x1080  and tell the result later.

    3. How to modify HDVPSS driver code to response xline interrupt, Would you give some example code ?

    Best Regards.


  • Hi Allen,

    Could you capture 1600x1200 resolution successfully?

    I am using RDK4.0 and make some modify for capturing 1600x1200.

    Please refer the below link:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/287624/1026294.aspx#1026294

    I dont modify HDVPSS driver. It seems something wrong happened.

    BR,

    Steven