You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DRM driver issue with DRM_FORMAT_YVU420 on Raspberry Pi 5 #7117
I'm having an issue during video playback with Android on Raspberry Pi 5. This issue is not present on Raspberry Pi 4 with the same graphics components (drm-hwcomposer, minigbm gralloc, mesa vc4 & v3d gallium & broadcom vulkan).
R and B are swapped during video playback i.e. it looks like this.
Thanks for the report.
Pi5 has an updated version of the HVS to support dual 4k60 and extra pixel formats. Various bits of the hardware configuration are slightly different, and the driver should be programming it correctly.
I've reproduced the issue using kmstest -f 1280x720-YV12. (kmstest being part of https://github.com/tomba/kmsxx/ and more friendly than modetest).
Ah, two different approaches to defining the buffer.
kmstest creates 3 distinct plane buffers. modetest creates one buffer with offsets.
I'd only swapped the base addresses, not the offsets. Updating....
Activity
6by9 commentedon Nov 3, 2025
Thanks for the report.
Pi5 has an updated version of the HVS to support dual 4k60 and extra pixel formats. Various bits of the hardware configuration are slightly different, and the driver should be programming it correctly.
I've reproduced the issue using
kmstest -f 1280x720-YV12. (kmstest being part of https://github.com/tomba/kmsxx/ and more friendly than modetest).In this case it does look like the hardware behaves differently to the previous generations. The driver config in https://github.com/raspberrypi/linux/blob/rpi-6.12.y/drivers/gpu/drm/vc4/vc4_plane.c#L125-L136 sets the component ordering for the planes to be Y CR CB, but it's then apparently ignoring it.
Checking the docs, and oddly that field isn't listed as being applicable for HVS formats 8, 10, 12, 13, 14, 15, or >18 (see https://github.com/raspberrypi/linux/blob/rpi-6.12.y/drivers/gpu/drm/vc4/vc4_regs.h#L1058-L1090 for the definitions). Gut feel is that it would have taken more effort to make them n/a than to implement them! C'est la vie.
Fortunately for the 3-plane formats there is the easy fix by swapping the pointers to the Cb and Cr planes. I'll sort a PR.
6by9 commentedon Nov 3, 2025
#7122 for a fix.
KonstaT commentedon Nov 3, 2025
Thanks for looking into this.
Unfortunately still the same issue with kernel built with patch from #7122.
modetesttest pattern also still shows that R and B are swapped onYV12,YV16, andYV24.popcornmix commentedon Nov 3, 2025
The fix worked for me when tested with:
kmstest -f 1280x720-YV12I updated with
sudo rpi-update pulls/7122KonstaT commentedon Nov 3, 2025
Hmm, that's strange. I'm definitely on kernel with patch from #7122.
I only have
modetestto try. All Linux tools need to be compiled against Android bionic C-library (vs. glibc) to work on Android.6by9 commentedon Nov 3, 2025
Ah, two different approaches to defining the buffer.
kmstest creates 3 distinct plane buffers. modetest creates one buffer with offsets.
I'd only swapped the base addresses, not the offsets. Updating....
6by9 commentedon Nov 3, 2025
#7124 fixes it for both kmstest and modetest for me.
KonstaT commentedon Nov 3, 2025
Excellent, can confirm that this issue is resolved after #7124.
Thank you very much for the quick fix!
Revert "drm_hwcomposer: Add rpi5 backend"
Revert "drm_hwcomposer: Add rpi5 backend"