# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/xf86-video-mga/hotfix-bigendian.patch # Copyright (C) 2025 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- Big-endian byte-swap DMA transfers, too and don't clobber opmode in exa. Signed-off-by: René Rebe --- xf86-video-mga-2.1.0/src/mga_exa.c.vanilla 2025-11-30 14:42:38.923164305 +0100 +++ xf86-video-mga-2.1.0/src/mga_exa.c 2025-11-30 14:59:23.789477025 +0100 @@ -714,7 +714,7 @@ mgaSetup(pMga, pDst, NULL, 10); - OUTREG(MGAREG_OPMODE, MGAOPM_DMA_BLIT); + /*OUTREG(MGAREG_OPMODE, MGAOPM_DMA_BLIT);*/ /* don't clobber big-endian swap -ReneR */ OUTREG(MGAREG_DSTORG, exaGetPixmapOffset(pDst)); OUTREG(MGAREG_PITCH, mgaGetPixmapPitch(pDst)); OUTREG(MGAREG_PLNWT, 0xffffffff); --- xf86-video-mga-2.1.0/src/mga_storm.c.vanilla 2025-11-30 15:05:25.110378492 +0100 +++ xf86-video-mga-2.1.0/src/mga_storm.c 2025-11-30 15:07:58.121778907 +0100 @@ -309,8 +309,9 @@ } opmode |= opmode_table[ pLayout->bitsPerPixel / 8 ]; + opmode |= opmode >> 8; /* replicate for dma swapping, too */ #if X_BYTE_ORDER == X_LITTLE_ENDIAN - opmode &= ~0x30000; + opmode &= ~0x30300; #endif pMga->fifoCount = 0;