diff options
author | Alex Deucher <agd5f@yahoo.com> | 2004-11-23 05:21:02 +0000 |
---|---|---|
committer | Alex Deucher <agd5f@yahoo.com> | 2004-11-23 05:21:02 +0000 |
commit | 2cc15aba0bbb540f5562f04a0d39af1dd8dc7ce8 (patch) | |
tree | 2e8a1e72d024201ef2d98d9c5132255a570afbc3 /src/savage_driver.c | |
parent | d6e5b4641667f438cc4513aa01342c2835f18070 (diff) |
- fix and enable HW Cursor on crtc2xprint_packagertest_20041125_basexprint_packagertest_20041125
- enable independant CLUT access
Diffstat (limited to 'src/savage_driver.c')
-rw-r--r-- | src/savage_driver.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/src/savage_driver.c b/src/savage_driver.c index cdcd097..a76bb26 100644 --- a/src/savage_driver.c +++ b/src/savage_driver.c @@ -1419,12 +1419,6 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags) psav->HasCRTC2 = FALSE; } - /* until I figure out why cursor2 doesn't work, disable it for crtc2. -- AGD */ - if (psav->IsSecondary) { - psav->hwcursor = FALSE; - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "HWCursor currently disabled for crtc2.\n"); - } - if ((psav->IsSecondary || psav->IsPrimary) && !psav->UseBIOS) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "BIOS currently required for Dualhead mode setting.\n"); @@ -1806,8 +1800,8 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags) i = xf86ValidateModes(pScrn, pScrn->monitor->Modes, pScrn->display->modes, clockRanges, NULL, - 256, 4095, 16 * pScrn->bitsPerPixel, - 128, 4095, + 256, 2048, 16 * pScrn->bitsPerPixel, + 128, 2048, pScrn->virtualX, pScrn->virtualY, psav->videoRambytes, LOOKUP_BEST_REFRESH); @@ -3767,6 +3761,18 @@ void SavageLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indicies, SavagePtr psav = SAVPTR(pScrn); int i, index; int updateKey = -1; + unsigned char byte; + + /* choose CLUT */ + if (psav->IsPrimary) { + VGAOUT8(0x3c4, 0x47); + byte = VGAIN8(0x3c5); + VGAOUT8(0x3c5, (byte & ~0x03) | 0x01); /* CLUT 1 */ + } else if (psav->IsSecondary) { + VGAOUT8(0x3c4, 0x47); + byte = VGAIN8(0x3c5); + VGAOUT8(0x3c5, (byte & ~0x03) | 0x02); /* CLUT 2 */ + } for (i=0; i<numColors; i++) { index = indicies[i]; @@ -3776,6 +3782,13 @@ void SavageLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indicies, VGAOUT8(0x3c9, colors[index].green); VGAOUT8(0x3c9, colors[index].blue); } + + /* restore saved CLUT index value */ + if (psav->IsPrimary || psav->IsSecondary) { + VGAOUT8(0x3c4, 0x47); + VGAOUT8(0x3c5, byte); + } + if (updateKey != -1) SavageUpdateKey(pScrn, colors[updateKey].red, colors[updateKey].green, colors[updateKey].blue); |