xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Mon May 4 09:59:07 PDT 2009


 src/radeon_cursor.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 8155a62df6817358a12cc2d613c1470ca55996ef
Author: Alex Deucher <alexdeucher at gmail.com>
Date:   Mon May 4 12:57:36 2009 -0400

    AVIVO: move cusor offscreen when disabling
    
    Adapted from Yang's patch. Setting size to zero is
    actually a 1x1 cursor.

diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c
index 1336e2a..2feb0d7 100644
--- a/src/radeon_cursor.c
+++ b/src/radeon_cursor.c
@@ -169,13 +169,18 @@ radeon_crtc_hide_cursor (xf86CrtcPtr crtc)
     unsigned char     *RADEONMMIO = info->MMIO;
 
     if (IS_AVIVO_VARIANT) {
+	DisplayModePtr mode = &crtc->mode;
+
 	avivo_lock_cursor(crtc, TRUE);
-	/* set size to zero as proper size will get set in
-	 * set_cursor_postion(). This will prevent the cursor
+	/* Set position offscreen.  This will prevent the cursor
 	 * from showing up even if it's enabled to work-around
 	 * corruption issues.
 	 */
-	OUTREG(AVIVO_D1CUR_SIZE + radeon_crtc->crtc_offset, 0);
+	if (mode) {
+	    OUTREG(AVIVO_D1CUR_POSITION + radeon_crtc->crtc_offset,
+		   ((crtc->x + mode->CrtcHDisplay) << 16) | (crtc->y + mode->CrtcVDisplay));
+	    OUTREG(AVIVO_D1CUR_HOT_SPOT + radeon_crtc->crtc_offset, 0);
+	}
 	avivo_setup_cursor(crtc, FALSE);
 	avivo_lock_cursor(crtc, FALSE);
     } else {


More information about the xorg-commit mailing list