Building Panfrost

To begin, you need a mainline kernel with the Panfrost kernel driver. Use the tree in https://gitlab.freedesktop.org/panfrost/linux/tree/panfrost-5.0 (i.e. the panfrost-5.0 branch); build and install that with the panfrost DRM GPU driver 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 -Dlibunwind=false
$ 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 */ You may now run (GBM) OpenGL ES 2.0 programs from the console, which will render to a DRM surface. X11 is not yet supported.

$ kmscube
$ glmark2-es2-drm -brefract

You can also run some Wayland compositors and run Wayland OpenGL ES 2.0 programs from there, rendering into a Wayland window.

$ weston
$ es2gears_wayland # From within Weston
$ glmark2-es2-wayland -bjellyfish # Ditto

Enjoy the show!