ARM produce designs for a GPU called 'Mali'. This is incorporated in many SoCs and thus devices. It is used in a number of devices that can run Debian.
There are three major revisions of Mali GPUs: Utgard, Midgard, and Bifrost. See wikipedia page for reference.
Partial free drivers were developed for Utgard but were abandoned (lima). Work on Utgard has continued by a new set of developers (lima). Free drivers for Midgard and Bifrost are under active development but are not yet ready for Debian users (panfrost).
Proprietary drivers are also available from the vendor for each Mali version. Since 2016, the binary drivers put out by ARM have been redistributable and thus can be packaged for non-free. GPLed kernel shim drivers are also released by ARM, which is eligible for Debian contrib. As of March 2017, these have been packaged in Debian for Midgard devices; see MaliMidgard. Upstream proprietary drivers are available from The ARM developer site
In practice, relevant hardware is
- Mali-400 (Allwinner A20/A64 boards)
Mali-450 (Utgard; HiKey)
- Mali-T6x0 (Midgard; Juno, Firefly, Chromebook, Odroid XU3)
- Mali-T7x0 (Midgard; Firefly, Tinkerboard, Chromebook)
- Mali-T8x0 (Midgard; Firefly 2, Chromebook)
- Mali-G71 (Bifrost; Hikey960)
Ensure non-free is available (testing or unstable at this time), then install the driver package for your GPU flavour and windowing system. i.e. one of:
apt install mali-t76x-x11-driver apt install mali-t76x-wayland-driver apt install mali-t76-fbdev-driver
Note that not every combination of GPU and windowing system is available, because we can only package what ARM release.
Installing the driver should bring in the correct kernel driver and build it for your system. You do need the kernel headers for your kernel available for this to work so if the version matching your installed kernel is missing, you will see a message to this effect when the kernel-image package is installed
/etc/kernel/postinst.d/dkms: Error! Your kernel headers for kernel 4.16.0-2-armmp cannot be found. Please install the linux-headers-4.16.0-2-armmp package, or use the --kernelsourcedir option to tell DKMS where it's located
install the requested package then build the module manually
apt install linux-headers-4.16.0-2-armmp sudo dkms build -m mali-midgard -v 16.0
There is a different kernel driver for each major hardware revision, and thus a different debian dkms package:
- Mali 4xx: 'utgard' mali-utgard-dkms
Mali Txxx: 'midgard' mali-midgard-dkms
- Mali Gxx: 'bifrost' mali-bifrost-dkms
Due to significant similarities between Midgard and Bifrost (sharing significant parts of their command stream), the Midgard and Bifrost drivers are currently identical (mid 2018). Confusingly the identical midgard and bifrost kernel drivers are released separately on ARM's developer site with different package version numbers (so midgard r25p0 is the same code/driver as bifrost r13p0).
Because the packaging uses dkms, the driver should be automatically rebuilt for your kernel, and copied into initrds, and updated when you install new kernels.
ARM's versioning scheme is of the form r16p0 (release 16, patch-level0). This is translated into debian versioning as '16.0' (dkms versions cannot start with a letter).
Blob userspace drivers
Each binary driver is built for a specific combination of OS (linux/Android), hardware platform, GPU generation(4x0/T6x0/T7x0), and graphics technology (fbdev/X/wayland/surfaceflinger). Platforms are sometimes dropped, so you might need to choose an older version to get a driver that will work on older hardware. A few plaftforms have DTB support, so one driver build can work on more than one bit of actual hardware. This makes for painful distro packaging.
A binary driver should work with a kernel driver released at the same time, and up to 4 earlier versions. The binary driver does an API version check on the kernel driver on start-up.
ARM dropped support for X in their releases after r16 (Jan 2017). This is a massive pain as that's what we all still use. Only wayland, fbdev and android are supported after that.
The binary drivers do not yet use the vendor-egl dispatch mechanism that lets you install more than one vendor-supplied libEGL, described at: https://github.com/aritger/linux-opengl-abi-proposal/blob/master/linux-opengl-abi-proposal.txt, so if you install any mali binary driver mesa, or any other EGL driver will be removed. Ideally more than one should be installable because you may have more than one GPU available.
mali-midgard (kernel driver) is in testing (since Sept 2017).
mali-midgard-driver (binary drivers) is in non-free testing (since Jan 2018).
Currently these are all r16 as that supports the widest range of binary drivers, including X. We cannot move forward from r16 without dropping X support and that's not very attractive.
The development mailing list for these packages is: https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-mali-devel