Describe the bug
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.

vs. how it should.

Currently the kernel (https://github.com/raspberry-vanilla/android_kernel_brcm_rpi) is at 6.12.52 but this issue has been present from the start on Pi 5 (i.e. with 6.1 and 6.6 as well).
Current workaround with drm-hwcomposer (https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer) has been to set client (GPU) composition for DRM_FORMAT_YVU420 instead of using device (DRM) composition as it should (https://github.com/raspberry-vanilla/android_external_drm_hwcomposer/blob/android-16.0/backend/BackendRpi5.cpp). This way the colors are displayed correctly during video playback.
drm-hwcomposer maintainers have suggested that this is an issue with the kernel DRM driver (https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/328#note_2790523).
Any idea why this is happening? What is different on Pi 5 compared to Pi 4 in this regard?
drm-hwcomposer maintainer also suggested (https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/issues/125) to run test pattern with modetest. I tested all the formats and YV12, YV16, and YV24 show R and B are swapped compared to the others.
console:/ # stop vendor.hwcomposer-3
console:/ # modetest -M vc4 -s 33:1920x1080-60@YV12
opened device `Broadcom VC4 graphics` on driver `vc4` (version 0.0.0 at 0)
setting mode 1920x1080-60.00Hz on connectors 33, crtc 92
Any other relevant information I can provide?
Thanks.
Steps to reproduce the behaviour
AOSP on Raspberry Pi 5.
Device (s)
Raspberry Pi 5
System
AOSP on Raspberry Pi 5.
Linux kernel 6.12, 6.6, and 6.1.
Logs
No response
Additional context
No response
Describe the bug
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.
vs. how it should.
Currently the kernel (https://github.com/raspberry-vanilla/android_kernel_brcm_rpi) is at 6.12.52 but this issue has been present from the start on Pi 5 (i.e. with 6.1 and 6.6 as well).
Current workaround with drm-hwcomposer (https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer) has been to set client (GPU) composition for
DRM_FORMAT_YVU420instead of using device (DRM) composition as it should (https://github.com/raspberry-vanilla/android_external_drm_hwcomposer/blob/android-16.0/backend/BackendRpi5.cpp). This way the colors are displayed correctly during video playback.drm-hwcomposer maintainers have suggested that this is an issue with the kernel DRM driver (https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/328#note_2790523).
Any idea why this is happening? What is different on Pi 5 compared to Pi 4 in this regard?
drm-hwcomposer maintainer also suggested (https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/issues/125) to run test pattern with
modetest. I tested all the formats andYV12,YV16, andYV24show R and B are swapped compared to the others.Any other relevant information I can provide?
Thanks.
Steps to reproduce the behaviour
AOSP on Raspberry Pi 5.
Device (s)
Raspberry Pi 5
System
AOSP on Raspberry Pi 5.
Linux kernel 6.12, 6.6, and 6.1.
Logs
No response
Additional context
No response