小结一下tearing的问题,tearing可以分为source buffer tearing和destination tearing:
1、source buffer tearing
source buffer tearing是由于上层软件写framebuffer的速度快于MDP dma更新lcd的速度导致的,具体下下面的示意图。具体怎么判断呢?可以在MDP_drv.c中的mdp_pipe_ctrl()函数设置断点,按F5调试运行,如果此时屏幕出现tearing现象,则我们可以判断是source buffer tearing的问题。至于如何解决的话,可以在update framebuffer时,先判断一下mdp mda是否正在更新,如果是的话,需要等待。
2、destination tearing
destination tearing是由GRAM的读写速度不一致导致的,具体见下图。destination tearing只会发生接口是MDDI或者EBI2的时候,可以用vsync信号来解决。