summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-05-04 12:57:36 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-05-08 12:11:41 -0400
commitcb8081a8e70b3354037f8ca99380288fe2eb9828 (patch)
treedd1d0363ea7b60414b33ddbeb106731bc4534fcc
parent0e49efbe8c271c26cec4dfca063c73755dc2d25f (diff)
AVIVO: move cusor offscreen when disabling
Adapted from Yang's patch. Setting size to zero is actually a 1x1 cursor.
-rw-r--r--src/radeon_cursor.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c
index 96df1d73..4f646bc8 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 {