diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2008-07-11 15:31:57 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2008-07-11 15:31:57 -0400 |
commit | 810c28cc2660b73e03e4d27be97988fc5321a06f (patch) | |
tree | 5c6fce5cf46df42a0d8f7bfdb9b408cf554f3bba | |
parent | 7e67d0163579a44f104e8f354a929ac9b33e4c21 (diff) |
Make sure cursor offsets are properly aligned when using EXA
-rw-r--r-- | src/radeon_exa.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/radeon_exa.c b/src/radeon_exa.c index f461f3ca..02fd4fc3 100644 --- a/src/radeon_exa.c +++ b/src/radeon_exa.c @@ -413,14 +413,16 @@ Bool RADEONSetupMemEXA (ScreenPtr pScreen) /* Reserve static area for hardware cursor */ if (!xf86ReturnOptValBool(info->Options, OPTION_SW_CURSOR, FALSE)) { int cursor_size = 64 * 4 * 64; + int align = IS_AVIVO_VARIANT ? 4096 : 256; int c; for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private; - radeon_crtc->cursor_offset = info->exa->offScreenBase; - info->exa->offScreenBase += cursor_size; + radeon_crtc->cursor_offset = + RADEON_ALIGN(info->exa->offScreenBase, align); + info->exa->offScreenBase = radeon_crtc->cursor_offset + cursor_size; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Will use %d kb for hardware cursor %d at offset 0x%08x\n", |