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 driver : Kernel bug: VPSS_FVID2: queue timeout

Other Parts Discussed in Thread: TVP7002

Hi all,

I am using ezsdk_5_03_01_15.

After running my capture-encode application for longer duration for 720P resolution, I randomly get following kernel crash.

VPSS_FVID2: queue timeout
kernel BUG at drivers/media/video/ti81xx/ti81xxvin_main.c:829!

Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = d2c2c000

[00000000] *pgd=92cdc031, *pte=00000000, *ppte=00000000
Internal error: Oops: 817 [#1]
last sysfs file: /sys/power/state
Modules linked in: omaplfb pvrsrvkm ti81xxhdmi ti81xxvin tvp7002 ti81xxvo ti81xxfb vpss syslink
CPU: 0    Tainted: G        W    (2.6.37 #2)
PC is at __bug+0x20/0x2c
LR is at release_console_sem+0x198/0x1ac
pc : [<c0048dd8>]    lr : [<c006cae0>]    psr: 60000113
sp : c75a9b90  ip : c75a9ac8  fp : c75a9b9c
r10: 00000000  r9 : c75a9e08  r8 : c75a9e08
r7 : d0464504  r6 : cb63e880  r5 : d0464400  r4 : d2779800
r3 : 00000000  r2 : c04dd3f0  r1 : 00007447  r0 : 00000045
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c5387d  Table: 92c2c019  DAC: 00000015

Does any one know what is the root cause and fix for this issue ?

Regards,
Sweta

  • Hi,

    This is solved in latest EZSDK release + few patches posted on community. Please refer to following threads for details.

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/p/186865/675787.aspx#675787

    Regards,

    Hardik Shah

  • Hi Hardik,

    Thanks for quick help.
    Can you exactly tell me whether the fix for FVID2 timeout is only in Linux driver (A8) or it is in firmware binary at M3 ?

    Since I am using Android, I want to take minimal changes to fix timeout error, keeping ezsdk_5_03 as reference. Porting ezsdk_5_04 on Android will be a big task at this point of time, so please tell me the exact source for this fix.

    Regards,
    Sweta

  • Hi,

    Changes are there only on A8 side video drivers. You can take those patches and port it to your version of PSP

    Regards,

    Hardik Shah

  • Hi Hardik,

    As I understand, first two patches are to be applied for my issue.

    I applied following patches to the base PSP.

    0001-TI81xx-Capture-IR-Kernel-dump-is-seen-on-starting-ca.patch

    0002-TI81xx-Video-Proxy-Same-containers-are-used-for-Queu.patch

    After applying these patches, the frequency of occurrence of issue is reduced. But I got following error now.

    VPSS_FVID2: contrl event 0x5 timeout
    VPSS_FVID2: queue timeout

    What can be the reason for the same ?

    Regards,

    Sweta

  • Hi,

    You should be applying all patches. What made you think that only first two patches are important?

    Regards,

    Hardik Shah

  • Hi Hardik,

    From the description of patches, I understood 1 & 2 relevant for my use-case and issue.

    Any ways, to be on same page, I applied all the 5 patches and still I am getting FVID timeout error unfortunately.

    I also nailed down, that the issue is at HDVPSS side. I am getting assertion, when kernel says FVID timeout.

    Please see log below for the reference.

    N:VPSS  P:2 #:00370 T:0000000bae8595fd S:Module<OMX.TI.VPSSM3.VFPC.INDTXSCWB> Leaving<OMX_BASE_DIO_Control> @line<452> with error<0:ErrorNone>
    N:Video P:1 #:00393 T:0000000b2528b61d S:StopInstance: HDVICP_1
    N:VPSS  P:2 #:00371 T:0000000bae8607a9 S:Module<OMX.TI.VPSSM3.VFPC.INDTXSCWB> Entering<OMX_BASE_DIO_Control> @line<446>
    N:Video P:1 #:00394 T:0000000b25ad4853 S:StartInstance: HDVICP_1
    N:VPSS  P:2 #:00372 T:0000000bae899d5d S:Module<OMX.TI.VPSSM3.VFPC.INDTXSCWB> Leaving<OMX_BASE_DIO_Control> @line<452> with error<0:ErrorNone>
    N:Video P:1 #:00395 T:0000000b25db7b1b S:StopInstance: HDVICP_1
    N:VPSS  P:2 #:00373 T:0000000bae8b179b S:Module<OMX.TI.VPSSM3.VFPC.INDTXSCWB> Leaving<_OMX_BASE_EventNotifyToClient> @line<1171> with error<0:ErrorNone>
    N:Video P:1 #:00396 T:0000000b2666606d S:StartInstance: HDVICP_1
    N:VPSS  P:2 #:00374 T:0000000bae8b8565 S:Module<OMX.TI.VPSSM3.VFPC.INDTXSCWB> Leaving<OMX_BASE_PROCESS_CmdCompleteEvent> @line<930> with error<0:ErrorNone>
    N:Video P:1 #:00397 T:0000000b2694ef81 S:StopInstance: HDVICP_1
    N:VPSS  P:2 #:00375 T:0000000bae8bf3e3 S:Module<OMX.TI.VPSSM3.VFPC.INDTXSCWB> Leaving<OMX_BASE_CmdCompleteEventHandler> @line<496> with error<0:ErrorNone>
    N:Video P:1 #:00398 T:0000000b273ada37 S:StartInstance: HDVICP_1
    N:VPSS  P:2 #:00376 T:0000000bae8c62c5 S:Module<OMX.TI.VPSSM3.VFPC.INDTXSCWB> Entering<OMX_BASE_CmdEventHandler> @line<434>
    N:Video P:1 #:00399 T:0000000b27698fa5 S:StopInstance: HDVICP_1
    N:VPSS  P:2 #:00377 T:0000000bae8cc643 S:Module<OMX.TI.VPSSM3.VFPC.INDTXSCWB> Leaving<OMX_BASE_CmdEventHandler> @line<466> with error<0:ErrorNone>
    N:Video P:1 #:00400 T:0000000b27f21dc1 S:StartInstance: HDVICP_1
    N:VPSS  P:2 #:00378 T:00000114d138b64f S: 2376362: Assertion @ Line: 520 in drivers/capture/src/vpsdrv_captureApi.c: queStatus == FVID2_SOK : failed !!!
    N:Video P:1 #:00401 T:0000000b28204d53 S:StopInstance: HDVICP_1
    N:Video P:1 #:00402 T:0000000b28908e7b S:StartInstance: HDVICP_1
    N:Video P:1 #:00403 T:0000000b28bf2913 S:StopInstance: HDVICP_1
    N:Video P:1 #:00404 T:0000000b29663067 S:StartInstance: HDVICP_1
    N:Video P:1 #:00405 T:0000000b2994ee3d S:StopInstance: HDVICP_1
    N:Video P:1 #:00406 T:0000000b2a06d1c9 S:StartInstance: HDVICP_1
    N:Video P:1 #:00407 T:0000000b2a3552af S:StopInstance: HDVICP_1

    Can you tell me what is the reason for this assertion ?

    Just to reiterate, I am using firmware binary of ezsdk_5_03_01_15 and linux from the same ezsdk, on top of this kernel, I applied all 5 patches.

    Regards,
    Sweta

  • Hi,

    These patches are tested with SDK5.04 so this will be really difficult to debug. You also may be corrupting M3 memory. I am not very sure. Above error status says that you can queuing buffers more than M3 queue can receive. This queue is 16 elements deep. So I think something is getting corrupted.

    Regards,

    Hardik Shah

  • Hi Hardik,

    1) By corruption of M3 memory, if you mean to say that my buffer addresses (for queue/dequeue) are corrupted, then this is not the case.

    I have already checked for above and addresses are same when this issue occurs.

    2) I have also ensured that I am queueing only 4 buffers, not more than that.

    Let me know if there is any other possibility.

    It would be very helpful if you can help me understand, whether the issue is at M3 or A8 ?

    Since I get assertion from M3, I would like to double check, if TI has fixed this issue in firmware binaries of SDK4, due to which you are not getting this error.

    If you can say that the issue is solely on ARM, then I can take latest linux kernel as reference with firmware binary of ezsdk_5_03_01_15 to check solution of issue as something else (some fix beyond these 5 patches which is there in latest Linux kernel).

    Thanks,
    Sweta

  • Hi,

    Did it solve after that?

    I also have the same problem.

    (SDK5.04 + 5 patches =>VPSS_FVID2: queue timeout)

    Regards,

    Hatta

  • Hi,


    No. It is not resolved for me yet, although frequency of queue timeout has been reduced.

    Regards,
    Sweta

  • Hi,

    I am using EZSDK_05.05.02.

    While running video playback at high bit rate (44.7mbps), after 12+ hours of run, I got the same error VPSS_FVID2 queue timeout.

    Do I need to apply the patches on EZSDK 05.05.02 too?

    Salim