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.

AM5728: VIP_FIQ_STATUS register

Guru 10085 points
Part Number: AM5728

Sitara Support Team,

My customer is using an HDMI receiver (ADV7611) connected to port_A of VIP on a custom board
with AM5728 to capture HDMI signal with gstreamer.
S/W: Linux SDKv4.1.0.6

I have two questions about the following phenomenon, and would appreciate your answers.

Sometimes, the following log is generated.
[2021-01-27 20:52:53.747] [ 3035.293646] vip1-s0: VIP_PORTA_OUTPUT_FIFO_YUV
[2021-01-27 20:52:53.747] [ 3035.298859] vip1-s0: vip_overflow_recovery_work: Port A

The log is output five times as a set, and the frequency of occurrence is indeterminate: some occur immediately after startup,
some occur every second after a while, and some occur 25 minutes after startup.
The frequency of occurrence is not fixed.

The problem occurs when I start gstreamer with the following parameters.

==============================================================================================================

gst-launch-1.0 v4l2src device=/dev/video1 io-mode=4 ! tee name=s s. ! queue ! vpe ! video/x-raw,format=NV12,width=1280,height=720 ! waylandsink use-drm=true sync=false s. ! queue ! vpe ! videorate ! video/x-raw,format=NV12,width=640,height=360,framerate=4/1 ! ducatijpegenc ! multifilesink max-files=1 location=/tmp/html/data/HDMIinput.jpg sync=false s. ! queue ! vpe ! video/x-raw,format=NV12,width=960,height=540 ! videorate max-rate=15 drop-only=true ! ducatih264enc intra-interval=60 bitrate=512 rate-preset=1 ! h264parse ! rtph264pay ! udpsink host=172.31.11.1 port=31020 sync=false
==============================================================================================================

The customer investigated and found that the output was generated by handle_parser_irqs() in the VIP driver (drivers/media/platform/ti-vpe/vip.c), and checking the factors, it was found that bit4 of the VIP_FIQ_STATUS register in the VIP Parser; the OUTPUT_FIFO_PRTA_LUMA_STATUS of VIP_FIQ_STATUS register of VIP Parser was set to "1".

Question 1
Can you please confirm the conditions under which the above bit is set to 1?
We think that the video data sent from the HDMI receiver is DMA-transferred
by VPDMA via VIP port_A, but the VPDMA memory transfer does not arrive
in time and the FIFO on the VIP side overflows.

Question 2
In the description of bit4 of VIP_FIQ_STATUS register of VIP Parser; OUTPUT_FIFO_PRTA_LUMA_STATUS,
there is "Output FIFO Port A Luma Overflow Status". Is it correct that this Output FIFO is the FIFO
between the Port_A side of the VIP Parser and the VPDMA?

Please let me know if there are any other information you need to verify.

Best regards,
Kanae

  • Hi Sitara support Team,

    Can someone please reply me about this post?
    Please let me know if there is any information needed to answer.

    Best regards,
    Kanae

  • Hi Kanae,

    Please find answers to your questions below.

    #1, Even in case of erroneous input signal, the overflow could potentially occur. It looks like it is coming when you are starting gstreamer application. Apart from capture, what else is running in the system? Also can you please read VIP size register to make sure it is receiving good signal?

    #2, yep, i thin that's correct.  

    Regards,

    Brijesh

  • Hi Brijesh.

    Thank you for your reply.

    >Apart from capture, what else is running in the system?

    My customer is running "gstreamer, weston, pulse_audio, and the custom program" for jpeg conversion.
    He are also using LAN to communicate with external devices.

    He is still checking if the VIP size register is read and the signal is received correctly,
    so I will post the result here as soon as I get it.

    Best regards,
    Kanae

  • Hi Kanae,

    VIP overflow can typically happen due to oversubscribe BW or some erroneous input signal.

    From the above description. the BW may not be high. Still could you check what would be BW? If possible, could you please just run VIP capture, just to see if issue is due to BW? 

    Also please check the size register. 

    Regards,

    Brijesh

  • Hi Brijesh,

    Thank you for your reply.

    1. When you say "run VIP capture", you don't mean a specific program,
    but just the capture process without running any other process.
    Is my understanding correct?

    Or if you mean a specific program, could you please tell me how to run VIP capture?
    If you have any documentation about VIP capture, please provide it.

    Also, should I post the result of running VIP capture?

    2. Regarding the size register, my customer was confirmed as follows.

    During stable operation, the resolution of the HDMI input was 720x480.
    When the problem occurred, the resolution was 640x480.

    [ 14.154287] ### VIP_OUTPUT_PORT_A_SRC0_SIZE = 0x028001e0

    The above log is obtained by the handle_parser_irqs() function in vip.c.

     reg = reg_read(parser, VIP_PARSER_PORTA_SRC0_SIZE);
     pr_err("### VIP_OUTPUT_PORT_A_SRC0_SIZE = 0x%08x\n", reg);


    The device used for HDMI input is a Panasonic BD player (DMP-BD65).
    Since this event does not occur with another HDMI input device,
    is it necessary to wait until the HDMI recognition is stable before starting gstreamer?

    Best regards,
    Kanae

  • Hi kanae,

    #1, yes, just run the VIP program alone and see if there is any overflow.

    #2, oh ok, what all other modules do you use in VIP? Like do you use inline scalar for down scaling? or do you use down sampler to convert format to YUV420? If this is the case, then reduction in size can potentially overflow the VIP. So i would suggest to wait for the stable frame to arrive before starting encoding. 

    Regards,

    Brijesh

  • Hi Brijesh,

    Thank you for your support.

    #1. I am requesting the customer to confirm if the error occurs with only VIP capture and no other process running.

    #2. I will check with the customer to see what other modules are being used in VIP.
     If the customer is running size reduction, etc., I will ask them to modify it
     so that it waits for a stable frame to arrive before starting the recommended encoding.

    Best regards,
    Kanae

  • ok thank you Kanae

  • Hi Brijesh,

    I am currently checking what other modules are being used in VIP.
    I will contact you as soon as we get the answer.

    The following is a report of what my customer is currently confirming.

    # This overflow phenomenon is only occurring when using a Panasonic BD player (DMP-BD65).

    #The overflow does not occur when only the VIP capture process is executed and no other process is executed.

    Based on the above results, he checked his process and found that gstreamer may be started
    when the HDMI input is not stable.

    Currently, he is working on a software fix to start gstreamer after the HDMI input is stable,
    and I will post the results here as soon as they are available.

    Best regards,
    Kanae

  • Thanks for the update Kanae. Will wait for your update.

  • Hi Brijesh,

    The result of the software modification to start gstreamer after the HDMI input is stable is as follows.

    # After reading the resolution register of the ADV7611 in 500ms cycles and changing it to startthe gstreamer
    when the HDMI input resolution matches 5 times in a row, this event no longer occurs.

    Also, when the HDMI input is fixed and the HDMI input cable is unplugged in time for gstreamer to start,
    this event occurs, so my customer concludes that the cause is starting gstreamer while the HDMI input is unstable.

    I would like to close this thread.
    Thank you very much for your support.

    Best regards,
    Kanae