diff options
author | Cédric Cano <ccano@interfaceconcept.com> | 2011-02-11 16:33:16 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2011-02-11 16:33:16 -0500 |
commit | 151b22bd7c3b1002a7261538611fb2b468815c86 (patch) | |
tree | e97be3ab0c278bf6c14cf0f6a5b72478caaf3e66 | |
parent | 309fac041f998e20338d320aabaeda5cc1bb6348 (diff) |
kms/6xx+: endian swap cursor uploads
agd5f: remove kms surface for cursor since
we now do the swap in the cursor load to avoid
breaking pre-6xx cards with BE.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
-rw-r--r-- | src/drmmode_display.c | 10 | ||||
-rw-r--r-- | src/radeon_kms.c | 5 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 06cfd953..705a41ad 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -411,14 +411,14 @@ static void drmmode_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; - void *ptr; + int i; + uint32_t *ptr; /* cursor should be mapped already */ - ptr = drmmode_crtc->cursor_bo->ptr; - - memcpy (ptr, image, 64 * 64 * 4); + ptr = (uint32_t *)(drmmode_crtc->cursor_bo->ptr); - return; + for (i = 0; i < 64 * 64; i++) + ptr[i] = cpu_to_le32(image[i]); } diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 65d62c2d..82258d92 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -1148,11 +1148,6 @@ static Bool radeon_setup_kernel_mem(ScreenPtr pScreen) return FALSE; } -#if X_BYTE_ORDER == X_BIG_ENDIAN - radeon_bo_set_tiling(info->cursor_bo[c], RADEON_TILING_SWAP_32BIT | - RADEON_TILING_SURFACE, CURSOR_WIDTH); -#endif - if (radeon_bo_map(info->cursor_bo[c], 1)) { ErrorF("Failed to map cursor buffer memory\n"); } |