Building Panfrost

Use a mainline kernel version 5.2 or later with CONFIG_DRM_PANFROST enabled.

Mesa driver

Clone the source code for Mesa and the vendored overlay. Symlink in the overlay.

$ cd ~
$ git clone https://gitlab.freedesktop.org/mesa/mesa -b master

Configure, build, and install mesa (meson requires absolute paths prefix, adjust that):

$ cd ~/mesa
$ mkdir build && cd build
$ meson .. . -Ddri-drivers= -Dvulkan-drivers= -Dgallium-drivers=panfrost,kmsro 
$ ninja install

This may take a while, so brew a cup of tea.

Usage

Allow non-root users to access the hardware. Note this may be insecure for the time being, allowing processes to mess with each other’s graphics memory. Use with caution.

# chmod 0666 /dev/dri/*

/* TODO: udev rule */

Everything should be setup now, so enjoy the show!