panfrost: gbm_bo_get_offset() wrongly returns 0 for second plane of NV12 buffers
This is basically the same issue as #9952 (closed) which was fixed in !25603 (merged). Corresponding Mutter bug: https://gitlab.gnome.org/GNOME/mutter/-/issues/3136
This was tested on a Pinebook Pro (rk3399) on Mesa 23.1.8, 23.3rc2 and current main/24.0/d67d501a
Description
gbm_bo_get_offset()
always returns 0
for the second plane for NV12, probably also P010, instead of the actual offset. This breaks output on Mutter when direct scanout is used - Weston is not affected because it separately stores the values received via Wayland instead of calling gbm_bo_get_offset()
. While Mutter could work around the issue, it's probably better to just fix Panfrost, like Intel previously.
Screenshots / visual impact
System information
System:
Host: test-pc Kernel: 6.5.3-1-MANJARO-ARM arch: aarch64 bits: 64
Desktop: GNOME v: 44.5 Distro: Manjaro ARM
CPU:
Info: quad core (2-mt/2-st) model: N/A variant-1: cortex-a72
variant-2: cortex-a53 bits: 64 type: MST AMCP
Speed (MHz): avg: 872 min/max: 408/1416:1800 cores: 1: 408 2: 408 3: 408
4: 408 5: 1800 6: 1800
Graphics:
Device-1: display-subsystem driver: rockchip_drm v: N/A
Device-2: rk3399-mali driver: panfrost v: kernel
Device-3: Microdia HP Integrated Webcam driver: uvcvideo type: USB
Display: wayland server: X.org v: 1.21.1.8 with: Xwayland v: 23.2.1
compositor: gnome-shell driver: N/A resolution: 1920x1080
API: EGL Message: EGL data requires eglinfo. Check --recommends.
Edited by Robert Mader