测试指南
测试环境
硬件-
开发板,或者 D211 的 FPGA 板
-
可转接 LVDS 的子板
-
LVDS 屏幕,7 寸 TFT 屏幕,驱动芯片 EK79001+EK73215
-
PC 端的串口终端软件,用于 PC 和开发板进行串口通信
-
显示模块的测试 demo:test_dmabuf
软件配置
- 配置 LVDS 屏幕测试中需要用到 LVDS 屏幕,以驱动芯片 EK79001+EK73215 为例,在 Luban 的根目录下通过make linux-menuconfig,按如下选择:
Linux Device Drivers Graphics support Frame buffer Devices <*> Artinchip Framebuffer support [*] Artinchip display lvds support <*> Artinchip Framebuffer support Artinchip Panel Drivers (Artinchip general LVDS panel) --->
- 在 dts 中,修改 LVDS 相关配置。
-
panel
panel_lvds { compatible = "artinchip,aic-general-lvds-panel"; enable-gpios = <&gpio_a 4 GPIO_ACTIVE_HIGH>; data-mapping = "vesa-24"; data-channel = "single-link0"; status = "okay"; port { panel_lvds_in: endpoint { remote-endpoint = <&lvds0_out>; }; }; display-timings { native-mode = <&timing1>; timing1: 1024x600 { clock-frequency = <60000000>; hactive = <1024>; vactive = <600>; hback-porch = <140>; hfront-porch = <160>; hsync-len = <20>; vback-porch = <20>; vfront-porch = <12>; vsync-len = <3>; de-active = <1>; pixelclk-active = <1>; }; }; };
-
- display
engine
&de0 { status = "okay"; port@0 { reg = <0>; de0_in: endpoint { remote-endpoint = <&fb0_out>; }; }; port@1 { reg = <1>; de0_out: endpoint { remote-endpoint = <&lvds0_in>; }; }; };
- lvds display
interface
&lvds0 { pinctrl-names = "default"; pinctrl-0 = <&lvds0_pins>; status = "okay"; port@0 { reg = <0>; lvds0_in: endpoint { remote-endpoint = <&de0_out>; }; }; port@1 { reg = <1>; lvds0_out: endpoint { remote-endpoint = <&panel_lvds_in>; }; }; };
- test_dmabuf 配置
在 luban 根目录,运行 menuconfig,按如下选择:
Artinchip packages Sample code [*] test-dma-buf
test_dmabuf 测试
test_dmabuf 的主要功能是测试显示引擎 UI 图层和 Videv 图层 blend,在 Video 图层播放一个视频帧文件
在打开 dmabuf 的编译后,板子上的 dmabuf 位于
/usr/local/bin/
,无需进入该目录,直接运行 dmabuf 即可:
[aic@]# test_dmabuf -u Usage: test_dmabuf [options]: -w, --width need an integer argument -h, --height need an integer argument -f, --format video format, yuv420p etc -i, --input need a file name -u, --usage Example: test_dmabuf -w 480 -h 320 -f yuv420p -i my.yuv [aic@]# test_dmabuf -w 480 -h 320 -f yuv420p -i my.yuv - 播放一个 yuv420 格式的文件