1. The kernel I used is 4.1.0 and can be found in my repo and is a branch of the FSL repo. An additional patch to set the correct busid for the vivante driver may need to be made if not present in the kernel:
--- a/drivers/gpu/drm/vivante/vivante_drv.c
+++ b/drivers/gpu/drm/vivante/vivante_drv.c
@@ -55,7 +55,7 @@
#include "drm_pciids.h"
-static char platformdevicename[] = "Vivante GCCore";
+static char platformdevicename[] = "Vivante GCCore:00";
static struct platform_device *pplatformdev;
static struct drm_driver driver = {
Here is my defconfig (I'm compiling for a custom board). Note: the FSL patch (ENGR00264288-1) to upgrade the Vivante libraries to 4.6.9p12.
2. Once you have a booting kernel, you should first test that kernel works against the Vivante framebuffer libraries. To do this we simply switch to the fb libraries (need to be root):
cd /usr/lib
rm libEGL.so.1.0 libEGL.so.1 libEGL.so
ln -s libEGL-fb.so libEGL.so.1.0
ln -s libEGL-fb.so libEGL.so.1
ln -s libEGL-fb.so libEGL.so
rm libGAL.so
ln -s libGAL-fb.so libGAL.so
rm libVIVANTE.so
ln -s libVIVANTE-fb.so libVIVANTE.so
Now test with one of the Vivante tutorial examples (pick any of the tutorials)
cd /root/gpu-viv-bin-mx6q-3.5.7-1.0.0-alpha.2-hfp/opt/viv_samples/vdk
./tutorial7
If the tutorial doesn't run it may indicate there is a mismatch between the kernel Vivante code and the libraries or the Vivante libraries may be missing a dependency.
3. If everything is fine with the framebuffer libraries we can now switch back to x11:
cd /usr/lib
rm libEGL.so.1.0 libEGL.so.1 libEGL.so
ln -s libEGL-x11.so libEGL.so.1.0
ln -s libEGL-x11.so libEGL.so.1
ln -s libEGL-x11.so libEGL.so
rm libGAL.so
ln -s libGAL-x11.so libGAL.so
rm libVIVANTE.so
ln -s libVIVANTE-x11.so libVIVANTE.so
Now reboot.
4. Before we test with X, we need to check that kernel vivante/drm modules are loaded:
root@ubuntu-imx6:~# lsmod
Module Size Used by
vivante 947 1
drm 137567 2 vivante
If the modules aren't loaded then X will revert to software rendering because the device /dev/dri/card0 does not exist. The loading of the module is configured in /etc/modules
5. I suggest starting a simple X server to test that the Vivante drivers get correctly loaded:
startx &
The output of the /var/log/Xorg.0.log should be similar to this. If errors are reported it may be because:
1. The vivante kernel module didn't load
2. Check the exa driver is present /usr/lib/xorg/modules/drivers/vivante_drv.so
3. Least likely, missing permissions on the gpu device, these should be setup in /etc/udev/rules.d/10-imx.rules.
6. Validate the output of glxinfo and es2_info (they should show the presence of the Vivante drivers):
export DISPLAY=:0
glxinfo
es2_info
If you are not seeing "OpenGL renderer string: GC2000 Graphics Engine" and/or "EGL_VENDOR = Vivante Corporation" in the output then it may be possible that the mesa libraries are being picked up. If the directories /usr/lib/arm-linux-gnueabihf/mesa and/or /usr/lib/arm-linux-gnueabihf/mesa-egl are present then move these to another location. They shouldn't be present on my rootfs unless the mesa packages were reinstalled.