Buffers allocated using zwp_linux_dmabuf_v1 using DRM_FORMAT_MOD_INVALID behaves incorrectly on scanout
Hardware: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] Kernel version: 5.15.4-101.fc34.x86_64 Mesa version: 31ad50d9 (main branch from Dec 07, 2021).
With the newest Linux DMA buffer Wayland protocol with feedback support, if the compositor only advertises support for implicit modifiers (DRM_FORMAT_MOD_INVALID
) via the scanout tranche, the buffers allocated cannot reliably be scanned out, as doing so sometimes result in past framebuffer content "bleeding through" (see photograph below).
(notice the hint of a weston-terminal
"behind" the fullscreen animating weston-simple-egl
.
The problem seems to be related to the assumption that buffers allocated with DRM_FORMAT_MOD_INVALID
should not need to be used via modifier aware kernel uapi. For example, if this assumption is not made, and instead still using modifier aware API if the imported gbm_bo reports non-implicit modifiers, the issue disappears.
The issue also disappears if the compositor advertise explicit modifier support.
During scanout when the issue reproduced, the following drm state was probed: drm_info.txt
Cc: @emersion, @leandrohrb