3. Graphics architecture¶
You are welcome to read this chapter. After reading, you can learn the following information:
Learn about the graphics architectures supported by the Rockchip platform
How to choose a suitable graphics architecture
For the Rockchip platform, there are mainly the following graphics architectures to choose from:
Qt + Wayland
Qt + EGLFS
EGL program + X11
Multi-window functional requirements, choose:
The functional requirements of the desktop, choose:
4K video playback + full screen:
Qt + Wayland
Qt + EGLFS
4K video playback + multiple windows:
Qt + Wayland
If you don’t understand the technology of graphics architecture, you can continue reading.
X11 is the 11th version of the X display protocol.
The X protocol has been used for 30 years. The Client/Server structure of the X protocol was originally designed to send rendering requests to the X server by the device (Client side) when the hardware performance was too weak before (the X server was previously running on another Independent hardware) rendering display.
However, with the continuous improvement of modern hardware performance, Client and Server can be run on the same hardware system at the same time, but the consequence of using this remote communication structure on the local machine is the loss of performance. At present, there are branches in the official Debian branch. Wayland was developed to replace X11, but Wayland is currently not compatible with existing software, so it has not been officially replaced.
https://en.wikipedia.org/wiki/X.Org_Server https://www.comptechdoc.org/os/linux/howlinuxworks/linux_hlxwindows.html https://dri.freedesktop.org/wiki/DDX/ https://www.freedesktop.org/wiki/Software/Glamor/ https://en.wikipedia.org/wiki/X.Org_Server
3.2. Qt + EGLFS¶
Qt + EGLFS is a GUI system implemented by Qt itself. It does not support multiple windows, but window composite is therefore missing.
The method of Qt + EGLFS and dri2 is similar. The difference is that the font buffer of Qt + EGLFS is directly sent to the DRM display after using gpu composite by itself, while the X is sent to the Window manager for composite, so EGLFS is efficient Advantageous.
3.3. Qt + Wayland¶
In Wayland, Weston is the specific implementation of the Wayland display protocol, and its corresponding relationship is just like the relationship between Xorg (X server) and X.
The only disadvantage of the current comparison between Wayland and X is the compatibility, so most of the current mainstream system versions still use X.
Weston no longer uses the X’s Client/Server structure, but directly receives the kernel events from the synthesizer and passes them to the client, which is directly rendered by the client. Only the areas that need to be updated are sent to the synthesizer, and the synthesizer notifies the kernel. Arrange for page turning.
It should be noted that since Ubuntu/Debian already has X11, the SDK adds Weston support in Buildroot by default. In fact, if Ubuntu/Debian needs to install Weston, it can also be built on the Minimal version. (Firefly Ubuntu 20.04 will come with Wayland and X by default, and you can switch freely.)
It is recommended to use Buildroot/Yocto for Wayland development. In terms of efficiency, Wayland is better than X11, mainly due to compatibility issues.
If you don’t need a desktop, but also need multiple windows, you can try Wayland.
In addition to X11 and Wayland, there is also None, which is also more exposed on embedded systems. For example, MiniGUI and SDL are the same.
If you want to support DRM and opengl, you can only choose Qt.
MiniGUI is a lightweight embedded graphics library. The requirements for system resources fully take into account the hardware conditions of embedded devices. For example, the minimum space occupied by the MiniGUI library can be cut to about 500K.
In view of the characteristics of the Buildroot system adapting to devices with tight hardware resources, MiniGUI with Buildroot is a perfect fit.