For a project I am currently evaluating embedded CPUs, so called system on chip (SOC), mostly ARM architecture. One major requirement of the project is to use free and open source software only, without any binary firmware blobs.
You may have heard about the big issues found lately about e.g. the Intel Management Engine (ME) which is part of almost any modern PC system. It runs its own firmware, its own TCP/IP stack and can get access to the RAM bus on its own, which means that it can spy on any byte in system memory without the user knowing. The firmware is binary only and cryptographically signed. No way to audit it. As like any software it can have bugs and some of them have surfaced recently.
But binary firmware blobs and binary only drivers are also limiting developer’s and user’s freedoms. The four freedoms that shall be guaranteed by free software, the freedom to use, study, share and improve the software.
GPU drivers, i.e. the driver for hardware acceleration for 2D and 3D graphics, have been a big issue for a long time. Manufacturers would not release any specification or documentation but only binary only drivers. For PC hardware this problem has somewhat been resolved, there a number of graphics cards available which are supported by free drivers which also have been merged in mainline Linux kernel. But for ARM SOCs the situation is still pretty bad. There is a nice compilation on the issue on WikiPedia.
One of the biggest players in the ARM field is MALI. The MALI core was originally developed by Falanx Microsystems until ARM bought their IP and is now licensing the MALI core for ARM designs. ARM is refusing to give any specs about the MALI GPU cores and also does not provide any free software drivers for them. (The MALI400 is e.g. also used in the Allwinner A64 chip which again is used on Pine64 and in the Pinebook). There is an effort to develop a free driver by reverse engineering existing code, which is called LIMA. But its functionality and support is still very limited.
Another big one is the Adreno GPU core found in many Qualcomm Snapdragon SOCs. Also for this one no documentation exists and a reverse engineering project produced a pretty well working driver, called freedreno which is also supported by current Mesa versions.
Then there are the PowerVR GPU cores found mostly in embedded PowerPCs and Texas Instruments OMAP CPUs. As of today I am not aware of any free development for these, only some binary only drivers are available. [Update: There is an effort started by the Free Software Foundation but it seems that the project has stalled for some time now.]
Finally there are also NVidia Tegra SOCs. The first generation has by now Linux kernel mainline support since 2012. The latest Tegra SOCs use the same GPU building blocks as the desktop PC graphics cards and can be used with the Nouveau GPU driver.
But I am not writing this article to talk about these GPUs, I want to talk about i.MX6 and the Vivante GPUs.
Free driver for i.MX6 Vivante GC GPU
Since Linux kernel 4.8 a new set of DRM/GPU drivers has been incorporated into the mainline Linux kernel, the so called Etnaviv. Starting with Mesa 17 Etnaviv support is also included in Mesa. Last night I successfully booted a mainline Linux kernel 4.12.4 with Etnaviv support on a KaRo TX6DL SOM module (i.MX6DL CPU), mounted on a Glyn Aclavis baseboard with a 7″ EDT WVGA TFT and EDT capacitive touchscreen attached. From microSD I booted into a Debian unstable with most UI stuff installed.
What shall I say, it works!
Though I can not get a regular display manager like lightdm to start because for some reason the glamor support of Xorg does not like the etnaviv DRM/DRI. So I installed Wayland and Weston. Finally „weston-launch“ did the trick and I had a Wayland screen with a terminal, nice! all of this running on top of the etnaviv driver which means this is hardware accelerated GUI now.
Next I also compiled glmark2, a quite nice simple OpenGL benchmark with Wayland backend support. This basically worked but the output on screen is distorted, like swapped lines etc. I think this is some incompatibility with Wayland running. A little disappointed I tried another glmark2 demo image from Boundary Devices from here and with this one glmark2 works nicely, without Wayland.
So yes, I think we can safely say, that upstream OpenGL hardware GPU support for i.MX6 has finally landed! This is great news since hardware GUI acceleration is badly needed for almost any type of modern GUI.