• Manjunathappa, Prakash's avatar
    video: da8xx-fb: fix flicker due to 1 frame delay in updated frame · deb95c6c
    Manjunathappa, Prakash authored
    Flicker/tearing effect is observed with current FB driver.
    Issue is because of 2 active DMA channels ping ponging among them
    along with usage of 2 DDR ping pong buffers in driver. Application
    unaware of active DMA channel keeps updating frame being displayed,
    this leads to tearing effect.
    Below steps describes the issue:
    1)Initially assume both buffers FB0 and FB1 are programmed for buffer-0.
    2)On EOF0: Program FB0 for buffer-1, indicate(wake up) application
     to fill up buffer-0. As FB1 is active and continues to DMA buffer-0
    (which is being filled), leading to tearing/flickering issue.
    3)On EOF1: Program FB1 for buffer-0, indicate(wake up) application to
     fill up buffer-1. As FB0 is active and continues to DMA buffer-1(which
     is being filled), leading to tearing/flickering issue.
    4)On EOF0: Program FB0 for buffer-1, indicate(wake up) application to
    fill up buffer-0. As FB1 is active and continues to DMA buffer-0(which is
    being filled), leading to tearing/flickering issue.
    ...
    Above steps depict that issue is because of 1 frame delay in frame
    panned by application.
    
    Patch fixes the issue by keeping track free DMA channel and configures
    it in drivers PAN callback so that panned frame from application gets
    displayed in next frame period.
    
    Wiki below describes the issue in detail and it also has link to
    application with which issue can be reproduced.
    http://processors.wiki.ti.com/index.php/DA8xx_LCDC_Linux_FB_FAQsSigned-off-by: default avatarNellutla, Aditya <aditya.n@ti.com>
    Signed-off-by: default avatarManjunathappa, Prakash <prakash.pm@ti.com>
    Signed-off-by: default avatarFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
    deb95c6c
da8xx-fb.c 35.7 KB