diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-11-11 15:06:15 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-11-11 15:06:15 -0200 |
commit | caac648932df69419b8f86c5793a6b33f5997099 (patch) | |
tree | a6d5f4e934e1c8dc9319edf4802813d47a7d29fc /src/smi_driver.c | |
parent | 61dd360a30c8e530185bc71b134c287ab1cdde2c (diff) |
Implement an argb cursor using the alpha layer.
The code is <hash>ifdef'ed out by <hash>if SMI_CURSOR_ALPHA_PLANE
because the smi 502 hardware is buggy, but it appears to have worked
for some older hardware revisions (by looking at code available at
ftp.siliconmotion.com.tw).
Keeping it at least for now, as it serves as a simple way to reproduce
the problems described in smi.h.
Diffstat (limited to 'src/smi_driver.c')
-rw-r--r-- | src/smi_driver.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/smi_driver.c b/src/smi_driver.c index f9a3258..d4a7afd 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -1487,10 +1487,16 @@ SMI_MapMem(ScrnInfoPtr pScrn) "Logical frame buffer at %p - %p\n", pSmi->FBBase, pSmi->FBBase + pSmi->videoRAMBytes - 1); - if (IS_MSOC(pSmi)) + if (IS_MSOC(pSmi)) { /* Reserve space for panel cursr, and crt if in dual head mode */ +#if SMI_CURSOR_ALPHA_PLANE + pSmi->FBReserved = pSmi->FBCursorOffset = pSmi->videoRAMBytes - + (pSmi->Dualhead ? SMI501_CURSOR_SIZE << 1 : SMI501_ARGB_CURSOR_SIZE); +#else pSmi->FBReserved = pSmi->FBCursorOffset = pSmi->videoRAMBytes - (pSmi->Dualhead ? SMI501_CURSOR_SIZE << 1 : SMI501_CURSOR_SIZE); +#endif + } else { /* Set up offset to hwcursor memory area, at the end of * the frame buffer. @@ -1730,6 +1736,10 @@ SMI_ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) size = SMI501_MAX_CURSOR; flags = (HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1 | HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK); +#if SMI_CURSOR_ALPHA_PLANE + if (!pSmi->Dualhead) + flags |= HARDWARE_CURSOR_ARGB; +#endif } else { size = SMILYNX_MAX_CURSOR; |