Eliminiate XGI_New_SetSeqRegs. Universally use XGI_SetSeqRegs instead.

This commit is contained in:
Ian Romanick
2007-05-03 18:08:27 -07:00
parent 7ea1b566ba
commit dfbc3120d1
3 changed files with 18 additions and 59 deletions

View File

@@ -476,42 +476,6 @@ XGI_New_GetOffset(VB_DEVICE_INFO *XGI_Pr,USHORT ModeNo,USHORT ModeIdIndex,
return(temp);
}
/*********************************************/
/* SEQ */
/*********************************************/
static void
XGI_New_SetSeqRegs(VB_DEVICE_INFO *XGI_Pr, USHORT StandTableIndex, PXGI_HW_DEVICE_INFO HwInfo)
{
UCHAR SRdata;
USHORT i;
XGI_SetReg(XGI_Pr->P3c4,0x00,0x03); /* Set SR0 */
SRdata = XGI_Pr->StandTable[StandTableIndex].SR[0];
if(XGI_Pr->VBType & VB_XGI301BLV302BLV) {
if(XGI_Pr->VBInfo & SetCRT2ToLCDA) {
SRdata |= 0x01;
}
if(XGI_Pr->VBInfo & (SetCRT2ToLCD | SetCRT2ToTV)) {
if(XGI_Pr->VBInfo & SetInSlaveMode) {
SRdata |= 0x01; /* 8 dot clock */
}
}
}
SRdata |= 0x20; /* screen off */
XGI_SetReg(XGI_Pr->P3c4,0x01,SRdata);
for(i = 2; i <= 4; i++) {
SRdata = XGI_Pr->StandTable[StandTableIndex].SR[i-1];
XGI_SetReg(XGI_Pr->P3c4,i,SRdata);
}
}
/*********************************************/
/* MISC */
/*********************************************/
@@ -972,7 +936,7 @@ XGI_New_SetCRT1Group(VB_DEVICE_INFO *XGI_Pr, PXGI_HW_DEVICE_INFO HwInfo,
}
}
*/
XGI_New_SetSeqRegs(XGI_Pr, StandTableIndex, HwInfo);
XGI_SetSeqRegs(StandTableIndex, XGI_Pr);
XGI_New_SetMiscRegs(XGI_Pr, StandTableIndex, HwInfo);
XGI_New_SetCRTCRegs(XGI_Pr, HwInfo, StandTableIndex);
XGI_New_SetATTRegs(XGI_Pr, StandTableIndex, HwInfo);

View File

@@ -135,8 +135,6 @@ void XGI_SetCRT1Group(PXGI_HW_DEVICE_INFO HwDeviceExtension, USHORT ModeNo,
USHORT ModeIdIndex, PVB_DEVICE_INFO pVBInfo);
static void XGI_WaitDisplay(PVB_DEVICE_INFO pVBInfo);
void XGI_SenseCRT1(PVB_DEVICE_INFO pVBInfo);
void XGI_SetSeqRegs(USHORT ModeNo, USHORT StandTableIndex, USHORT ModeIdIndex,
PVB_DEVICE_INFO pVBInfo);
void XGI_SetMiscRegs(USHORT StandTableIndex, PVB_DEVICE_INFO pVBInfo);
void XGI_SetCRTCRegs(PXGI_HW_DEVICE_INFO HwDeviceExtension,
USHORT StandTableIndex, PVB_DEVICE_INFO pVBInfo);
@@ -581,7 +579,7 @@ XGI_SetCRT1Group(PXGI_HW_DEVICE_INFO HwDeviceExtension, USHORT ModeNo,
#endif
/* XGINew_CRT1Mode = ModeNo ; // SaveModeID */
XGI_SetSeqRegs(ModeNo, StandTableIndex, ModeIdIndex, pVBInfo);
XGI_SetSeqRegs(StandTableIndex, pVBInfo);
XGI_SetMiscRegs(StandTableIndex, pVBInfo);
XGI_SetCRTCRegs(HwDeviceExtension, StandTableIndex, pVBInfo);
XGI_SetATTRegs(ModeNo, StandTableIndex, ModeIdIndex, pVBInfo);
@@ -653,38 +651,32 @@ XGI_SetCRT1Group(PXGI_HW_DEVICE_INFO HwDeviceExtension, USHORT ModeNo,
/* Description : */
/* --------------------------------------------------------------------- */
void
XGI_SetSeqRegs(USHORT ModeNo, USHORT StandTableIndex, USHORT ModeIdIndex,
PVB_DEVICE_INFO pVBInfo)
XGI_SetSeqRegs(USHORT StandTableIndex, const VB_DEVICE_INFO *pVBInfo)
{
UCHAR tempah, SRdata;
USHORT i, modeflag;
if (ModeNo <= 0x13)
modeflag = pVBInfo->SModeIDTable[ModeIdIndex].St_ModeFlag;
else
modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
unsigned SRdata;
unsigned i;
XGI_SetReg((XGIIOADDRESS) pVBInfo->P3c4, 0x00, 0x03); /* Set SR0 */
tempah = pVBInfo->StandTable[StandTableIndex].SR[0];
SRdata = pVBInfo->StandTable[StandTableIndex].SR[0];
i = SetCRT2ToLCDA;
if (pVBInfo->VBInfo & SetCRT2ToLCDA) {
tempah |= 0x01;
SRdata |= 0x01;
}
else {
if (pVBInfo->VBInfo & (SetCRT2ToTV | SetCRT2ToLCD)) {
if (pVBInfo->VBInfo & SetInSlaveMode)
tempah |= 0x01;
SRdata |= 0x01;
}
}
tempah |= 0x20; /* screen off */
XGI_SetReg((XGIIOADDRESS) pVBInfo->P3c4, 0x01, tempah); /* Set SR1 */
SRdata |= 0x20; /* screen off */
XGI_SetReg((XGIIOADDRESS) pVBInfo->P3c4, 0x01, SRdata); /* Set SR1 */
for (i = 02; i <= 04; i++) {
SRdata = pVBInfo->StandTable[StandTableIndex].SR[i - 1]; /* Get SR2,3,4 from file */
XGI_SetReg((XGIIOADDRESS) pVBInfo->P3c4, i, SRdata); /* Set SR2 3 4 */
/* Get SR2, SR3, and SR4 from table and set in hardware.
*/
for (i = 2; i <= 4; i++) {
SRdata = pVBInfo->StandTable[StandTableIndex].SR[i - 1];
XGI_SetReg((XGIIOADDRESS) pVBInfo->P3c4, i, SRdata);
}
}

View File

@@ -56,4 +56,7 @@ extern USHORT XGI_GetRatePtrCRT2( USHORT ModeNo,USHORT ModeIdIndex, PVB_DEVI
extern USHORT XGI_GetColorDepth(USHORT ModeNo, USHORT ModeIdIndex,
const VB_DEVICE_INFO *pVBInfo);
extern void XGI_SetSeqRegs(USHORT StandTableIndex,
const VB_DEVICE_INFO *pVBInfo);
#endif