Eliminate XGI_New_SetGRCRegs. Universally use XGI_SetGRCRegs.

This commit is contained in:
Ian Romanick
2007-05-03 18:31:27 -07:00
parent 5205087bff
commit 78d6ae712a
3 changed files with 13 additions and 32 deletions

View File

@@ -476,27 +476,6 @@ XGI_New_GetOffset(VB_DEVICE_INFO *XGI_Pr,USHORT ModeNo,USHORT ModeIdIndex,
return(temp);
}
/*********************************************/
/* GRC */
/*********************************************/
static void
XGI_New_SetGRCRegs(VB_DEVICE_INFO *XGI_Pr, USHORT StandTableIndex)
{
UCHAR GRdata;
USHORT i;
for(i = 0; i <= 0x08; i++) {
GRdata = XGI_Pr->StandTable[StandTableIndex].GRC[i];
XGI_SetReg(XGI_Pr->P3ce,i,GRdata);
}
if(XGI_Pr->ModeType > ModeVGA) {
/* 256 color disable */
XGI_SetRegAND(XGI_Pr->P3ce,0x05,0xBF);
}
}
/*********************************************/
/* CLEAR EXTENDED REGISTERS */
/*********************************************/
@@ -871,7 +850,7 @@ XGI_New_SetCRT1Group(VB_DEVICE_INFO *XGI_Pr, PXGI_HW_DEVICE_INFO HwInfo,
XGI_SetMiscRegs(StandTableIndex, XGI_Pr);
XGI_SetCRTCRegs(StandTableIndex, XGI_Pr);
XGI_SetATTRegs(ModeNo, StandTableIndex, ModeIdIndex, XGI_Pr);
XGI_New_SetGRCRegs(XGI_Pr, StandTableIndex);
XGI_SetGRCRegs(StandTableIndex, XGI_Pr);
XGI_New_ClearExt1Regs(XGI_Pr, HwInfo, ModeNo);
XGI_ResetCRT1VCLK(XGI_Pr, HwInfo);

View File

@@ -135,7 +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_SetGRCRegs(USHORT StandTableIndex, PVB_DEVICE_INFO pVBInfo);
void XGI_ClearExt1Regs(PVB_DEVICE_INFO pVBInfo);
void XGI_SetSync(USHORT RefreshRateTableIndex, PVB_DEVICE_INFO pVBInfo);
@@ -783,20 +782,20 @@ XGI_SetATTRegs(unsigned ModeNo, unsigned StandTableIndex, unsigned ModeIdIndex,
/* Description : */
/* --------------------------------------------------------------------- */
void
XGI_SetGRCRegs(USHORT StandTableIndex, PVB_DEVICE_INFO pVBInfo)
XGI_SetGRCRegs(unsigned StandTableIndex, const VB_DEVICE_INFO *pVBInfo)
{
UCHAR GRdata;
USHORT i;
unsigned i;
for (i = 0; i <= 0x08; i++) {
GRdata = pVBInfo->StandTable[StandTableIndex].GRC[i]; /* Get GR from file */
XGI_SetReg((XGIIOADDRESS) pVBInfo->P3ce, i, GRdata); /* Set GR(3ce) */
for (i = 0; i <= 8; i++) {
/* Get GR from file and set GR (3ce)
*/
const unsigned GRdata = pVBInfo->StandTable[StandTableIndex].GRC[i];
XGI_SetReg((XGIIOADDRESS) pVBInfo->P3ce, i, GRdata);
}
if (pVBInfo->ModeType > ModeVGA) {
GRdata = (UCHAR) XGI_GetReg((XGIIOADDRESS) pVBInfo->P3ce, 0x05);
GRdata &= 0xBF; /* 256 color disable */
XGI_SetReg((XGIIOADDRESS) pVBInfo->P3ce, 0x05, GRdata);
/* 256 color disable */
XGI_SetRegAND((XGIIOADDRESS) pVBInfo->P3ce, 0x05, 0xBF);
}
}

View File

@@ -67,4 +67,7 @@ extern void XGI_SetCRTCRegs(unsigned StandTableIndex,
extern void XGI_SetATTRegs(unsigned ModeNo, unsigned StandTableIndex,
unsigned ModeIdIndex, const VB_DEVICE_INFO *pVBInfo);
extern void XGI_SetGRCRegs(unsigned StandTableIndex,
const VB_DEVICE_INFO *pVBInfo);
#endif