menuconfig配置
使能显示引擎驱动
在 Luban-Lite 根目录下执行 scons --menuconfig
,进入 menuconfig 的功能配置界面,按如下选择:
Board options --->
[*] Using Display Engine (DE)
Display Parameter --->
2
3
选择显示接口
根据 LCD 外设类型,选择显示接口。
Board options --->
[*] Using Display Engine (DE)
Display Parameter --->
select Display interface (Display LVDS interface) --->
2
3
4
注解
只支持使能一个显示接口。
panel配置
Luban-Lite SDK 不仅为 RGB/LVDS 等标准接口提供通用的 panel 驱动 ArtInChip simple panel , 也为部分屏驱 IC 提供专用的 panel 驱动。
注解
menuconfig 仅显示当前已使能的显示接口所支持的 panel。
Board options --->
[*] Using Display Engine (DE)
Display Parameter --->
Display Panels --->
2
3
4
注解
ArtInChip simple panel
支持 menuconfig 修改屏时序参数。
Display Panels --->
ArtInChip Panel Drivers (ArtInChip simple panel) --->
display timing of simple panel --->
2
3
背光配置
GPIO
打开 menuconfig 配置界面,选择 GPIO 方式控制背光,以字符串的形式指定 GPIO 引脚。
背光 GPIO 引脚默认高电平有效。
Board options --->
[*] Using Display Engine (DE)
Display Parameter --->
panel backlight control (gpio) --->
(PE.19) panel backlight enable pin
[ ] panel backlight enable pin low active
2
3
4
5
6
PWM
打开 menuconfig 配置界面,使能 PWM,选择 PWM 方式控制背光,配置 PWM 的通道和默认占空比 [0, 100]。
使能 PWM
Board options --->
[*] Using PWM3
2
配置 PWM-BACKLIGHT
Board options --->
[*] Using Display Engine (DE)
Display Parameter --->
panel backlight control (pwm) --->
(3) pwm backlight channel
(80) default brightness level
2
3
4
5
6
显示引擎配置
Board options --->
[*] Using Display Engine (DE)
Display Parameter --->
select framebuffer format (argb8888) --->
[*] Support double framebuffer
[*] Enable Display Dither
2
3
4
5
6
framebuffer format
: framebuffer 的数据格式,默认 ARGB8888 32 位。double framebuffer
: 双 buffer 可避免屏幕撕裂,获得更好的显示效果。Display Dither
: 抖色,误差扩散,能让图像色彩渐变更平滑。
注解
Display Dither 生效条件:
- 屏幕宽度小于显示引擎最大支持宽度,具体规格参考芯片手册
- framebuffer bpp(bits per pixel) 大于显示接口输出的 bpp,例如 framebuffer 为 24/32 位 RGB 数据,显示接口输出 16/18 位 RGB 数据
- :::
显示接口配置
RGB 接口
选择 RGB 显示接口
Board options --->
[*] Using Display Engine (DE)
Display Parameter --->
select Display interface (Display RGB interface) --->
RGB interface options --->
2
3
4
5
RGB 显示接口参数配置
RGB interface options --->
rgb mode (PRGB) --->
interface format (PRGB 16 BIT LD) --->
data order (RGB) --->
clock phase select (0 degree) --->
2
3
4
5
RGB mode
支持并行 RRGB 和串行 SRGB 两种模式interface format
接口的输出格式
interface format | 说明 |
---|---|
RRGB 24 BIT | RGB 24位输出 |
RRGB 18 BIT LD | RGB 18位输出,丢弃低6个pin |
RRGB 18 BIT HD | RGB 18位输出,丢弃高6个pin |
RRGB 16 BIT LD | RGB 16位输出,丢弃低8个pin |
RRGB 16 BIT HD | RGB 16位输出,丢弃高8个pin |
- data order R/G/B 分量输出顺序
data order | 说明 |
---|---|
RGB | 数据输出顺序为 RGB |
RBG | 数据输出顺序为 RBG |
BGR | 数据输出顺序为 BGR |
BRG | 数据输出顺序为 BRG |
GRB | 数据输出顺序为 GRB |
GBR | 数据输出顺序为 GBR |
- clock phase select pixelclk 时钟相位选择,提供四种相位,允许时钟上升沿延后数据 0/90/180/270 度相位
注解
时钟相位有误,会导致图像存在斑点,在颜色渐变区域尤为明显。逐一尝试时钟相位,找出最佳效果
时钟相位偏移 90 度,pixelclk 极性会发生翻转
:::
data mirror RGB 数据组内大小端输出,高低位互换。默认输出低位到高位 0 - 7,使能后输出 7 - 0。
LVDS 接口
选择 LVDS 显示接口
Board options --->
[*] Using Display Engine (DE)
Display Parameter --->
select Display interface (Display LVDS interface) --->
LVDS interface options --->
2
3
4
5
LVDS 显示接口参数配置
LVDS interface options --->
lvds mode (vesa-24) --->
lvds link mode (single link 1) --->
2
3
- LVDS mode LVDS 模式设置,默认输出为 vesa-24 模式
LVDS mode | strings |
---|---|
NS | "vesa-24" |
JEIDA 8 bit | "jeida-24" |
JEIDA 6 bit | "jeida-18" |
- LVDS Link mode
LVDS Link 设置,默认配置 Single Link1 ,单 Link 输出,Link1 通道。LVDS Link mode strings 备注 单 Link 模式 0 "single-link0" 单 Link 输出,输出选择 Link0 通道 单 Link 模式 1 "single-link1" 单 Link 输出,输出选择 Link1 通道 单 Link 模式 2 "double-screen" 单 Link 输出,Link0 和 Link1 同时输出,驱动双屏同显 双 Link 模式 "dual-link" Dual Link 输出,奇偶像素同时输出
MIPI-DSI 接口
每一款 mipi 屏幕的参数都不尽相同,推荐在 panel 驱动中使用 hardcode 的形式进行配置。ArtInChip 平台不支持 menuconfig 配置 MIPI-DSI 参数。
MIPI-DBI 接口
ArtInChip 平台不支持 menuconfig 配置 MIPI-DBI 参数,推荐在 panel 驱动中使用 hardcode。