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.

DRA71XEVM: VDRM + VisionSDK image output tearing

Part Number: DRA71XEVM

hi all,

i run my app on A15 side, transfer the gbm buffer to visionSDK M4 DSS by VDRM, but when texture is changing frequently , the output image is tearing.

the chains as following:

GrpxSrc_Clean -> Merge_Gfx

DispDistSrc_Demo ->  Gate_Demo -> Merge_Gfx -> Display_gfx

i read the suggestion of wiki: 

and i modify the powervr.ini.

i try to set GbmNumBuffers=4, and the tearing issue can be improved, but when texture is changing frequently and the changing is not very smoother than output by DRM.

i also try to set GbmNumBuffers=6, the tearing issue is becoming more badly.

so i feel confused, why more gbm buffer , tearing issue can not improved?

my vision sdk version is 0304, 

best regards!

  • Hi Fanuk,

    what is the behavior when you set GbmNumBuffers=5?

    regards,

    Yordan

  • hi Yordan,

    The behavior is better than setting to 6 and worse than setting to 4.

    best regards!

  • What is merge_demo link and gate_demo link doing? What is Grpx_clean?

  • hi Subhajit P,

    gate_demo is a link that control the previous link buffer whether send to next link or not.

    merge_demo is a link that the next link can control switch to which channel (GrpxSrc_Clean or DispDistSrc_Demo)

    Grpx_clean is a link for graphing an image.

    best regards!

  • Are you using gate_demo to control FPS? Is there any link in your chain that is returning buffers to prev-link without sending it to next link?

  • gate_demo link for controlling ON or OFF not FPS.

    when gate_demo link setting to OFF, return buffer to prev-link without sending it to next link.

  • Do you dynamically turn on / off gate_demo link?

    Or i it done only once per boot?

  • hi Subhajit Paul,

    of course not turn on or off frequently, only turn on once when boot.

    best regards!

  • Can you send me some patches that can be applied on processor_sdk_vision 3.06.00.00 so that I can reproduce this issue locally?

    Or can you send me a small application that I can run on TI EVM and reproduce this issue?

  • hi Subhajit P,

    sorry, i can not send you our application, and vision_sdk just create this use case

    DispDistSrc_Demo ->  Gate_Demo -> Merge_Gfx -> Display_gfx

    can you use kmscube to reproduce this issue? by setting FPS to 60 frame, and picture move from left to right on the screen,

    it may see the tearing?

    best regards!

  • Hi Fanok,

    just to update you - Subhajit is currently out of office and will be able to reply next week.

    Regards,

    Yordan

  • Fanok,

    I tried to build the usecase you mentioned, but I could not reproduce the issue.

    Is there anything I try in addition to what you suggested?

    - Subhajit

  • hi Subhajit P

    did you create the usecase like me as following?

    GrpxSrc_Clean -> Merge_Gfx

    DispDistSrc_Demo ->  Gate_Demo -> Merge_Gfx -> Display_gfx

    i run kmscube on my board, and the following attachment is the video i recored.

    you can see the image tearing is very obviously 

    i and dump the dispdistlink and displaylink receive buffer log:

    you can see sometime, dispDistSrclink receive two buffer from VDRM, but displaylink just consume one buffer, it means that

    one buffer was discarded, why dispDistSrcLink send buffer to next link by IPC discard one buffer?.

    [HOST] [IPU2  ]     15.428902 s: DISPLAY: 3 receive buffer: 0xfb900000!!
     [HOST] [HOST  ]     15.444366 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfbf00000
     [HOST] [IPU2  ]     15.444671 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.444915 s: DISPLAY: 3 receive buffer: 0xfbf00000!!
     [HOST] [HOST  ]     15.460379 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfad00000
     [HOST] [HOST  ]     15.476392 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfb300000
     [HOST] [IPU2  ]     15.476697 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.476910 s: DISPLAY: 3 receive buffer: 0xfb300000!!
     [HOST] [HOST  ]     15.492374 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfb900000
     [HOST] [IPU2  ]     15.492679 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.492893 s: DISPLAY: 3 receive buffer: 0xfb900000!!
     [HOST] [HOST  ]     15.508387 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfbf00000
     [HOST] [IPU2  ]     15.508692 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.508906 s: DISPLAY: 3 receive buffer: 0xfbf00000!!
     [HOST] [HOST  ]     15.524400 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfad00000
     [HOST] [IPU2  ]     15.524705 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.524919 s: DISPLAY: 3 receive buffer: 0xfad00000!!
     [HOST] [HOST  ]     15.540383 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfb300000
     [HOST] [HOST  ]     15.556365 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfb900000
     [HOST] [IPU2  ]     15.556670 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.556884 s: DISPLAY: 3 receive buffer: 0xfb900000!!
     [HOST] [HOST  ]     15.572378 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfbf00000
     [HOST] [IPU2  ]     15.572683 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.572896 s: DISPLAY: 3 receive buffer: 0xfbf00000!!
     [HOST] [HOST  ]     15.588391 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfad00000
     [HOST] [IPU2  ]     15.588665 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.588909 s: DISPLAY: 3 receive buffer: 0xfad00000!!
     [HOST] [HOST  ]     15.604373 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfb300000
     [HOST] [IPU2  ]     15.604678 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.604892 s: DISPLAY: 3 receive buffer: 0xfb300000!!
     [HOST] [HOST  ]     15.620417 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfb900000
     [HOST] [HOST  ]     15.636369 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfbf00000
     [HOST] [IPU2  ]     15.636674 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.636887 s: DISPLAY: 3 receive buffer: 0xfbf00000!!
     [HOST] [HOST  ]     15.652382 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfad00000
     [HOST] [IPU2  ]     15.652687 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.652900 s: DISPLAY: 3 receive buffer: 0xfad00000!!
     [HOST] [HOST  ]     15.668395 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfb300000
     [HOST] [IPU2  ]     15.668700 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.668913 s: DISPLAY: 3 receive buffer: 0xfb300000!!
     [HOST] [HOST  ]     15.684407 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfb900000
     [HOST] [IPU2  ]     15.684712 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.684956 s: DISPLAY: 3 receive buffer: 0xfb900000!!
     [HOST] [HOST  ]     15.700390 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfbf00000
     [HOST] [HOST  ]     15.716403 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfad00000
     [HOST] [IPU2  ]     15.716708 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.716921 s: DISPLAY: 3 receive buffer: 0xfad00000!!
     [HOST] [HOST  ]     15.732385 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfb300000
     [HOST] [IPU2  ]     15.732690 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.732904 s: DISPLAY: 3 receive buffer: 0xfb300000!!
     [HOST] [HOST  ]     15.748368 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfb900000
     [HOST] [IPU2  ]     15.748673 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.748917 s: DISPLAY: 3 receive buffer: 0xfb900000!!
     [HOST] [HOST  ]     15.764381 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfbf00000
     [HOST] [IPU2  ]     15.764686 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.764930 s: DISPLAY: 3 receive buffer: 0xfbf00000!!
     [HOST] [HOST  ]     15.780394 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfad00000
     [HOST] [HOST  ]     15.796376 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfb300000
     [HOST] [IPU2  ]     15.796681 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.796895 s: DISPLAY: 3 receive buffer: 0xfb300000!!
     [HOST] [HOST  ]     15.812389 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfb900000
     [HOST] [IPU2  ]     15.812694 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.812907 s: DISPLAY: 3 receive buffer: 0xfb900000!!
     [HOST] [HOST  ]     15.828371 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfbf00000
     [HOST] [IPU2  ]     15.828676 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.828890 s: DISPLAY: 3 receive buffer: 0xfbf00000!!
     [HOST] [HOST  ]     15.844384 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfad00000
     [HOST] [IPU2  ]     15.844689 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.844903 s: DISPLAY: 3 receive buffer: 0xfad00000!!
     [HOST] [HOST  ]     15.860397 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfb300000
     [HOST] [HOST  ]     15.876380 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfb900000
     [HOST] [IPU2  ]     15.876685 s: Gate sent to next link!
     [HOST] [IPU2  ]     15.876898 s: DISPLAY: 3 receive buffer: 0xfb900000!!
     [HOST] [HOST  ]     15.892393 s: DispDistSrc link: /dev/vdrm-controller-0, bufferAddr = 0xfbf00000

    best regards! 

  • Fanok,

    since dispdistsrc and weston do not work in a closed loop (weston sends the frame and does not wait for an ACK), this situation can arise when any link after dispdistsrc is running at a slightly lower rate.

    The rate at which weston is producing data is controlled by the vdrm fps (configured in device tree) and an internal timer maintains the rate

    One possible workaround is to lower the vdrm fps in the device-tree. if it is set to 60 fps currently, set it to 45 or 50 and see if  it solves your issue.

    - Subhajit

  • hi Subhajit

    i try modify the vdrm fps to 50 in DTS, but the issue is still here. i will try more lower fps.

    the following video is 50 fps:

    you can see it is not correct too.

    best regards

  • Fanok,

    can you also verify what FPS the gatelink, mergelink etc (all links after dispdistsrc) are running at? Find the lowest number.

    - Subhajit

  • hi Subhajit,

    other links are just task waiting the event, can not caculate FPS for them.

    best regards!