Reason why OSD helps is probably because EGL provides vsync... I don't know. Maybe windowing/gbm: Add display clock by popcornmix · Pull Request #19601 · xbmc/xbmc · GitHub will help. IDK.
I've rebuild LE with patches from this PR and enabled "Sync playback to display", no visible changes at all.
23.976 FPS on 23.976 Hz is still stuttering, drawing something with EGL still fixes it.
Did some further tests on Beelink GS1: configured Kodi to always draw (algorithmdirtyregions=0), enabled GALLIUM_HUD, launched Kodi mainscreen and tried switching CPU governors.
Basicly lowering CPU clock frequency affects Kodi GUI rendering speed, quite visibly.
Panfrost performance is inadequate enough already, 30 FPS only, but default schedutil clocks down CPU (as it should, since load is low) and it pushes rendering speed even lower, to 20FPS. Frametime on schedutil is bouncy and erratic as well.
Loading even one CPU core to 100% with something like 'openssl speed' instantly improves Kodi GUI rendering 20->30FPS
Also, locking CPU frequency to max also gives like +20% performance to hardware video decoding.
P.S. Testing it was a pain, the way ffmpeg is packaged in LibreElec is sooo confusing, binary programs aren't included in base build at all and ffmpeg-tools addon uses completely different build options, without any hardware decoding patches...
# echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# ffmpeg -hwaccel drm -hwaccel_output_format drm_prime -i 03-h264-1080-30p-100mbps.mp4 -f null -
frame= 452 fps= 89 q=-0.0 Lsize=N/A time=00:00:15.06 bitrate=N/A speed=2.96x
# echo schedutil > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# ffmpeg -hwaccel drm -hwaccel_output_format drm_prime -i 03-h264-1080-30p-100mbps.mp4 -f null -
frame= 452 fps= 76 q=-0.0 Lsize=N/A time=00:00:15.06 bitrate=N/A speed=2.54x
# echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# ffmpeg -hwaccel drm -hwaccel_output_format drm_prime -i 03-h264-1080-30p-100mbps.mp4 -f null -
frame= 452 fps= 74 q=-0.0 Lsize=N/A time=00:00:15.06 bitrate=N/A speed=2.48x
Display More
Perhaps there are some issues with hardware clocks, lowering CPU frequency also downclocks some other parts of H6, no idea if it's memory controller or GPU/VE/GE whatever else.
IMHO for now the only sane workaround is to use performance governor instead of default schedutil, forcing CPU to max 1.8GHz.