vcio2 - Kernel driver to access Raspberry Pi VideoCore IV GPU without root privileges

When using Raspberry Pi's GPU from user space (e.g. hello_fft) with the built-in vcio driver in the RPi kernel you need to have root privileges for every application.
The goal of the vcio2 driver is to overcome this restriction. Furthermore vcio2 keeps track of the resources and performs some clean-up if the application is interrupted.

▼ Features & Limitations, ▼ Installation instructions, ▶ Sample code, ▶ Programming guide, ▶ API reference, ▼ Contact

Download & history

Download DKMS kernel module, an example and this documentation or view source code @ github

V0.3
Added advanced API for memory allocation/release.
Fixed invalid memory mappings after automatic release of GPU memory.
V0.2
Rewrote the driver to support newer RPi kernels.
Added performance counter support.
V0.1
First public release.

Features

Limitations

TODOs, known problems

Installation instructions

Prerequisites

Build and install the driver

Normally this should build the kernel module using DKMS, install it for the currently running kernel, setup the driver for autostart, load the driver and grant access to the group video. So it is ready to use immediately.

If it does not work, have a look at the error messages on the screen as well as /var/dkms/vcio2/0.2/build/make.log (compilation) and /var/log/syslog (loading).

Using the driver

As soon as the driver is loaded successfully, a new device /dev/vcio2 appears.

This is the new device which offers new features. Using this device requires changes to the source code of the application. See the API reference and especially the migration guide.

See vcio2 programming guide for further details.

If someone thinks that it should be part of the RPi kernel and knows how to contribute, let me know.

Remove the driver

This will unload the kernel module and uninstall it.

Contact

Comments, ideas, bugs, improvements to raspi at maazl dot de.