【宁静致远】D1h开发板双屏异显

当MIPI和HDMI都能正常显示之后,下面来尝试双屏异显。

将MIPI设置为主屏

vim package/allwinner/libuapi/src/videoOutPort.c
SCREEN_0和SCREEN_1宏定义修改为

#define SCREEN_0 1
#define SCREEN_1 0

编译并打包

croot
make -j4
pack

烧录并测试

将新镜像烧录到开发板后,在串口终端登录后,
切换HDMI到屏幕1

cd /sys/kernel/debug/dispdbg
echo disp1 > name;
echo switch1 > command;
echo 4 10 0 0 0x4 0x101 0 0 0 8 > param;
echo 1 > start;

使用tplaydemo 播放视频

tplaydemo test.mp4

启动LVGL控制MIPI屏幕

./cardcamera

在系统调试节点查看两个显示的信息:

root@TinaLinux:/sys/devices/virtual/disp/disp/attr# cat sys
screen 0:
de_rate 300000000 hz, ref_fps:62
mgr0: 800x1280 fmt[rgb] cs[0x204] range[full] eotf[0x4] bits[8bits] err[0] force_sync[0] unblank direct_show[false] iommu[1]
dmabuf: cache[0] cache max[0] umap skip[0] overflow[0]
lcd output backlight(100) fps:62.5 800x1280
err:1 skip:200 irq:18449 vsync:0 vsync_skip:0
BUF enable ch[1] lyr[0] z[16] prem[N] a[pixel 255] fmt[ 0] fb[ 800,1280; 800,1280; 800,1280] crop[ 0,1280, 800,1280] frame[ 0, 0, 800,1280] addr[ff800000, 0, 0] flags[0x 0] trd[0,0]
depth[ 0] screen 1:
de_rate 300000000 hz, ref_fps:60
mgr1: 1920x1080 fmt[rgb] cs[0x101] range[limit] eotf[0x4] bits[8bits] err[0] force_sync[0] unblank direct_show[false] iommu[1]
dmabuf: cache[0] cache max[0] umap skip[0] overflow[0]
hdmi output mode(10) fps:60.6 1920x1080
err:0 skip:4 irq:14742 vsync:0 vsync_skip:0
BUF enable ch[0] lyr[0] z[0] prem[N] a[globl 255] fmt[ 77] fb[ 992, 736; 496, 368; 496, 368] crop[ 0, 0, 976, 720] frame[ 0, 0,1920,1080] addr[fe800000,fe8b2400,fe8ded00] flags[0x 0] trd[0,0]
depth[ 0]