PINE64

Full Version: Expose /dev/mali0 in armbian
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I am managing a cluster of Rock64/RockPro64 and I need access to the GPU cycle counters (I already got access to CPU cycle counter) of the Mali T860 included in the board. I am trying to use the HWCPipe (https://github.com/ARM-software/HWCPipe) interface to get the CPU counters. However, this library tries to use /dev/mali0 to interact with the GPU, which is not exposed to the user in armbian using the Panfrost driver.

I have tried several ways of installing the mali midgard driver without success so far. Besides, I have tried to use /dev/dri/card1 (and 0) as resource for HWCPipe, but it doesn't work either.

Does someone know how I could expose the /dev/mali0 interface to userspace using panfrost driver or how to install mali-midgard driver in the last armbian version (kernel 5.15.48)?

The same posted here applies for Rock64 with lima driver for Mali-400 GPU, just in case...
Hello,

the panfrost driver does expose performance counters, though I don't know precisely through what kind of interface. Collabora wrote an article about using perfetto to access panfrost performance counters, which might be useful.

Kernel code seems to be in drivers/gpu/drm/panfrost/panfrost_perfcnt.c.
Hi, Thanks for your reply. I also checked that link before, but technically, what I would like to do is just gather the GPU cycles and embed the code in my application. I will try perfetto just to see how it works and see if I can adapt something