diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-04-28 19:28:25 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-05-08 12:08:17 -0400 |
commit | 998fd24417d1e86ad70e15a2f55bb81320b28987 (patch) | |
tree | a805ea9afeeead27225a374c3cf0ab4c571c114e /src | |
parent | 97c63973ff187744fe2bb72bdd7bcd16cb95e33f (diff) |
AVIVO: fix cursor corruption/flickering issues
When both crtcs are enabled, both cursors need to be enabled
or you get corruption bands.
Thanks to Yang Zhao for figuring this out.
Diffstat (limited to 'src')
-rw-r--r-- | src/radeon_cursor.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c index bc9cf191..ae9c3469 100644 --- a/src/radeon_cursor.c +++ b/src/radeon_cursor.c @@ -135,12 +135,25 @@ radeon_crtc_show_cursor (xf86CrtcPtr crtc) unsigned char *RADEONMMIO = info->MMIO; if (IS_AVIVO_VARIANT) { - avivo_lock_cursor(crtc, TRUE); - OUTREG(AVIVO_D1CUR_CONTROL + radeon_crtc->crtc_offset, - INREG(AVIVO_D1CUR_CONTROL + radeon_crtc->crtc_offset) - | AVIVO_D1CURSOR_EN); - avivo_setup_cursor(crtc, TRUE); - avivo_lock_cursor(crtc, FALSE); + RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); + + /* both cursors should be enabled when dualhead is active + * or you may get corruption bands + */ + if (pRADEONEnt->Controller[0]->enabled && + pRADEONEnt->Controller[1]->enabled) { + avivo_lock_cursor(pRADEONEnt->pCrtc[0], TRUE); + avivo_setup_cursor(pRADEONEnt->pCrtc[0], TRUE); + avivo_lock_cursor(pRADEONEnt->pCrtc[0], FALSE); + + avivo_lock_cursor(pRADEONEnt->pCrtc[1], TRUE); + avivo_setup_cursor(pRADEONEnt->pCrtc[1], TRUE); + avivo_lock_cursor(pRADEONEnt->pCrtc[1], FALSE); + } else { + avivo_lock_cursor(crtc, TRUE); + avivo_setup_cursor(crtc, TRUE); + avivo_lock_cursor(crtc, FALSE); + } } else { switch (crtc_id) { case 0: @@ -169,9 +182,6 @@ radeon_crtc_hide_cursor (xf86CrtcPtr crtc) if (IS_AVIVO_VARIANT) { avivo_lock_cursor(crtc, TRUE); - OUTREG(AVIVO_D1CUR_CONTROL+ radeon_crtc->crtc_offset, - INREG(AVIVO_D1CUR_CONTROL + radeon_crtc->crtc_offset) - & ~(AVIVO_D1CURSOR_EN)); avivo_setup_cursor(crtc, FALSE); avivo_lock_cursor(crtc, FALSE); } else { |