1. g2d 模块概述
g2d 主要功能:
1)旋转:支持90、180、270旋转;
2)镜像反转:H / V;
3) scale:放缩
4)格式转换:yuv 转 rgb 等,多种格式相互间转换;
5)透明叠加功能:实现两个rgb图片叠加;
6)矩形填充,等诸多功能;
2. g2d 配置
1)源码目录:tina-v853-docker/kernel/linux-4.9/drivers/char/sunxi_g2d
2)make kernel_menuconfig 配置
Device Drivers > Character devices > sunxi g2d driver
按空格键选中【*】
3)Device Tree 设备树配置
sun8iw21p1.dtsi路径:
tina-v853-docker/kernel/linux-4.9/arch/arm/boot/dts/sun8iw21p1.dtsi
g2d: g2d@05410000 {
compatible = "allwinner,sunxi-g2d";
reg = <0x0 0x05410000 0x0 0xbffff>;
interrupts = <GIC_