From f39f7aed1367f6076cca00031373440b352a6065 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 7 Jul 2013 13:44:13 +0200 Subject: [PATCH] Set RADEON_TILING_SURFACE on front buffer when byte swapping is needed. Fixes direct front buffer access on big-endian systems. Signed-off-by: Mark Kettenis --- src/drmmode_display.c | 4 ++-- src/radeon_kms.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 3a0187e..db0a79c 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1495,10 +1495,10 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height) #if X_BYTE_ORDER == X_BIG_ENDIAN switch (cpp) { case 4: - tiling_flags |= RADEON_TILING_SWAP_32BIT; + tiling_flags |= RADEON_TILING_SWAP_32BIT | RADEON_TILING_SURFACE; break; case 2: - tiling_flags |= RADEON_TILING_SWAP_16BIT; + tiling_flags |= RADEON_TILING_SWAP_16BIT | RADEON_TILING_SURFACE; break; } #endif diff --git a/src/radeon_kms.c b/src/radeon_kms.c index c3f50d5..d2e2c06 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -1579,10 +1579,10 @@ static Bool radeon_setup_kernel_mem(ScreenPtr pScreen) #if X_BYTE_ORDER == X_BIG_ENDIAN switch (cpp) { case 4: - tiling_flags |= RADEON_TILING_SWAP_32BIT; + tiling_flags |= RADEON_TILING_SWAP_32BIT | RADEON_TILING_SURFACE; break; case 2: - tiling_flags |= RADEON_TILING_SWAP_16BIT; + tiling_flags |= RADEON_TILING_SWAP_16BIT | RADEON_TILING_SURFACE; break; } #endif -- 1.8.3.1