jvcleave
Posts: 41
Joined: Thu May 24, 2012 10:27 pm

best way to monitor framerate with drm?

Mon Feb 03, 2020 9:06 pm

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

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8739
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: best way to monitor framerate with drm?

Tue Feb 04, 2020 11:27 am

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.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

jvcleave
Posts: 41
Joined: Thu May 24, 2012 10:27 pm

Re: best way to monitor framerate with drm?

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

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8739
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: best way to monitor framerate with drm?

Tue Feb 04, 2020 5:45 pm

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.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

jvcleave
Posts: 41
Joined: Thu May 24, 2012 10:27 pm

Re: best way to monitor framerate with drm?

Tue Feb 04, 2020 5:55 pm

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"

jvcleave
Posts: 41
Joined: Thu May 24, 2012 10:27 pm

Re: best way to monitor framerate with drm?

Wed Feb 05, 2020 7:56 am

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

User avatar
Gavinmc42
Posts: 4508
Joined: Wed Aug 28, 2013 3:31 am

Re: best way to monitor framerate with drm?

Wed Feb 05, 2020 8:16 am

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.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “OpenGLES”