RPi4 testbuild with HDR support

  • opjenexus please remove all banned addons and repositories - best do a clean installation - you won't get any support here with these addons/repository installed. After that upload a log file where you reproduced the issue.

    so long,


  • I'm interested in developing the RPi 4 into an open-source test pattern generator, particularly for use with HDR displays. It seems like a lot of what is needed overlaps with the effort to get HDR working in Kodi/LibreELEC.

    Where is the work that popcornmix has done on the video driver to enable HDR output? Is it in the mainline Linux kernel somewhere?

    I'm particularly interested in understanding the various registers that the GPU/HDMI peripheral exposes for setting the color format, bit depth, AVI info frames, etc. Are these documented anywhere?


  • ErikSwan https://github.com/raspberrypi/linux/ <= everything is there. There will be differences between upstream mainline kernel and the downstream Pi kernel, but there's a pleasing-to-see continual upstreaming effort so the differences are not so big. Note that you also need to combine this with Pi firmware and the latest ffmpeg version; not specifically for HDR (which is more of a DRM thing) but to ensure you have the latest playback fixes. FFMpeg changes are still being hoarded downstream; the focus is still on features/fixes before that effort will start in earnest.

  • ErikSwan the RPi4 HDMI driver exposes standard DRM connector properties to set HDR metadata and colorimetry (BT709/2020) info, like eg Intel and AMD drivers do it, too. This is included in current upstream kernels (since 5.14) and in the downstream 5.10 RPi kernel - I haven't checked with the upstream kernel though.

    The driver also exposes a max_bpc connector property to switch from 8bit to 10 or 12bit output, but YCC output (4:4:4 or 4:2:2) selection isn't implemented yet - the driver always outputs in RGB 4:4:4 ATM.

    There's a draft PR to allow RGB/YCC selection via another connector property https://github.com/raspberrypi/linux/pull/4201 but ATM it's a bit unclear if it will be implemented that way or if it should be handled internally in the video driver (eg 4kp60 can't output 12bit 4:4:4 due to bandwidth limitations, auto-switching to 4:2:2 may be desirable in that case).

    so long,