Idein / py-videocore6

Python library for GPGPU programming on Raspberry Pi 4
https://idein.jp
GNU General Public License v2.0
244 stars 28 forks source link

Support for V3D register access via /dev/mem #34

Closed Terminus-IMRC closed 4 years ago

Terminus-IMRC commented 4 years ago

These commits add the functionality of accessing V3D registers via /dev/mem. The register definitions are derived from https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/gpu/drm/v3d/v3d_regs.h but not all.

This enables the use of performance counters, though which source represents what metric is not known except for cycle count (32), which counts up every cycle. An example program that measures the QPU frequency is also added by using the counter.

Terminus-IMRC commented 4 years ago

Thanks!