# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/linux/hotfix-radeon-bigendian.patch # Copyright (C) 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- Prefer host byte order for big-endian AVIVO addfb. Sets mode_config.quirk_addfb_prefer_host_byte_order for AVIVO/DCE ASICs on big-endian, so the legacy ADDFB ioctl accepts and reports the fourccs as host-order words. Needed by compositors that still use the legacy DRM mode (KWin 6.7.x does). --- linux-7.3/drivers/gpu/drm/radeon/radeon_display.c +++ linux-7.3/drivers/gpu/drm/radeon/radeon_display.c @@ -1596,6 +1596,12 @@ rdev_to_drm(rdev)->mode_config.funcs = &radeon_mode_funcs; +#ifdef __BIG_ENDIAN + /* AVIVO/DCE byte-swap scanout buffers on big-endian hosts */ + if (ASIC_IS_AVIVO(rdev)) + rdev_to_drm(rdev)->mode_config.quirk_addfb_prefer_host_byte_order = true; +#endif + if (radeon_use_pflipirq == 2 && rdev->family >= CHIP_R600) rdev_to_drm(rdev)->mode_config.async_page_flip = true;