Download source code from Rockchip github git repository
git clone https://github.com/rockchip-linux/xserver.git
This branch is used for Rockchip Debian SDK, you could easily use it in your Debian. The current xserver version match the one in Debian stretch. But it would work fine with Debian Jessie if you enabled the Debian stretch repository and using x driver(likes fbdev) from it.
200000 reps @ 0.0066 msec (151000.0/sec): 1x1 opaque stippled rectangle (8x8 stipple) 40000 reps @ 0.0286 msec ( 34900.0/sec): 10x10 opaque stippled rectangle (8x8 stipple) 720 reps @ 1.5920 msec ( 628.0/sec): 100x100 opaque stippled rectangle (8x8 stipple) 30 reps @ 43.3108 msec ( 23.1/sec): 500x500 opaque stippled rectangle (8x8 stipple)
20000 reps @ 0.0634 msec ( 15800.0/sec): 1x1 tiled rectangle (4x4 tile) 20000 reps @ 0.0590 msec ( 16900.0/sec): 10x10 tiled rectangle (4x4 tile) 10800 reps @ 0.1326 msec ( 7540.0/sec): 100x100 tiled rectangle (4x4 tile) 600 reps @ 1.8001 msec ( 556.0/sec): 500x500 tiled rectangle (4x4 tile)
With the linear growth in points, time-consuming didn‘t have linear growth when enable glamor.
Check whether enable GLAMOR
cat /var/log/Xorg.0.log | grep glamor
If it shows "glamor initialized", it means the acceleration was enabled.
Why failed to enable
- Kernel space gpu driver is not compatible with userspace（libmali）
- Conflict with mesa-egl,mesa-gles. Delete them or make sure libmali is in a high-priority.
- Improper depends. Try update libepoxy to 1.31.
How to build xserver
Cross compile in PC host
We suggestion you to use the Debian build system to build our xserver or you would be too hard to solve dependence problem. You may reference to Debian Package Maintainer Manuel for more information. (Update: now we support build xserver with docker, see here )
- Install all the build dependency for the xserver.
- Install the library mali and development files. You must use the version comes from Rockchip.
- Entry the xserver directory.
- Build with the Debian build tools.
apt-get build-dep xserver-xorg
How to debug xserver
You should install a debugging package for xserver-core : xserver-xorg-core-dbg_1.18.4-1_armhf.deb.
Also, the Mesa/GL libraries might be involved, installing libgl1-mesa-dri-dbg and libgl1-mesa-glx-dbg might help too.
apt-get install gdb libc6-dbg gdb -p $(pidof X) (inside gdb) set logging overwrite on set logging on break xorg_backtrace continue (X server is stopped from when gdb is attached until "continue" is typed) (do whatever caused the problem) bt full set logging off quit
After this, you get the gdb output in file gdb.txt in the directory where you started gdb (this is what the logging commands did, another solution is to copy-paste the output yourself). Add all this to your bug report, developers will appreciate it. If the backtrace is small, you probably miss several debugging packages, see above.
More info please see here.
The X server will by default intercept signals and for instance trap its own crashes and dump a stack trace in /var/log/Xorg.0.log. However, this stack trace is modified by the signal handler itself. To disable this signal interception, add this to your /etc/X11/xorg.conf:
<code>Section "ServerFlags" Option "NoTrapSignals" "true" EndSection</code>
and restart your X server.