页次: 1
@海石生风
你说的性能差异原来是 G2D/GPU 硬件加速,这方面我还不是很了解。我以为你说的性能差异是 GUI 绘制完后送显的差异。目前我接触显示比较多,渲染那块还不怎么涉及
不错!问下,GUI绘图走DRM是否要比走FrameBuffer的性能要好点?
追求性能还是 framebuffer 好点,毕竟框架更简单,陷入内核态的时间更短
ArtInChip KMS driver 支持的特性:
- 支持一个 UI 图层,一个 Video 图层
- UI 图层支持 4 个矩形窗口,窗口间不允许重叠
- Video 图层 YUV 格式支持 1/32 - 32 倍缩放
- 支持 alpha blend,支持三种 alpha 模式, pixel alpha, 全局 alpha, 混合 alpha
- 支持 colorkey
- 支持 yuv2rgb bt601/bt709 limit/full 四种
- 支持 lvds 显示接口
待支持特性:
- Dither
- LCD 显示接口
- MIPI-DSI 显示接口
Luban SDK 移植 libdrm-2.4.118 ,使用 modetest 进行测试
Luban SDK patch 和固件:d211.7z
Linux启动,fb console 开始工作
modetest 打印输出 ArtInChip KMS 信息
[aic@] # modetest
trying to open device 'artinchip'...done
Encoders:
id crtc type possible crtcs possible clones
43 42 LVDS 0x00000001 0x00000001
Connectors:
id encoder status name size (mm) modes encoders
44 43 connected LVDS-1 218x135 1 43
modes:
index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
#0 1024x600 60.04 1024 1184 1204 1364 600 612 632 635 52000 flags: ; type: preferred, driver
props:
1 EDID:
flags: immutable blob
blobs:
value:
2 DPMS:
flags: enum
enums: On=0 Standby=1 Suspend=2 Off=3
value: 0
5 link-status:
flags: enum
enums: Good=0 Bad=1
value: 0
6 non-desktop:
flags: immutable range
values: 0 1
value: 0
4 TILE:
flags: immutable blob
blobs:
value:
CRTCs:
id fb pos size
42 45 (0,0) (1024x600)
#0 1024x600 60.04 1024 1184 1204 1364 600 612 632 635 52000 flags: ; type: preferred, driver
props:
24 VRR_ENABLED:
flags: range
values: 0 1
value: 0
Planes:
id crtc fb CRTC x,y x,y gamma size possible crtcs
31 42 45 0,0 0,0 0 0x00000001
formats: AR24 AB24 RA24 BA24 XR24 XB24 RX24 BX24 RG24 BG24 AR15 AB15 RA15 BA15 RG16 BG16 AR12 AB12 RA12 BA12
props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 1
32 0 0 0,0 0,0 0 0x00000001
formats: AR24 AB24 RA24 BA24 XR24 XB24 RX24 BX24 RG24 BG24 AR15 AB15 RA15 BA15 RG16 BG16 AR12 AB12 RA12 BA12
props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
33 0 0 0,0 0,0 0 0x00000001
formats: AR24 AB24 RA24 BA24 XR24 XB24 RX24 BX24 RG24 BG24 AR15 AB15 RA15 BA15 RG16 BG16 AR12 AB12 RA12 BA12
props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
34 0 0 0,0 0,0 0 0x00000001
formats: AR24 AB24 RA24 BA24 XR24 XB24 RX24 BX24 RG24 BG24 AR15 AB15 RA15 BA15 RG16 BG16 AR12 AB12 RA12 BA12
props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
35 0 0 0,0 0,0 0 0x00000001
formats: AR24 AB24 RA24 BA24 XR24 XB24 RX24 BX24 RG24 BG24 AR15 AB15 RA15 BA15 RG16 BG16 AR12 AB12 RA12 BA12 YU12 YU16 YU24 NV12 NV21 NV16 NV61 YUYV YVYU UYVY VYUY
props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
36 alpha:
flags: range
values: 0 65535
value: 65535
37 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
38 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1
value: 0
39 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
41 alpha_en:
flags: range
values: 0 1
value: 1
40 colorkey:
flags: range
values: 0 16777216
value: 16777216
Frame buffers:
id size pitch
modetest set a mode
modetest -M artinchip -s 44@42:1024x600
配置 4 个 UI 矩形窗口,开启 Video 图层 1024x600, YUV420P 格式,进行 3/5 缩放,全局 alpha 模式,global alpha = 128
modetest -M artinchip -P 31@42:1000x100+10+0 -P 32@42:250x350+10+150 -P 33@42:600x150+350+150 -P 34@42:600x150+350+360 -w 35:pixel\ blend\ mode:2 -w 35:alpha:128 -P 35@42:1024x600+150+50*0.6@YU12
pixel blend mode : alpha 模式,[0, 2], 0: pixel alpha; 1: 混合 alpha; 2: 全局 alpha
alpha: 全局 alpha 数值
配置 colorkey,开启 Video 图层 1024x600, YUV420P 格式,进行 0.6 缩放,colorkay = 0
modetest -M artinchip -w 35:alpha_en:0 -w 35:colorkey:0-P 35@42:1024x600+150+50*0.6@YU12
alpha_en: alpha blend ctrl, alpha 默认开启 ,需要手动关闭,然后使能 colorkey
colorkey: bit 24: colorkey ctrl, 1(default): disable colorkey, 0: enable colorkey
bit[23:16]: R value
bit[15:8]: G value
bit[7:0]: B value
十进制输入
页次: 1