summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-10-14 17:00:51 -0400
committerAlex Deucher <alexdeucher@gmail.com>2010-10-14 17:00:51 -0400
commit042037e485396981cf4a420c247104ba5d016ca0 (patch)
tree0c7a94391711d69f20c10e479ecb04cae02292b3
parent0f37458c253aec46d98db6661c4def711df8fc17 (diff)
evergreen: requires same cursor fix as avivo chips
-rw-r--r--src/radeon_cursor.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c
index 9fa2d805..6c2b9e8a 100644
--- a/src/radeon_cursor.c
+++ b/src/radeon_cursor.c
@@ -260,29 +260,14 @@ radeon_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
int xorigin = 0, yorigin = 0;
int stride = 256;
DisplayModePtr mode = &crtc->mode;
+ int w = CURSOR_WIDTH;
if (x < 0) xorigin = -x+1;
if (y < 0) yorigin = -y+1;
if (xorigin >= CURSOR_WIDTH) xorigin = CURSOR_WIDTH - 1;
if (yorigin >= CURSOR_HEIGHT) yorigin = CURSOR_HEIGHT - 1;
- if (IS_DCE4_VARIANT) {
- /* avivo cursor spans the full fb width */
- if (crtc->rotatedData == NULL) {
- x += crtc->x;
- y += crtc->y;
- }
-
- evergreen_lock_cursor(crtc, TRUE);
- OUTREG(EVERGREEN_CUR_POSITION + radeon_crtc->crtc_offset, ((xorigin ? 0 : x) << 16)
- | (yorigin ? 0 : y));
- OUTREG(EVERGREEN_CUR_HOT_SPOT + radeon_crtc->crtc_offset, (xorigin << 16) | yorigin);
- OUTREG(EVERGREEN_CUR_SIZE + radeon_crtc->crtc_offset,
- ((CURSOR_WIDTH - 1) << 16) | (CURSOR_HEIGHT - 1));
- evergreen_lock_cursor(crtc, FALSE);
- } else if (IS_AVIVO_VARIANT) {
- int w = CURSOR_WIDTH;
-
+ if (IS_AVIVO_VARIANT) {
/* avivo cursor spans the full fb width */
if (crtc->rotatedData == NULL) {
x += crtc->x;
@@ -307,7 +292,17 @@ radeon_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
if (w <= 0)
w = 1;
}
+ }
+ if (IS_DCE4_VARIANT) {
+ evergreen_lock_cursor(crtc, TRUE);
+ OUTREG(EVERGREEN_CUR_POSITION + radeon_crtc->crtc_offset, ((xorigin ? 0 : x) << 16)
+ | (yorigin ? 0 : y));
+ OUTREG(EVERGREEN_CUR_HOT_SPOT + radeon_crtc->crtc_offset, (xorigin << 16) | yorigin);
+ OUTREG(EVERGREEN_CUR_SIZE + radeon_crtc->crtc_offset,
+ ((w - 1) << 16) | (CURSOR_HEIGHT - 1));
+ evergreen_lock_cursor(crtc, FALSE);
+ } else if (IS_AVIVO_VARIANT) {
avivo_lock_cursor(crtc, TRUE);
OUTREG(AVIVO_D1CUR_POSITION + radeon_crtc->crtc_offset, ((xorigin ? 0 : x) << 16)
| (yorigin ? 0 : y));