Greetings,
The first release candidate of Linux 4.13 is now released, along with the new Mali Midgard kernel drivers, which are now at the version r19p0!
These new drivers can be integrated without issues on Linux 4.10 but still need to be patched to integrate them with recent Linux kernels.
Here I provide the patches I wrote to compile the Mali Midgard kernel drivers r19p0, along with the Mali UMP driver, on 4.13 kernels.
You'll still need to copy the drivers and integrate them to the Linux kernel in order to build them.
Most of these patches are mostly due to headers names and structure members being changed after Linux 4.10.
Mali Midgard specific patch :
Mali UMP specific patches :
The patch required to compile the Mali Midgard drivers is due to the following changes in Linux 4.11 and onward :
The patches required to compile the Mali UMP driver are due to the following mainline kernel changes :
The patches required to enable the compilation of Mali Midgard GPU drivers and UMP drivers, after copying the drivers package TX011-SW-99002-r19p0-01rel0/driver/product/kernel/ content in your linux kernel base directory, are available here :
The mainlined Rockchip DTS files now defines the Mali GPU nodes, which is great. However, the mainlined definition defines the Mali GPU IRQ names using lowercase letter, while the unpatched driver only understands IRQ names written in uppercase, leading to the driver failing the GPU detection.
The following patch solves this issue :
Also note that, the mainlined Rockchip DTS file does not define the specific "clk_mali" clock name on the GPU node, expecting the driver to get the main clock when needed. This patch modifies the Mali Midgard driver to get the main clock and avoid dependencies to that specific clock symbol :
A full kernel download, patch and compilation procedure for MiQi RK3288 Armv7 boards is available here : https://github.com/Miouyouyou/RockMyy .
The procedure includes the download of the Linux 4.13-rc1 kernel and the Mali r19p0-01rel0 kernel drivers.
These patches have been tested with the r13p0 drivers provided by Rockchip, using an Armbian system on a MiQi board.
If these patches were useful to you, don't hesitate to support me on Patreon !
Update 2015-08-07 It seems that a few changes in the DTS "compatible" property naming schemes of the Mali Midgard GPU nodes generated some issues within the driver, which could not find the GPU anymore, requiring another patch.