summaryrefslogtreecommitdiff
path: root/src/riva_dac.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/riva_dac.c')
-rw-r--r--src/riva_dac.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/src/riva_dac.c b/src/riva_dac.c
index 6e9f346..9b7b518 100644
--- a/src/riva_dac.c
+++ b/src/riva_dac.c
@@ -67,55 +67,55 @@ RivaDACInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
if(mode->Flags & V_INTERLACE)
vertTotal |= 1;
- pVga->CRTC[0x0] = Set8Bits(horizTotal);
- pVga->CRTC[0x1] = Set8Bits(horizDisplay);
- pVga->CRTC[0x2] = Set8Bits(horizBlankStart);
- pVga->CRTC[0x3] = SetBitField(horizBlankEnd,4:0,4:0)
- | SetBit(7);
- pVga->CRTC[0x4] = Set8Bits(horizStart);
- pVga->CRTC[0x5] = SetBitField(horizBlankEnd,5:5,7:7)
- | SetBitField(horizEnd,4:0,4:0);
- pVga->CRTC[0x6] = SetBitField(vertTotal,7:0,7:0);
- pVga->CRTC[0x7] = SetBitField(vertTotal,8:8,0:0)
- | SetBitField(vertDisplay,8:8,1:1)
- | SetBitField(vertStart,8:8,2:2)
- | SetBitField(vertBlankStart,8:8,3:3)
- | SetBit(4)
- | SetBitField(vertTotal,9:9,5:5)
- | SetBitField(vertDisplay,9:9,6:6)
- | SetBitField(vertStart,9:9,7:7);
- pVga->CRTC[0x9] = SetBitField(vertBlankStart,9:9,5:5)
- | SetBit(6)
+ pVga->CRTC[0x0] = RIVA_Set8Bits(horizTotal);
+ pVga->CRTC[0x1] = RIVA_Set8Bits(horizDisplay);
+ pVga->CRTC[0x2] = RIVA_Set8Bits(horizBlankStart);
+ pVga->CRTC[0x3] = RIVA_SetBitField(horizBlankEnd,4:0,4:0)
+ | RIVA_SetBit(7);
+ pVga->CRTC[0x4] = RIVA_Set8Bits(horizStart);
+ pVga->CRTC[0x5] = RIVA_SetBitField(horizBlankEnd,5:5,7:7)
+ | RIVA_SetBitField(horizEnd,4:0,4:0);
+ pVga->CRTC[0x6] = RIVA_SetBitField(vertTotal,7:0,7:0);
+ pVga->CRTC[0x7] = RIVA_SetBitField(vertTotal,8:8,0:0)
+ | RIVA_SetBitField(vertDisplay,8:8,1:1)
+ | RIVA_SetBitField(vertStart,8:8,2:2)
+ | RIVA_SetBitField(vertBlankStart,8:8,3:3)
+ | RIVA_SetBit(4)
+ | RIVA_SetBitField(vertTotal,9:9,5:5)
+ | RIVA_SetBitField(vertDisplay,9:9,6:6)
+ | RIVA_SetBitField(vertStart,9:9,7:7);
+ pVga->CRTC[0x9] = RIVA_SetBitField(vertBlankStart,9:9,5:5)
+ | RIVA_SetBit(6)
| ((mode->Flags & V_DBLSCAN) ? 0x80 : 0x00);
- pVga->CRTC[0x10] = Set8Bits(vertStart);
- pVga->CRTC[0x11] = SetBitField(vertEnd,3:0,3:0) | SetBit(5);
- pVga->CRTC[0x12] = Set8Bits(vertDisplay);
+ pVga->CRTC[0x10] = RIVA_Set8Bits(vertStart);
+ pVga->CRTC[0x11] = RIVA_SetBitField(vertEnd,3:0,3:0) | RIVA_SetBit(5);
+ pVga->CRTC[0x12] = RIVA_Set8Bits(vertDisplay);
pVga->CRTC[0x13] = ((pLayout->displayWidth/8)*(pLayout->bitsPerPixel/8));
- pVga->CRTC[0x15] = Set8Bits(vertBlankStart);
- pVga->CRTC[0x16] = Set8Bits(vertBlankEnd);
+ pVga->CRTC[0x15] = RIVA_Set8Bits(vertBlankStart);
+ pVga->CRTC[0x16] = RIVA_Set8Bits(vertBlankEnd);
pVga->Attribute[0x10] = 0x01;
- rivaReg->screen = SetBitField(horizBlankEnd,6:6,4:4)
- | SetBitField(vertBlankStart,10:10,3:3)
- | SetBitField(vertStart,10:10,2:2)
- | SetBitField(vertDisplay,10:10,1:1)
- | SetBitField(vertTotal,10:10,0:0);
+ rivaReg->screen = RIVA_SetBitField(horizBlankEnd,6:6,4:4)
+ | RIVA_SetBitField(vertBlankStart,10:10,3:3)
+ | RIVA_SetBitField(vertStart,10:10,2:2)
+ | RIVA_SetBitField(vertDisplay,10:10,1:1)
+ | RIVA_SetBitField(vertTotal,10:10,0:0);
- rivaReg->horiz = SetBitField(horizTotal,8:8,0:0)
- | SetBitField(horizDisplay,8:8,1:1)
- | SetBitField(horizBlankStart,8:8,2:2)
- | SetBitField(horizStart,8:8,3:3);
+ rivaReg->horiz = RIVA_SetBitField(horizTotal,8:8,0:0)
+ | RIVA_SetBitField(horizDisplay,8:8,1:1)
+ | RIVA_SetBitField(horizBlankStart,8:8,2:2)
+ | RIVA_SetBitField(horizStart,8:8,3:3);
- rivaReg->extra = SetBitField(vertTotal,11:11,0:0)
- | SetBitField(vertDisplay,11:11,2:2)
- | SetBitField(vertStart,11:11,4:4)
- | SetBitField(vertBlankStart,11:11,6:6);
+ rivaReg->extra = RIVA_SetBitField(vertTotal,11:11,0:0)
+ | RIVA_SetBitField(vertDisplay,11:11,2:2)
+ | RIVA_SetBitField(vertStart,11:11,4:4)
+ | RIVA_SetBitField(vertBlankStart,11:11,6:6);
if(mode->Flags & V_INTERLACE) {
horizTotal = (horizTotal >> 1) & ~1;
- rivaReg->interlace = Set8Bits(horizTotal);
- rivaReg->horiz |= SetBitField(horizTotal,8:8,4:4);
+ rivaReg->interlace = RIVA_Set8Bits(horizTotal);
+ rivaReg->horiz |= RIVA_SetBitField(horizTotal,8:8,4:4);
} else {
rivaReg->interlace = 0xff; /* interlace off */
}