In pcDuino, the graphic hardware accelerator is off. In this post, we will detail the steps to enable the graphic hardware accelerator on pcDuino.
Note: If you are using images of 11262013, opengl is already enabled.
1. Enable hardware
$vim /etc/X11/xorg.conf
We need to modify two places:
Section "Device"
Identifier "Mali FBDEV"
Driver "sunxifb"
Option "fbdev" "/dev/fb0"
Option "DRI" "false"
Option "DRI2" "true"
Option "DRI2_PAGE_FLIP" "true"
Option "DRI2_WAIT_VSYNC" "false"
Option "SwapbuffersWait" "false"
Option "Debug" "true"
EndSection
Section "Module"
Disable "dri"
# Disable "glx"
EndSection
Section "Screen"
Identifier "Mali Screen"
Device "sunxifb FBDEV"
Monitor "Monitor0"
SubSection "Display"
Depth 24
Modes "1440x900-60"
EndSubSection
EndSection
There are number of places need to to modified: The first one is to comment out # Disable “glx”. The second is to change device to sunxifb. the third one is to add Option “SwapbuffersWait” “false”.
2. Rebuild hardware accelerator library:
vim /etc/udev/rules.d/50-mali.rules
and add the following:
KERNEL=="mali", MODE="0660", GROUP="video"
KERNEL=="ump", MODE="0660", GROUP="video"
Install hardware dependencies:
apt-get install build-essential libdri2-dev xorg-dev xutils-dev git git-core automake libtool libdrm-dev xutils-dev x11proto-dri2-dev libltdl-dev
Download mali library:
git clone https://github.com/ssvb/xf86-video-sunxifb.git
Build:
./autogen.sh
make
sudo make install
Install the driver:
cp /usr/local/lib/xorg/modules/drivers/sunxifb_drv.so /usr/lib/xorg/modules/drivers/
vim /etc/udev/rules.d/99-local.rules
KERNEL=="ump", MODE="0666"
KERNEL=="mali", MODE="0666"
We are done with the set up. Now we can test the performance by install glmark2:
sudo apt-get install glmark2-es2
To run:
glmark2-es2 --annotate --fullscreen
We can view the effect by checking out the video:
Leave a Reply
You must be logged in to post a comment.