diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2011-10-30 16:34:05 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2011-10-30 17:46:06 +0100 |
commit | e8b8adeab3b2e69a8684217271604a5f658f617d (patch) | |
tree | 63e61abb88f50e3f1349fe6faf0dffdb15110eac /src/legacy | |
parent | 4aeea489ed3189d7ebcae4199153c1ae736ebf68 (diff) |
i810: use vgahw functions instead of roll-your-own
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'src/legacy')
-rw-r--r-- | src/legacy/i810/i810_cursor.c | 19 | ||||
-rw-r--r-- | src/legacy/i810/i810_driver.c | 13 |
2 files changed, 19 insertions, 13 deletions
diff --git a/src/legacy/i810/i810_cursor.c b/src/legacy/i810/i810_cursor.c index 898a1364..88829cbd 100644 --- a/src/legacy/i810/i810_cursor.c +++ b/src/legacy/i810/i810_cursor.c @@ -239,26 +239,29 @@ I810SetCursorColors(ScrnInfoPtr pScrn, int bg, int fg) { int tmp; I810Ptr pI810 = I810PTR(pScrn); + vgaHWPtr hwp; #ifdef ARGB_CURSOR if (pI810->CursorIsARGB) return; #endif + hwp = VGAHWPTR(pScrn); + tmp = INREG8(PIXPIPE_CONFIG_0); tmp |= EXTENDED_PALETTE; OUTREG8(PIXPIPE_CONFIG_0, tmp); - pI810->writeStandard(pI810, DACMASK, 0xFF); - pI810->writeStandard(pI810, DACWX, 0x04); + hwp->writeDacMask(hwp, 0xFF); + hwp->writeDacWriteAddr(hwp, 0x04); - pI810->writeStandard(pI810, DACDATA, (bg & 0x00FF0000) >> 16); - pI810->writeStandard(pI810, DACDATA, (bg & 0x0000FF00) >> 8); - pI810->writeStandard(pI810, DACDATA, (bg & 0x000000FF)); + hwp->writeDacData(hwp, (bg & 0x00FF0000) >> 16); + hwp->writeDacData(hwp, (bg & 0x0000FF00) >> 8); + hwp->writeDacData(hwp, (bg & 0x000000FF)); - pI810->writeStandard(pI810, DACDATA, (fg & 0x00FF0000) >> 16); - pI810->writeStandard(pI810, DACDATA, (fg & 0x0000FF00) >> 8); - pI810->writeStandard(pI810, DACDATA, (fg & 0x000000FF)); + hwp->writeDacData(hwp, (fg & 0x00FF0000) >> 16); + hwp->writeDacData(hwp, (fg & 0x0000FF00) >> 8); + hwp->writeDacData(hwp, (fg & 0x000000FF)); tmp = INREG8(PIXPIPE_CONFIG_0); tmp &= ~EXTENDED_PALETTE; diff --git a/src/legacy/i810/i810_driver.c b/src/legacy/i810/i810_driver.c index 83c999f5..9509ae20 100644 --- a/src/legacy/i810/i810_driver.c +++ b/src/legacy/i810/i810_driver.c @@ -790,7 +790,7 @@ DoSave(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, I810RegPtr i810Reg, * into the fields of the vgaI810Rec structure goes here. */ i810Reg->IOControl = hwp->readCrtc(hwp, IO_CTNL); - i810Reg->AddressMapping = pI810->readControl(pI810, GRX, ADDRESS_MAPPING); + i810Reg->AddressMapping = hwp->readGr(hwp, ADDRESS_MAPPING); i810Reg->BitBLTControl = INREG8(BITBLT_CNTL); i810Reg->VideoClk2_M = INREG16(VCLK2_VCO_M); i810Reg->VideoClk2_N = INREG16(VCLK2_VCO_N); @@ -985,10 +985,10 @@ DoRestore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, I810RegPtr i810Reg, temp |= i810Reg->InterlaceControl; hwp->writeCrtc(hwp, INTERLACE_CNTL, temp); - temp = pI810->readControl(pI810, GRX, ADDRESS_MAPPING); + temp = hwp->readGr(hwp, ADDRESS_MAPPING); temp &= 0xE0; /* Save reserved bits 7:5 */ temp |= i810Reg->AddressMapping; - pI810->writeControl(pI810, GRX, ADDRESS_MAPPING, temp); + hwp->writeGr(hwp, ADDRESS_MAPPING, temp); /* Setting the OVRACT Register for video overlay */ { @@ -2061,6 +2061,7 @@ I810DisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode, I810Ptr pI810; unsigned char SEQ01 = 0; int DPMSSyncSelect = 0; + vgaHWPtr hwp; pI810 = I810PTR(pScrn); switch (PowerManagementMode) { @@ -2086,9 +2087,11 @@ I810DisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode, break; } + hwp = VGAHWPTR(pScrn); + /* Turn the screen on/off */ - SEQ01 |= pI810->readControl(pI810, SRX, 0x01) & ~0x20; - pI810->writeControl(pI810, SRX, 0x01, SEQ01); + SEQ01 |= hwp->readSeq(hwp, 0x01) & ~0x20; + hwp->writeSeq(hwp, 0x01, SEQ01); /* Set the DPMS mode */ OUTREG8(DPMS_SYNC_SELECT, DPMSSyncSelect); |