summaryrefslogtreecommitdiff
path: root/src/radeon_cursor.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-05-04 12:57:36 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-05-04 12:57:36 -0400
commit8155a62df6817358a12cc2d613c1470ca55996ef (patch)
treecd5e65a5bb865abd74ad91fde9537af8177f1cf3 /src/radeon_cursor.c
parenta1c64ea5224009779ccad66b0f84d861eae966ac (diff)
AVIVO: move cusor offscreen when disabling
Adapted from Yang's patch. Setting size to zero is actually a 1x1 cursor.
Diffstat (limited to 'src/radeon_cursor.c')
-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 1336e2a5..2feb0d70 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 {