Page 1 of 1

best way to monitor framerate with drm?

Posted: Mon Feb 03, 2020 9:06 pm
by jvcleave
I am writing a drm based app and I seem to be capped at 30fps even though my drmModeModeInfo refresh returns 60fps


I am looking for something like this

https://wiki.st.com/stm32mpu/wiki/DRM_K ... _framerate

Re: best way to monitor framerate with drm?

Posted: Tue Feb 04, 2020 11:27 am
by 6by9
From that ST page you link to
The DRM/KMS framework does not offer natively a display framerate monitoring, the above solution is powered by the STMicroelectronics DRM/KMS implementation.
https://github.com/raspberrypi/linux/bl ... tdc.c#L885 is presumably the logging lines they are looking at. That's the number of updates per plane, not per display. You could add a similar thing to vc4 - PRs welcome.

Re: best way to monitor framerate with drm?

Posted: Tue Feb 04, 2020 5:28 pm
by jvcleave
Thanks! Is it odd that I don't get 60fps with kmscube in legacy mode? I've even reduced the drawing to just glClear

Re: best way to monitor framerate with drm?

Posted: Tue Feb 04, 2020 5:45 pm
by 6by9
jvcleave wrote:
Tue Feb 04, 2020 5:28 pm
Thanks! Is it odd that I don't get 60fps with kmscube in legacy mode? I've even reduced the drawing to just glClear
Pi4 or Pi3?
If Pi4 then you've dropped back to software GL, and that will be slow.

Re: best way to monitor framerate with drm?

Posted: Tue Feb 04, 2020 5:55 pm
by jvcleave
It's a PI4 (X not running)

OpenGL ES 2.x information:
version: "OpenGL ES 3.0 Mesa 19.2.0-rc1"
shading language version: "OpenGL ES GLSL ES 3.00"
vendor: "Broadcom"
renderer: "V3D 4.2"

Re: best way to monitor framerate with drm?

Posted: Wed Feb 05, 2020 7:56 am
by jvcleave
not sure what but something with kmscube is different than this similar implementation that runs at 60fps

https://github.com/matusnovak/rpi-opengl-without-x

Re: best way to monitor framerate with drm?

Posted: Wed Feb 05, 2020 8:16 am
by Gavinmc42
With two screens, could the other be used as debug output, ie fps etc.
Can piglet be used?
I am so far down the learning curve I am on flat ground, I have to use things like this for inspiration.
https://www.iquilezles.org/www/index.htm

Godot4 will have a CPU/GPU profiler, that will be useful one day.