Difference between revisions of "Graphics"
Line 1: | Line 1: | ||
+ | |||
= Graphics Overview = | = Graphics Overview = | ||
Line 5: | Line 6: | ||
== Graphics with X11 == | == Graphics with X11 == | ||
− | |||
− | |||
− | |||
− | |||
Xserver is the display system used on regular desktop Linux platforms. | Xserver is the display system used on regular desktop Linux platforms. | ||
Line 18: | Line 15: | ||
Gstreamer X11 sink have DRM 4k-Video render support(though hacky). | Gstreamer X11 sink have DRM 4k-Video render support(though hacky). | ||
− | ==== Graphics with Wayland | + | === Structure === |
+ | |||
+ | X11 structure in Linux OS | ||
+ | |||
+ | [[File:X11 structure.png]] | ||
+ | |||
+ | === DDX(armsoc) === | ||
+ | |||
+ | source code: git clone git@github.com:markyzq/xf86-video-armsoc.git<br/> maliline: git://anongit.freedesktop.org/xorg/driver/xf86-video-armsoc<br/> The DDX support: | ||
+ | |||
+ | #support common x11 display and Hwcursor | ||
+ | #DRI2 (request by EGL X11 client) | ||
+ | #umplock(support non-tearing on EGL x11 client) | ||
+ | |||
+ | '''''/etc/X11/xorg.conf'':''' Xserver will parse this config to find DDX and configure info | ||
+ | <pre>Section "Device" | ||
+ | Identifier "Mali-Fbdev" | ||
+ | Driver "armsoc" | ||
+ | Option "UMP_LOCK" "true" | ||
+ | EndSection | ||
+ | Section "Screen" | ||
+ | Identifier "Default Screen" | ||
+ | Device "Mali-Fbdev" | ||
+ | DefaultDepth 24 | ||
+ | EndSection</pre> | ||
+ | |||
+ | === UMPLOCK === | ||
+ | |||
+ | source code: wget http://malideveloper.arm.com/downloads/drivers/DX910/r6p1-<br/> 01rel0/DX910-SW-99002-r6p1-01rel0.tgz<br/> Patch the umplock patch to kernel, then you can find the umplock device node: | ||
+ | <pre>/dev/umplock</pre> | ||
+ | |||
+ | Don't forget enable DDX umplock option: | ||
+ | <pre>Option "UMP_LOCK" "true"</pre> | ||
+ | |||
+ | The umplock only use for x11 graphic stack, no need for wayland, because mali <br/> already do the wayland sync on its driver. | ||
+ | |||
+ | === X11 performance Test === | ||
+ | |||
+ | 2D performace: | ||
+ | <pre>x11perf</pre> | ||
+ | |||
+ | 3D preformace: | ||
+ | <pre>glmark2-es2</pre> | ||
+ | |||
+ | X11perf tools can easy get from x11-apps.<br/> glmark2-es2 can get from https://github.com/glmark2/glmark2<br/> The glmark2-es2 source code can also build for x11, drm(gbm) and wayland. | ||
+ | |||
+ | == Graphics with Wayland == | ||
Weston is the reference implementation of a Wayland compositor, and a<br/> useful compositor in its own right. | Weston is the reference implementation of a Wayland compositor, and a<br/> useful compositor in its own right. | ||
Line 24: | Line 67: | ||
Rockchip don't do much develop in wayland at current, but wetson are tested that can run in rk3288 and rk3399. | Rockchip don't do much develop in wayland at current, but wetson are tested that can run in rk3288 and rk3399. | ||
− | + | == Graphics with None == | |
If you don't want to use X11 or wayland, there are some chooses for you. | If you don't want to use X11 or wayland, there are some chooses for you. |
Revision as of 03:38, 17 March 2017
Contents
Graphics Overview
This article will give an overview of how graphics are generated on a rockchip platform.
Graphics with X11
Xserver is the display system used on regular desktop Linux platforms.
Rockchip have a custom Xserver which have enable glamor 2D acceleration.
Xserver usually have a good compatibility, but the performance may be little less and its size is more large than other display system.
Gstreamer X11 sink have DRM 4k-Video render support(though hacky).
Structure
X11 structure in Linux OS
DDX(armsoc)
source code: git clone git@github.com:markyzq/xf86-video-armsoc.git
maliline: git://anongit.freedesktop.org/xorg/driver/xf86-video-armsoc
The DDX support:
- support common x11 display and Hwcursor
- DRI2 (request by EGL X11 client)
- umplock(support non-tearing on EGL x11 client)
/etc/X11/xorg.conf: Xserver will parse this config to find DDX and configure info
Section "Device" Identifier "Mali-Fbdev" Driver "armsoc" Option "UMP_LOCK" "true" EndSection Section "Screen" Identifier "Default Screen" Device "Mali-Fbdev" DefaultDepth 24 EndSection
UMPLOCK
source code: wget http://malideveloper.arm.com/downloads/drivers/DX910/r6p1-
01rel0/DX910-SW-99002-r6p1-01rel0.tgz
Patch the umplock patch to kernel, then you can find the umplock device node:
/dev/umplock
Don't forget enable DDX umplock option:
Option "UMP_LOCK" "true"
The umplock only use for x11 graphic stack, no need for wayland, because mali
already do the wayland sync on its driver.
X11 performance Test
2D performace:
x11perf
3D preformace:
glmark2-es2
X11perf tools can easy get from x11-apps.
glmark2-es2 can get from https://github.com/glmark2/glmark2
The glmark2-es2 source code can also build for x11, drm(gbm) and wayland.
Graphics with Wayland
Weston is the reference implementation of a Wayland compositor, and a
useful compositor in its own right.
Rockchip don't do much develop in wayland at current, but wetson are tested that can run in rk3288 and rk3399.
Graphics with None
If you don't want to use X11 or wayland, there are some chooses for you.
Interface:
Libdrm and libmali-gbm can be used to draw UI without display systems.
Framework:
QT can work without x11 or wayland, it run Qt5 applications on top of EGL(libmali-gbm).
WIth qt eglfs, video player can reach 1080-60fps.
GPU Performance
Test platform: rk3288
backend | off-screen | on-screen | DMA-Buf |
---|---|---|---|
X11 | support | ||
Wayland | support | ||
gbm | support | ||
fbdev | untested | untested | unsupport |
Others
For details of the full Linux graphics stack, please refer to online documents in Freedesktop, ARM, Arch wiki…..