PINE64
Expose /dev/mali0 in armbian - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCKPRO64 (https://forum.pine64.org/forumdisplay.php?fid=98)
+--- Forum: Linux on RockPro64 (https://forum.pine64.org/forumdisplay.php?fid=101)
+--- Thread: Expose /dev/mali0 in armbian (/showthread.php?tid=17038)



Expose /dev/mali0 in armbian - pedromiguel.sanchez - 07-21-2022

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...


RE: Expose /dev/mali0 in armbian - CounterPillow - 07-24-2022

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.


RE: Expose /dev/mali0 in armbian - pedromiguel.sanchez - 07-25-2022

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