Software rendering causing kernel warnings

  • 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.