summaryrefslogtreecommitdiff
path: root/src/radeon_cursor.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-04-28 19:28:25 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-04-28 19:28:25 -0400
commit4e948e2aaa59267a9aa797396add2c6b7b4c1e7c (patch)
tree8cf0e44887a54cc3027eb5b793ce9cca10823c76 /src/radeon_cursor.c
parent4d0beaf02b28d5a5dac4ff6053593a2f979f92ec (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/radeon_cursor.c')
-rw-r--r--src/radeon_cursor.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c
index 6fc681a9..1f06b17b 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 {