GE 配置
Read time: 2 minute(s)
内核配置
GE 驱动依赖 BUF、CMA,需要提前打开。
- 打开 CMA
-
在 SDK 根目录下,执行下列命令,进入 kernel 的功能配置界面:
make kernel-menuconfig
或使用简写命令
make km
-
在内核配置界面,按如下选择:
Linux Memory Management options [*] Contiguous Memory Allocator
-
根据具体需求,配置 CMA 区域的大小,例如 16 MB:
Linux Library routines [*] DMA Contiguous Memory Allocator (16) Size in Mega Bytes
-
- 打开 DMA-BUF
-
在 SDK 根目录下,执行下列命令,进入 kernel 的功能配置界面:
make kernel-menuconfig
或使用简写命令
make km
-
在内核配置界面,按如下选择,打开 DMA-BUF:
Linux Device Drivers DMABUF options [*] Explicit Synchronization Framework [*] Sync File Validation Framework [*] userspace dmabuf misc driver [*] DMA-BUF Userland Memory Heaps [*] DMA-BUF CMA Heap
-
- 打开 GE
-
在 SDK 根目录下,执行下列命令,进入 kernel 的功能配置界面:
make kernel-menuconfig
或使用简写命令
make km
- 在内核配置界面,按如下选择,配置 GE:
Linux Device Drivers ---> Graphics support ---> ArtInChip Graphics ---> <*> ArtInChip 2D Graphics Engine select 2D Graphics Engine Mode ( ) CMD queue mode (X) normal mode
在 Select 2D Graphics Engine Mode 中,选择 CMD queue mode 或者 normal mode 中的一个,二者只能
二选一
。其中 CMD queue mode 为命令队列模式,normal mode 为非命令队列模式。
-
DTS 参数配置
ge: ge@18b00000 { #address-cells = <1>; #size-cells = <0>; compatible = "artinchip,aic-ge-v1.0"; reg = <0x0 0x18b00000 0x0 0x1000>; interrupts-extended = <&plic0 60 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cmu CLK_GE>; clock-names = "ge"; resets = <&rst RESET_GE>; reset-names = "ge"; };