Mali Utgard and Mali Midgard are architectures that underlie a number of GPUs.
Kernel space gator supports both Mali Utgard and Mali Midgard-based devices. In
addition, user space gator version 22 and later supports Mali Utgard-based devices.
Mali Utgard DDK version r6p0-00rel0 supports user space gator.
To use Streamline with a Mali-based device, you must have the following:
You can choose to build the Mali and gator drivers either in-tree or
out-of-tree. Building the modules out-of-tree might be simpler and quicker, but
building them in-tree might give better results. This is because recent versions of
Android do not allow loading kernel modules. Also, building the Mali driver in-tree
can avoid possible problems with tracepoints in kernel modules in Linux 3.15 and
Follow the normal installation and setup instructions for Streamline
. If you are using kernel space gator, see the
topic 1.8 Building the gator module
for information on how to build gator.ko.
The following instructions describe the
additional configuration options required by gator.ko
to support Mali-based devices. They assume you are building
Streamline only supports one type of GPU (and driver version) at once, and you choose this
at build time.
For a Mali-4xx GPU, specify the following options to your gator.ko
GATOR_WITH_MALI_SUPPORT=MALI_4xx # Set by CONFIG_GATOR_MALI_4XXMP
# gator source needs to #include "linux/mali_linux_trace.h"
GATOR_MALI_INTERFACE_STYLE=<3|4> # 3=Mali-400 DDK >= r3p0-04rel0 and < r3p2-01rel3
# 4=Mali-400 DDK >= r3p2-01rel3
# A default of 4 is set in
To add the corresponding support to the Mali drivers, user space needs the
Kernel space needs
USING_PROFILING=1 # Sets
These settings are the defaults in later driver versions. See the
documentation supplied with the ARM Driver Development Kit (DDK) for
Mali-4xx GPUs for more details.
For a Mali Midgard GPU, specify the following options to your gator.ko make command:
GATOR_WITH_MALI_SUPPORT=MALI_MIDGARD # Set by CONFIG_GATOR_MALI_MIDGARD
# gator source needs access to headers under .../kernel/drivers/gpu/arm/...
# a default of . is suitable for in-tree builds
For details of the corresponding options required by the Mali drivers, see
the documentation supplied with the ARM DDK for Mali Midgard GPUs.
Install the gator driver as a kernel module as normal:
NoteIf you chose
to build the Mali driver out of tree, you should install it before
installing the gator driver.
Verify that you built the module successfully:
ls -l /dev/gator/events/ARM_Mali*
This command should produce a list of counters.
If you have successfully built the gator driver with support for Mali
technology, you can run a capture session on a Mali-based target.
Follow the normal instructions for setting capture options and
triggering a capture session.