I am trying to find a variable/some metric that can help me compute the actual number of frames rendered in the Midgard GPU driver in the Linux kernel.
While testing my algorithms on a user-level program, I used a system call (shown below) that got the frame count from SurfaceFlinger and stored this value to a file, which I later read in the user-level program.
system("setsid adb shell service call SurfaceFlinger 1013 | \
grep -o -E \\([a-fA-F0-9]+\\ \\)> frames.txt");
Note: I'm trying to create a dvfs governor that uses this information but I can't seem to find a way to access it in the Midgard driver. I only have access to the 'utilization' of the GPU cores, but this doesn't always match the frame count. Any ideas on how to go about this?