xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Tue Apr 28 16:30:55 PDT 2009


 src/radeon_cursor.c |   28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)

New commits:
commit 4e948e2aaa59267a9aa797396add2c6b7b4c1e7c
Author: Alex Deucher <alexdeucher at gmail.com>
Date:   Tue Apr 28 19:28:25 2009 -0400

    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.

diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c
index 6fc681a..1f06b17 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 {


More information about the xorg-commit mailing list