现象:
A133 下 720x1440分辨率的LCD,使用GPU的应用屏幕大幅变化的时候会撕裂
分析:
这个问题可能与buffer对齐相关
gpu需要的framebuffer需要宽32对齐
有小数点,不是对齐的
720/32=22.5
可以整除,是对齐的
736/32=23
解决方案:
1、将 board.dts 中的,
fb0_width = 720,fb0_height = 1440
改为:
fb0_width = 736,fb0_height = 1440
lcd保持不变:
lcd_x = 720,lcd_y = 1440
2. dev_fb.c 代码补丁:
diff --git a/drivers/video/fbdev/sunxi/disp2/disp/dev_fb.c b/drivers/video/fbdev/sunxi/disp2/disp/dev_fb.c
index 224eff6e6f67..6f87b0327e99 100644
--- a/drivers/video/fbdev/sunxi/disp2/disp/dev_fb.c
+++ b/drivers/video/fbdev/sunxi/disp2/disp/dev_fb.c
@@ -716,9 +716,9 @@ static int sunxi_fb_pan_display(struct fb_var_screeninfo *var,
config.info.fb.crop.y =
((unsigned long long)(var->yoffset)) << 32;
config.info.fb.crop.width =
- ((long long)var->xres) << 32;
+ ((long long)config.info.screen_win.width) << 32;
config.info.fb.crop.height =
- ((long long)(var->yres / buffer_num)) << 32;
+ ((long long)(config.info.screen_win.height / buffer_num)) << 32;
#if defined(CONFIG_SUNXI_DISP2_FB_ROTATION_SUPPORT)
if (mgr->rot_sw && mgr->rot_sw->apply) {
3、如果是QT的应用程序,上层还是按照这个配置,这样就只在720x1440上面绘图
export QT_QPA_EGLFS_WIDTH=720
export QT_QPA_EGLFS_HEIGHT=1440
离线
修复前,撕裂!
离线
修改后,无撕裂!
离线
大佬,要不研究下A133的QT双缓冲切换问题。在静态画面下,最后一帧在缓冲内一直不显示的毛病。
具体是什么情况呢,有视频吗?
离线