Etnaviv/EGLFS performance vs Vivante driver
Chris Pringle
Chris.Pringle at phabrix.com
Mon Nov 29 14:54:10 PST 2021
Hi Folks,
I've been experimenting with using a stock kernel with the Etnaviv drivers instead of NXP's kernel tree with their proprietary Vivante driver. The main goals behind this are to give us the freedom to choose whatever recent kernel versions we want (rather than being tied to what NXP support) and to apply the RT patches.
We're using an IMX6Q with Kernel 5.10.73 and Qt 5.14.2, however, the EGLFS Qt performance with Etnaviv is significantly worse than with the Vivante driver (with kernel 4.1.15 and qt 5.4). A simple Qt test application that renders just a QLabel widget within a top-level QWidget takes 9mS to render (@ 3% CPU) with Vivante vs 55mS (@9% CPU) with Etnaviv. There are performance impacts evident across other aspects of the app too as the mouse pointer feels particularly sluggish (taking up to 330mS from mouse stop to cursor stop vs ~100mS with Vivante). 'perf' shows that the largest consumer of CPU time (43.59%) is within drm_ioctl calls for etnaviv. Oddly, despite having the RT patches enabled, the render times are all over the place with Etnaviv (anywhere from 38-65mS) whereas Vivante is dead on 9mS and very rarely changes (and these are averaged render times over 25 frames).
I've tried playing with all the environment variables listed on Qt's website (for eglfs) but with no avail. I've also tried single buffering and forcing GLES but that also made no difference. We are using "QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1" on Vivante (need to check but don't think this makes any difference for Etnaviv).
There is a great deal of change between our old and new setups (kernel version, Qt version, Yocto version (Krogarth vs Dunfell), Etnaviv, MESA); before I spend more time trying to eliminate variables with kernel versions and Qt versions (which I suspect may not yield much answers/results), I wanted to ask here if anyone has any thoughts on what else I could try to see what's causing these performance regressions. FYI, I'm using EGLFS (no Wayland/X11); on Vivante, I have " QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1". Any suggestions on other config changes, environment variables etc that I can try to see if they make any difference?
Thanks,
Chris
More information about the linux-arm
mailing list