2024-05-15 04:24 AM
Hi!
We are planning a product and have considered the STM32MP157 as a basis. Our test platform is the STM32MP157F-DK2 running a locally built Yocto Project image (openstlinux-eglfs distro, st-example-image-qt image) based on meta-st-stm32mp, meta-st-openstlinux, and meta-qt5 layers. The goal is to run a Qt application containing an OpenGL widget mixed with Qt UI elements at 60 Hz frame rate, but on a display bigger than the one shipped with the Discovery Kit.
We are currently testing with two different 480x1280 panels with custom drivers. The displays are actually running at 60 Hz as confirmed by hardware measurements. We also see 60 frames with watch -n 2 "grep user_updates /sys/kernel/debug/dri/*/state" while running glmark2-es2-drm (for the first two benchmarks at least).
This all seems good, still we are unable to achieve full frame rate with even the simplest Qt5 application (a plain QOpenGLWidget (showing a black screen) embedded into a QWidget, where the QOpenGLWidget gets update()'ed on every frameSwapped signal). The frame rate achieved by this toy program is a constant 30 Hz with the free Etnaviv driver, and 45 Hz with gcnano (galcore), but never anywhere near the expected 60 Hz. CPU usage of this program is around 20% on one core according to top.
Besides, our actual Qt application is always stuck at around 30 Hz, regardless of driver choice. CPU usage of this program is around 45% on one core according to top.
However, there are no frame rate problems with the 480x800 display shipped with the Discovery Kit: the exact same binaries (benchmark, toy app, actual application) are all running smoothly at 50 Hz on that display under both GPU drivers.
This leads us to believe that the system is on the edge with 480x800@50, and is simply not fast enough to run a Qt application at 480x1280@60 (even though glmark2-es2-drm has no problem spinning a full-screen horse at 60 fps). The Netdata GPU chart seems to confirm this by displaying 91.8% usage for the simple toy app (66.8% on the stock display), which is quite surprising for us.
Can anyone in here confirm this? Is this really expected? What would be a reasonable explanation for the relatively poor performance with Qt, while glmark2-es2-drm performs relatively well?
Thanks!
Solved! Go to Solution.
2024-07-11 05:30 AM
Hello @rtie,
for STM32MP157F, Qt5 applications can be run at 1280x720@30 in EGLFS configuration (default gcnano driver).
As you mentioned you probably reach the limit of the system in your configuration.
BR,
Philippe.
2024-05-27 11:40 PM
To answer myself, it seems to be downright impossible to achieve 480x1280@60 using regular Qt5 on STM32MP157F. It is possible with QOpenGLWindow and plain, carefully programmed OpenGL ES with Etnaviv driver. This approach, however, prevents direct use of Qt widgets and layouts, so mixing OpenGL areas with Qt layouts are not going to happen on STM32MP157F at high frame rates, at least not with Qt5 on a 480x1280 display. Please correct me if I am wrong. :)
2024-07-11 05:30 AM
Hello @rtie,
for STM32MP157F, Qt5 applications can be run at 1280x720@30 in EGLFS configuration (default gcnano driver).
As you mentioned you probably reach the limit of the system in your configuration.
BR,
Philippe.