Posts by sigmaris

    I've noticed that Software decoded video using DRM PRIME rendering causes a lot of kernel warnings on the latest nightly build on RK3399 (RockPRO64). I first found this with my own Debian distro and build of Kodi 19, chewitt on the Freenode #panfrost channel suggested reporting it to knaerzche here as it happens on LibreELEC 9.8 nightly 20210206-dc904cd as well.


    To reproduce it, I just played a RealVideo (i.e. definitely not hardware decoded) video clip in LibreELEC with default settings. The video is displayed in Kodi, but the frame rate is lower than it should be - maybe because it seems like every few frames or maybe every frame, a warning is logged by the kernel. The warnings all look like this: kernel WARNING from kodi software decoding · GitHub logged from drivers/gpu/drm/drm_gem.c:1096 drm_gem_mmap_obj+0x1a8/0x208

    It looks like this doesn't happen for hardware-decoded video which gets displayed directly on a DRM plane; seems like it's triggered by importing frames from a DMA-buf to a texture using EGL, which in the RK3399 case only happens for software-decoded video.

    I have also noticed small clicks/pops in HDMI audio in Kodi, not on LibreELEC but using a custom build of Debian Buster with 5.3 kernel.

    If the CPUfreq scaling governor is set to "performance" it doesn't happen for me.

    If the governor is the default "ondemand" I hear the clicks. So I suspect it's related to CPUfreq switching frequencies.


    KOPRajs and butterkitty on the mainline kernel, you could try running (as root)

    Code
    echo "performance" > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
    echo "performance" > /sys/devices/system/cpu/cpufreq/policy4/scaling_governor

    and then test HDMI audio. It'd be interesting to see if that fixes the issue.