diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2008-07-11 15:31:57 -0400 |
---|---|---|
committer | Brice Goglin <bgoglin@debian.org> | 2008-08-02 18:46:32 +0200 |
commit | 09edc173cd2e93aa08947fac8693c75bf5edeac8 (patch) | |
tree | 792c9d6a5dab9ae891fc91dd97511d1e682e8933 | |
parent | 68f494379edf1fe4b21007f6a27e9f39d2ed10d6 (diff) | |
download | xf86-video-ati-frc-09edc173cd2e93aa08947fac8693c75bf5edeac8.tar.gz xf86-video-ati-frc-09edc173cd2e93aa08947fac8693c75bf5edeac8.tar.bz2 |
Make sure cursor offsets are properly aligned when using EXA
(cherry picked from commit 810c28cc2660b73e03e4d27be97988fc5321a06f)
-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 f461f3c..02fd4fc 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", |