Currently there is no X11 acceleration of mali on A10, this page describe attempting get the mali x11 driver working. At the time of writing the mali x driver is not working. This is a reference for who will work on it later.
The attempting is on ubuntu-desktop-12.04-armhf.
Note: this page needs to be updated. There is currently
Modify the display driver
According to the mali ddk documentation
To integrate UMP with your display driver, you must add support for the GET_UMP_SECURE_ID ioctl
to your display driver. This ioctl must return a UMP secure ID for your framebuffer memory.
The integration typically consists of the following major parts:
1. mapping and unmapping of the physical blocks of memory
2. returning UMP Secure ID from within the ioctl handler.
the display driver must be modified. Download the patch at the allwinner-v3.0-android-v2 branch on amery's github has been modified accordingly, just be sure to choose CONFIG_DRM=y and CONFIG_DRM_MALI=m
and apply it(based on amery's github allwinner-v3.0-android-v2 branch)
Build the kernel and all the modules, the important ones are lcd, disp, mali, fb, ump, mali_drm.
Pre-compiled mali opengl library.
The mali opengl library source code is under a commercial license, a pre-compiled library(version r2p4) can be downloaded here, it's compile from the gcc on ubuntu 12.04 armhf on A10 natively.
The library should be put in /lib or /usr/lib.
Compile the UMP userspace driver source code
Download the ump userspace driver source code from
http://www.malideveloper.com/developer-resources/drivers/open-source-mali-gpus-ump-user-space-drivers-source-code.php. Download the r2p4 version. Copy the contents of the include/ump/ directory to /usr/include/ump. These are required to build the mali xserver driver.
Compile the xserver-video-mali
Download the xserver-video-mali from
http://www.malideveloper.com/developer-resources/drivers/open-source-mali-gpus-linux-exadri2-and-x11-display-drivers.php Download the r2p4 version. Build the x driver in xf86-video-mali-0.0.1 folder on A10 with the following command:
- LDFLAGS="-L/lib -lMali -lUMP -lpthread"
- ./configure --prefix=/usr --x-includes=/usr/include --x-libraries=/usr/lib
- make install
- cp xorg.conf /etc/X11
the mali_drv.so and mali_drv.la will be installed to:
xorg.confedit /etc/X11/xorg.conf, change the configuration to:
# X.Org X server configuration file for xfree86-video-mali Section "Device" Identifier "Mali FBDEV" Driver "mali" Option "fbdev" "/dev/fb0" Option "DRI2" "false" Option "DRI2" "false" Option "DRI2_PAGE_FLIP" "false" Option "DRI2_WAIT_VSYNC" "false" EndSection Section "Screen" Identifier "Mali Screen" Device "Mali FBDEV" EndSection Section "DRI" Mode 0666 EndSection
Boot the kernel
Boot the kernel, insert the modules
root@localhost:~# modprobe hdmi disp fb ump mali mali_drm
Note the module order seems important. If in the wrong order the X server will start but nothing will display.
root@localhost:~# modprobe lcd hdmi ump disp mali mali_drm
Module Size Used by
mali 150292 0
hdmi 15746 0
disp 228042 1 hdmi
fb 42345 1 disp
ump 47762 2 mali,disp
mali_drm 1954 0
run X apps
root@localhost:~#X -verbose &
People trying to enable 3D support report getting error 0x3003 == 12291. Response from ARM regarding this error:
I think you are having this problem because your X11 environment is configured to load the GLX extension and switch on AIGLX. GLX and AIGLX are used to enable hardware acceleration in X11 on OpenGL capable GPU. But Mali support OpenGLES, not OpenGL, so these extensions cannot be used.
If you refer to the xorg.conf template from DX910-SW-99003 package then you will see that it does not load the GLX extension nor switch on AIGLX. Please can you try disabling the loading of the GLX extension and switch of AIGLX in your xorg.conf.
If your xorg.conf neither explicitly loads the GLX extension nor switches on AIGLX, the xorg-server that you are using could have been compiled without the --disable-glx option. In that case, you should obtain a xorg-server that was compiled with this option.