diff options
author | Luká\u0161 Hejtmánek <xhejtman@mail.muni.cz> | 2006-07-11 10:13:18 -0700 |
---|---|---|
committer | Eric Anholt <anholt@FreeBSD.org> | 2006-07-11 10:13:18 -0700 |
commit | f9499a68da0ce459fed0b29b998678fd81898a51 (patch) | |
tree | 5073e637e2a5e35d139fcb7b95824ff2fb48f04e /src/i830_cursor.c | |
parent | 7068468ac1951bfca0071bb9b1a99df4f37368a0 (diff) |
Make gamma settings apply to the cursor as well, and fix clone-mode gamma.
Diffstat (limited to 'src/i830_cursor.c')
-rw-r--r-- | src/i830_cursor.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/i830_cursor.c b/src/i830_cursor.c index 79d950e5..b3736490 100644 --- a/src/i830_cursor.c +++ b/src/i830_cursor.c @@ -93,8 +93,6 @@ I830InitHWCursor(ScrnInfoPtr pScrn) MCURSOR_PIPE_SELECT); temp |= CURSOR_MODE_DISABLE; temp |= (pI830->pipe << 28); -/* if(pI830->CursorIsARGB) - temp |= MCURSOR_GAMMA_ENABLE; */ /* Need to set control, then address. */ OUTREG(CURSOR_A_CONTROL, temp); if (pI830->CursorIsARGB) @@ -115,8 +113,6 @@ 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. */ @@ -484,9 +480,11 @@ I830ShowCursor(ScrnInfoPtr pScrn) if (IS_MOBILE(pI830) || IS_I9XX(pI830)) { temp = INREG(CURSOR_A_CONTROL); temp &= ~(CURSOR_MODE | MCURSOR_PIPE_SELECT); - if (pI830->CursorIsARGB) - temp |= CURSOR_MODE_64_ARGB_AX /* | MCURSOR_GAMMA_ENABLE*/; - else + if (pI830->CursorIsARGB) { + temp |= CURSOR_MODE_64_ARGB_AX; + if (pI830->gammaEnabled[pI830->pipe]) + temp |= MCURSOR_GAMMA_ENABLE; + } else temp |= CURSOR_MODE_64_4C_AX; temp |= (pI830->pipe << 28); /* Connect to correct pipe */ /* Need to set mode, then address. */ @@ -508,9 +506,11 @@ I830ShowCursor(ScrnInfoPtr pScrn) temp = INREG(CURSOR_CONTROL); temp &= ~(CURSOR_FORMAT_MASK); temp |= CURSOR_ENABLE; - if (pI830->CursorIsARGB) - temp |= CURSOR_FORMAT_ARGB /* | CURSOR_GAMMA_ENABLE*/; - else + if (pI830->CursorIsARGB) { + temp |= CURSOR_FORMAT_ARGB; + if (pI830->gammaEnabled[pI830->pipe]) + temp |= CURSOR_GAMMA_ENABLE; + } else temp |= CURSOR_FORMAT_3C; OUTREG(CURSOR_CONTROL, temp); if (pI830->CursorIsARGB) |