summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2006-03-10 13:07:00 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2006-03-10 13:07:00 +0000
commit58817c9909ba659d0070afab0ff7f4e26f722403 (patch)
tree6410c87c09a28687d2bc5644b53b65482a71eda0 /src
parentab4c2f3bf4b26fdd597ea7b7a726ae77778617b2 (diff)
Enable gamma for hw cursor when ARGB cursor in use (Lukas Hejtmanek)
Diffstat (limited to 'src')
-rw-r--r--src/i830_cursor.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/i830_cursor.c b/src/i830_cursor.c
index dfed8cda..b35b0ec8 100644
--- a/src/i830_cursor.c
+++ b/src/i830_cursor.c
@@ -114,6 +114,8 @@ I830InitHWCursor(ScrnInfoPtr pScrn)
temp &= ~(CURSOR_FORMAT_MASK | CURSOR_GAMMA_ENABLE |
CURSOR_ENABLE | CURSOR_STRIDE_MASK);
temp |= (CURSOR_FORMAT_3C);
+ if (pI830->CursorIsARGB)
+ temp |= CURSOR_GAMMA_ENABLE;
/* This initialises the format and leave the cursor disabled. */
OUTREG(CURSOR_CONTROL, temp);
/* Need to set address and size after disabling. */
@@ -480,7 +482,7 @@ I830ShowCursor(ScrnInfoPtr pScrn)
temp = INREG(CURSOR_A_CONTROL);
temp &= ~(CURSOR_MODE | MCURSOR_PIPE_SELECT);
if (pI830->CursorIsARGB)
- temp |= CURSOR_MODE_64_ARGB_AX;
+ temp |= CURSOR_MODE_64_ARGB_AX | MCURSOR_GAMMA_ENABLE;
else
temp |= CURSOR_MODE_64_4C_AX;
temp |= (pI830->pipe << 28); /* Connect to correct pipe */
@@ -504,7 +506,7 @@ I830ShowCursor(ScrnInfoPtr pScrn)
temp &= ~(CURSOR_FORMAT_MASK);
temp |= CURSOR_ENABLE;
if (pI830->CursorIsARGB)
- temp |= CURSOR_FORMAT_ARGB;
+ temp |= CURSOR_FORMAT_ARGB | CURSOR_GAMMA_ENABLE;
else
temp |= CURSOR_FORMAT_3C;
OUTREG(CURSOR_CONTROL, temp);
@@ -526,7 +528,7 @@ I830HideCursor(ScrnInfoPtr pScrn)
pI830->cursorOn = FALSE;
if (IS_MOBILE(pI830) || IS_I9XX(pI830)) {
temp = INREG(CURSOR_A_CONTROL);
- temp &= ~CURSOR_MODE;
+ temp &= ~(CURSOR_MODE|MCURSOR_GAMMA_ENABLE);
temp |= CURSOR_MODE_DISABLE;
OUTREG(CURSOR_A_CONTROL, temp);
/* This is needed to flush the above change. */
@@ -543,7 +545,7 @@ I830HideCursor(ScrnInfoPtr pScrn)
}
} else {
temp = INREG(CURSOR_CONTROL);
- temp &= ~CURSOR_ENABLE;
+ temp &= ~(CURSOR_ENABLE|CURSOR_GAMMA_ENABLE);
OUTREG(CURSOR_CONTROL, temp);
}
}