Commit 3d05f66f authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman

staging: xgifb: delete unused "ModeNo" parameters

Delete unused "ModeNo" parameters from internal functions.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f3ac47cf
...@@ -63,8 +63,7 @@ void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo) ...@@ -63,8 +63,7 @@ void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo)
} }
static void XGI_SetSeqRegs(unsigned short ModeNo, static void XGI_SetSeqRegs(unsigned short ModeIdIndex,
unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned char SRdata, i; unsigned char SRdata, i;
...@@ -96,8 +95,7 @@ static void XGI_SetCRTCRegs(struct xgi_hw_device_info *HwDeviceExtension, ...@@ -96,8 +95,7 @@ static void XGI_SetCRTCRegs(struct xgi_hw_device_info *HwDeviceExtension,
} }
} }
static void XGI_SetATTRegs(unsigned short ModeNo, static void XGI_SetATTRegs(unsigned short ModeIdIndex,
unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned char ARdata; unsigned char ARdata;
...@@ -171,8 +169,7 @@ static unsigned char XGI_SetDefaultVCLK(struct vb_device_info *pVBInfo) ...@@ -171,8 +169,7 @@ static unsigned char XGI_SetDefaultVCLK(struct vb_device_info *pVBInfo)
return 0; return 0;
} }
static unsigned char XGI_AjustCRT2Rate(unsigned short ModeNo, static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex,
unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short *i, unsigned short RefreshRateTableIndex, unsigned short *i,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
...@@ -322,7 +319,6 @@ static void XGI_SetCRT1Timing_H(struct vb_device_info *pVBInfo, ...@@ -322,7 +319,6 @@ static void XGI_SetCRT1Timing_H(struct vb_device_info *pVBInfo,
} }
static void XGI_SetCRT1Timing_V(unsigned short ModeIdIndex, static void XGI_SetCRT1Timing_V(unsigned short ModeIdIndex,
unsigned short ModeNo,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned char data; unsigned char data;
...@@ -365,7 +361,7 @@ static void XGI_SetCRT1Timing_V(unsigned short ModeIdIndex, ...@@ -365,7 +361,7 @@ static void XGI_SetCRT1Timing_V(unsigned short ModeIdIndex,
xgifb_reg_set(pVBInfo->P3d4, 0x09, data); xgifb_reg_set(pVBInfo->P3d4, 0x09, data);
} }
static void XGI_SetCRT1CRTC(unsigned short ModeNo, unsigned short ModeIdIndex, static void XGI_SetCRT1CRTC(unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo, struct vb_device_info *pVBInfo,
struct xgi_hw_device_info *HwDeviceExtension) struct xgi_hw_device_info *HwDeviceExtension)
...@@ -391,7 +387,7 @@ static void XGI_SetCRT1CRTC(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -391,7 +387,7 @@ static void XGI_SetCRT1CRTC(unsigned short ModeNo, unsigned short ModeIdIndex,
XGI_SetCRT1Timing_H(pVBInfo, HwDeviceExtension); XGI_SetCRT1Timing_H(pVBInfo, HwDeviceExtension);
XGI_SetCRT1Timing_V(ModeIdIndex, ModeNo, pVBInfo); XGI_SetCRT1Timing_V(ModeIdIndex, pVBInfo);
if (pVBInfo->ModeType > 0x03) if (pVBInfo->ModeType > 0x03)
xgifb_reg_set(pVBInfo->P3d4, 0x14, 0x4F); xgifb_reg_set(pVBInfo->P3d4, 0x14, 0x4F);
...@@ -403,7 +399,7 @@ static void XGI_SetCRT1CRTC(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -403,7 +399,7 @@ static void XGI_SetCRT1CRTC(unsigned short ModeNo, unsigned short ModeIdIndex,
/* Output : Fill CRT Hsync/Vsync to SR2E/SR2F/SR30/SR33/SR34/SR3F */ /* Output : Fill CRT Hsync/Vsync to SR2E/SR2F/SR30/SR33/SR34/SR3F */
/* Description : Set LCD timing */ /* Description : Set LCD timing */
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
static void XGI_SetXG21CRTC(unsigned short ModeNo, unsigned short ModeIdIndex, static void XGI_SetXG21CRTC(unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
...@@ -500,8 +496,7 @@ static void XGI_SetXG21CRTC(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -500,8 +496,7 @@ static void XGI_SetXG21CRTC(unsigned short ModeNo, unsigned short ModeIdIndex,
xgifb_reg_set(pVBInfo->P3c4, 0x3F, Tempax); xgifb_reg_set(pVBInfo->P3c4, 0x3F, Tempax);
} }
static void XGI_SetXG27CRTC(unsigned short ModeNo, static void XGI_SetXG27CRTC(unsigned short ModeIdIndex,
unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
...@@ -605,8 +600,7 @@ static void XGI_SetXG27FPBits(struct vb_device_info *pVBInfo) ...@@ -605,8 +600,7 @@ static void XGI_SetXG27FPBits(struct vb_device_info *pVBInfo)
static void xgifb_set_lcd(int chip_id, static void xgifb_set_lcd(int chip_id,
struct vb_device_info *pVBInfo, struct vb_device_info *pVBInfo,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex)
unsigned short ModeNo)
{ {
unsigned short temp; unsigned short temp;
...@@ -688,7 +682,7 @@ static void XGI_UpdateXG21CRTC(unsigned short ModeNo, ...@@ -688,7 +682,7 @@ static void XGI_UpdateXG21CRTC(unsigned short ModeNo,
} }
static void XGI_SetCRT1DE(struct xgi_hw_device_info *HwDeviceExtension, static void XGI_SetCRT1DE(struct xgi_hw_device_info *HwDeviceExtension,
unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
...@@ -834,8 +828,7 @@ static void XGI_SetCRT1Offset(unsigned short ModeNo, ...@@ -834,8 +828,7 @@ static void XGI_SetCRT1Offset(unsigned short ModeNo,
xgifb_reg_set(pVBInfo->P3c4, 0x10, ah); xgifb_reg_set(pVBInfo->P3c4, 0x10, ah);
} }
static unsigned short XGI_GetVCLK2Ptr(unsigned short ModeNo, static unsigned short XGI_GetVCLK2Ptr(unsigned short ModeIdIndex,
unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct xgi_hw_device_info *HwDeviceExtension, struct xgi_hw_device_info *HwDeviceExtension,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
...@@ -886,8 +879,7 @@ static unsigned short XGI_GetVCLK2Ptr(unsigned short ModeNo, ...@@ -886,8 +879,7 @@ static unsigned short XGI_GetVCLK2Ptr(unsigned short ModeNo,
return VCLKIndex; return VCLKIndex;
} }
static void XGI_SetCRT1VCLK(unsigned short ModeNo, static void XGI_SetCRT1VCLK(unsigned short ModeIdIndex,
unsigned short ModeIdIndex,
struct xgi_hw_device_info *HwDeviceExtension, struct xgi_hw_device_info *HwDeviceExtension,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
...@@ -899,9 +891,8 @@ static void XGI_SetCRT1VCLK(unsigned short ModeNo, ...@@ -899,9 +891,8 @@ static void XGI_SetCRT1VCLK(unsigned short ModeNo,
(pVBInfo->VBType & (VB_SIS301B | VB_SIS302B | VB_SIS301LV | (pVBInfo->VBType & (VB_SIS301B | VB_SIS302B | VB_SIS301LV |
VB_SIS302LV | VB_XGI301C)) && VB_SIS302LV | VB_XGI301C)) &&
(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) { (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) {
vclkindex = XGI_GetVCLK2Ptr(ModeNo, ModeIdIndex, vclkindex = XGI_GetVCLK2Ptr(ModeIdIndex, RefreshRateTableIndex,
RefreshRateTableIndex, HwDeviceExtension, HwDeviceExtension, pVBInfo);
pVBInfo);
data = xgifb_reg_get(pVBInfo->P3c4, 0x31) & 0xCF; data = xgifb_reg_get(pVBInfo->P3c4, 0x31) & 0xCF;
xgifb_reg_set(pVBInfo->P3c4, 0x31, data); xgifb_reg_set(pVBInfo->P3c4, 0x31, data);
data = XGI_VBVCLKData[vclkindex].Part4_A; data = XGI_VBVCLKData[vclkindex].Part4_A;
...@@ -948,8 +939,7 @@ static void XGI_SetXG21FPBits(struct vb_device_info *pVBInfo) ...@@ -948,8 +939,7 @@ static void XGI_SetXG21FPBits(struct vb_device_info *pVBInfo)
} }
static void XGI_SetCRT1FIFO(unsigned short ModeNo, static void XGI_SetCRT1FIFO(struct xgi_hw_device_info *HwDeviceExtension,
struct xgi_hw_device_info *HwDeviceExtension,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned short data; unsigned short data;
...@@ -971,7 +961,7 @@ static void XGI_SetCRT1FIFO(unsigned short ModeNo, ...@@ -971,7 +961,7 @@ static void XGI_SetCRT1FIFO(unsigned short ModeNo,
} }
static void XGI_SetVCLKState(struct xgi_hw_device_info *HwDeviceExtension, static void XGI_SetVCLKState(struct xgi_hw_device_info *HwDeviceExtension,
unsigned short ModeNo, unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned short data, data2 = 0; unsigned short data, data2 = 0;
...@@ -1010,7 +1000,7 @@ static void XGI_SetVCLKState(struct xgi_hw_device_info *HwDeviceExtension, ...@@ -1010,7 +1000,7 @@ static void XGI_SetVCLKState(struct xgi_hw_device_info *HwDeviceExtension,
} }
static void XGI_SetCRT1ModeRegs(struct xgi_hw_device_info *HwDeviceExtension, static void XGI_SetCRT1ModeRegs(struct xgi_hw_device_info *HwDeviceExtension,
unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
...@@ -1063,8 +1053,7 @@ static void XGI_SetCRT1ModeRegs(struct xgi_hw_device_info *HwDeviceExtension, ...@@ -1063,8 +1053,7 @@ static void XGI_SetCRT1ModeRegs(struct xgi_hw_device_info *HwDeviceExtension,
data = data ^ 0xA0; data = data ^ 0xA0;
xgifb_reg_and_or(pVBInfo->P3c4, 0x21, 0x1F, data); xgifb_reg_and_or(pVBInfo->P3c4, 0x21, 0x1F, data);
XGI_SetVCLKState(HwDeviceExtension, ModeNo, RefreshRateTableIndex, XGI_SetVCLKState(HwDeviceExtension, RefreshRateTableIndex, pVBInfo);
pVBInfo);
data = xgifb_reg_get(pVBInfo->P3d4, 0x31); data = xgifb_reg_get(pVBInfo->P3d4, 0x31);
...@@ -1122,7 +1111,7 @@ static void XGI_WriteDAC(unsigned short dl, ...@@ -1122,7 +1111,7 @@ static void XGI_WriteDAC(unsigned short dl,
outb((unsigned short) bl, pVBInfo->P3c9); outb((unsigned short) bl, pVBInfo->P3c9);
} }
static void XGI_LoadDAC(unsigned short ModeNo, unsigned short ModeIdIndex, static void XGI_LoadDAC(unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned short data, data2, i, k, m, n, o, si, di, bx, dl, al, ah, dh; unsigned short data, data2, i, k, m, n, o, si, di, bx, dl, al, ah, dh;
...@@ -1188,8 +1177,7 @@ static void XGI_LoadDAC(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -1188,8 +1177,7 @@ static void XGI_LoadDAC(unsigned short ModeNo, unsigned short ModeIdIndex,
} }
} }
static void XGI_GetLVDSResInfo(unsigned short ModeNo, static void XGI_GetLVDSResInfo(unsigned short ModeIdIndex,
unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned short resindex, xres, yres, modeflag; unsigned short resindex, xres, yres, modeflag;
...@@ -1219,7 +1207,6 @@ static void XGI_GetLVDSResInfo(unsigned short ModeNo, ...@@ -1219,7 +1207,6 @@ static void XGI_GetLVDSResInfo(unsigned short ModeNo,
} }
static void const *XGI_GetLcdPtr(struct XGI330_LCDDataTablStruct const *table, static void const *XGI_GetLcdPtr(struct XGI330_LCDDataTablStruct const *table,
unsigned short ModeNo,
unsigned short ModeIdIndex, unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
...@@ -1259,8 +1246,7 @@ static void const *XGI_GetLcdPtr(struct XGI330_LCDDataTablStruct const *table, ...@@ -1259,8 +1246,7 @@ static void const *XGI_GetLcdPtr(struct XGI330_LCDDataTablStruct const *table,
return table[i].DATAPTR; return table[i].DATAPTR;
} }
static struct SiS_TVData const *XGI_GetTVPtr(unsigned short ModeNo, static struct SiS_TVData const *XGI_GetTVPtr(unsigned short ModeIdIndex,
unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
...@@ -1289,7 +1275,7 @@ static struct SiS_TVData const *XGI_GetTVPtr(unsigned short ModeNo, ...@@ -1289,7 +1275,7 @@ static struct SiS_TVData const *XGI_GetTVPtr(unsigned short ModeNo,
return &XGI_TVDataTable[i].DATAPTR[tempal]; return &XGI_TVDataTable[i].DATAPTR[tempal];
} }
static void XGI_GetLVDSData(unsigned short ModeNo, unsigned short ModeIdIndex, static void XGI_GetLVDSData(unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
...@@ -1298,7 +1284,7 @@ static void XGI_GetLVDSData(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -1298,7 +1284,7 @@ static void XGI_GetLVDSData(unsigned short ModeNo, unsigned short ModeIdIndex,
if (!(pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA))) if (!(pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)))
return; return;
LCDPtr = XGI_GetLcdPtr(XGI_EPLLCDDataPtr, ModeNo, ModeIdIndex, LCDPtr = XGI_GetLcdPtr(XGI_EPLLCDDataPtr, ModeIdIndex,
RefreshRateTableIndex, pVBInfo); RefreshRateTableIndex, pVBInfo);
pVBInfo->VGAHT = LCDPtr->VGAHT; pVBInfo->VGAHT = LCDPtr->VGAHT;
pVBInfo->VGAVT = LCDPtr->VGAVT; pVBInfo->VGAVT = LCDPtr->VGAVT;
...@@ -1325,7 +1311,7 @@ static void XGI_GetLVDSData(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -1325,7 +1311,7 @@ static void XGI_GetLVDSData(unsigned short ModeNo, unsigned short ModeIdIndex,
} }
} }
static void XGI_ModCRT1Regs(unsigned short ModeNo, unsigned short ModeIdIndex, static void XGI_ModCRT1Regs(unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct xgi_hw_device_info *HwDeviceExtension, struct xgi_hw_device_info *HwDeviceExtension,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
...@@ -1335,7 +1321,7 @@ static void XGI_ModCRT1Regs(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -1335,7 +1321,7 @@ static void XGI_ModCRT1Regs(unsigned short ModeNo, unsigned short ModeIdIndex,
struct XGI_LVDSCRT1VDataStruct const *LCDPtr1 = NULL; struct XGI_LVDSCRT1VDataStruct const *LCDPtr1 = NULL;
if (pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) { if (pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) {
LCDPtr = XGI_GetLcdPtr(xgifb_epllcd_crt1_h, ModeNo, ModeIdIndex, LCDPtr = XGI_GetLcdPtr(xgifb_epllcd_crt1_h, ModeIdIndex,
RefreshRateTableIndex, pVBInfo); RefreshRateTableIndex, pVBInfo);
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
...@@ -1345,14 +1331,13 @@ static void XGI_ModCRT1Regs(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -1345,14 +1331,13 @@ static void XGI_ModCRT1Regs(unsigned short ModeNo, unsigned short ModeIdIndex,
XGI_SetCRT1Timing_H(pVBInfo, HwDeviceExtension); XGI_SetCRT1Timing_H(pVBInfo, HwDeviceExtension);
if (pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) { if (pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) {
LCDPtr1 = XGI_GetLcdPtr(xgifb_epllcd_crt1_v, ModeNo, LCDPtr1 = XGI_GetLcdPtr(xgifb_epllcd_crt1_v, ModeIdIndex,
ModeIdIndex, RefreshRateTableIndex, RefreshRateTableIndex, pVBInfo);
pVBInfo);
for (i = 0; i < 7; i++) for (i = 0; i < 7; i++)
pVBInfo->TimingV.data[i] = LCDPtr1[0].Reg[i]; pVBInfo->TimingV.data[i] = LCDPtr1[0].Reg[i];
} }
XGI_SetCRT1Timing_V(ModeIdIndex, ModeNo, pVBInfo); XGI_SetCRT1Timing_V(ModeIdIndex, pVBInfo);
} }
static unsigned short XGI_GetLCDCapPtr(struct vb_device_info *pVBInfo) static unsigned short XGI_GetLCDCapPtr(struct vb_device_info *pVBInfo)
...@@ -1425,7 +1410,7 @@ static void XGI_GetLCDSync(unsigned short *HSyncWidth, ...@@ -1425,7 +1410,7 @@ static void XGI_GetLCDSync(unsigned short *HSyncWidth,
*VSyncWidth = pVBInfo->LCDCapList[Index].LCD_VSyncWidth; *VSyncWidth = pVBInfo->LCDCapList[Index].LCD_VSyncWidth;
} }
static void XGI_SetLVDSRegs(unsigned short ModeNo, unsigned short ModeIdIndex, static void XGI_SetLVDSRegs(unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
...@@ -1434,7 +1419,7 @@ static void XGI_SetLVDSRegs(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -1434,7 +1419,7 @@ static void XGI_SetLVDSRegs(unsigned short ModeNo, unsigned short ModeIdIndex,
struct XGI330_LCDDataDesStruct2 const *LCDPtr1 = NULL; struct XGI330_LCDDataDesStruct2 const *LCDPtr1 = NULL;
modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag; modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
LCDPtr1 = XGI_GetLcdPtr(XGI_EPLLCDDesDataPtr, ModeNo, ModeIdIndex, LCDPtr1 = XGI_GetLcdPtr(XGI_EPLLCDDesDataPtr, ModeIdIndex,
RefreshRateTableIndex, pVBInfo); RefreshRateTableIndex, pVBInfo);
XGI_GetLCDSync(&tempax, &tempbx, pVBInfo); XGI_GetLCDSync(&tempax, &tempbx, pVBInfo);
...@@ -1686,8 +1671,7 @@ static void XGI_GetLCDVCLKPtr(unsigned char *di_0, unsigned char *di_1, ...@@ -1686,8 +1671,7 @@ static void XGI_GetLCDVCLKPtr(unsigned char *di_0, unsigned char *di_1,
} }
static unsigned char XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex, static unsigned char XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex,
unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short ModeIdIndex, struct vb_device_info *pVBInfo)
struct vb_device_info *pVBInfo)
{ {
unsigned short index, modeflag; unsigned short index, modeflag;
...@@ -1769,15 +1753,14 @@ static void XGI_GetVCLKLen(unsigned char tempal, unsigned char *di_0, ...@@ -1769,15 +1753,14 @@ static void XGI_GetVCLKLen(unsigned char tempal, unsigned char *di_0,
} }
} }
static void XGI_SetCRT2ECLK(unsigned short ModeNo, unsigned short ModeIdIndex, static void XGI_SetCRT2ECLK(unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned char di_0, di_1, tempal; unsigned char di_0, di_1, tempal;
int i; int i;
tempal = XGI_GetVCLKPtr(RefreshRateTableIndex, ModeNo, ModeIdIndex, tempal = XGI_GetVCLKPtr(RefreshRateTableIndex, ModeIdIndex, pVBInfo);
pVBInfo);
XGI_GetVCLKLen(tempal, &di_0, &di_1, pVBInfo); XGI_GetVCLKLen(tempal, &di_0, &di_1, pVBInfo);
XGI_GetLCDVCLKPtr(&di_0, &di_1, pVBInfo); XGI_GetLCDVCLKPtr(&di_0, &di_1, pVBInfo);
...@@ -1922,7 +1905,7 @@ void XGI_GetVBType(struct vb_device_info *pVBInfo) ...@@ -1922,7 +1905,7 @@ void XGI_GetVBType(struct vb_device_info *pVBInfo)
pVBInfo->VBType = tempbx; pVBInfo->VBType = tempbx;
} }
static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex, static void XGI_GetVBInfo(unsigned short ModeIdIndex,
struct xgi_hw_device_info *HwDeviceExtension, struct xgi_hw_device_info *HwDeviceExtension,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
...@@ -2048,7 +2031,7 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2048,7 +2031,7 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
pVBInfo->VBInfo = tempbx; pVBInfo->VBInfo = tempbx;
} }
static void XGI_GetTVInfo(unsigned short ModeNo, unsigned short ModeIdIndex, static void XGI_GetTVInfo(unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned short tempbx = 0, resinfo = 0, modeflag, index1; unsigned short tempbx = 0, resinfo = 0, modeflag, index1;
...@@ -2115,8 +2098,8 @@ static void XGI_GetTVInfo(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2115,8 +2098,8 @@ static void XGI_GetTVInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
pVBInfo->TVInfo = tempbx; pVBInfo->TVInfo = tempbx;
} }
static unsigned char XGI_GetLCDInfo(unsigned short ModeNo, static unsigned char XGI_GetLCDInfo(unsigned short ModeIdIndex,
unsigned short ModeIdIndex, struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned short temp, tempax, tempbx, resinfo = 0, LCDIdIndex; unsigned short temp, tempax, tempbx, resinfo = 0, LCDIdIndex;
...@@ -2435,8 +2418,7 @@ static void XGI_SaveCRT2Info(unsigned short ModeNo, ...@@ -2435,8 +2418,7 @@ static void XGI_SaveCRT2Info(unsigned short ModeNo,
xgifb_reg_and_or(pVBInfo->P3d4, 0x31, temp2, temp1); xgifb_reg_and_or(pVBInfo->P3d4, 0x31, temp2, temp1);
} }
static void XGI_GetCRT2ResInfo(unsigned short ModeNo, static void XGI_GetCRT2ResInfo(unsigned short ModeIdIndex,
unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned short xres, yres, modeflag, resindex; unsigned short xres, yres, modeflag, resindex;
...@@ -2508,8 +2490,7 @@ static unsigned char XGI_IsLCDDualLink(struct vb_device_info *pVBInfo) ...@@ -2508,8 +2490,7 @@ static unsigned char XGI_IsLCDDualLink(struct vb_device_info *pVBInfo)
return 0; return 0;
} }
static void XGI_GetRAMDAC2DATA(unsigned short ModeNo, static void XGI_GetRAMDAC2DATA(unsigned short ModeIdIndex,
unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
...@@ -2551,7 +2532,7 @@ static void XGI_GetRAMDAC2DATA(unsigned short ModeNo, ...@@ -2551,7 +2532,7 @@ static void XGI_GetRAMDAC2DATA(unsigned short ModeNo,
pVBInfo->VT = tempbx; pVBInfo->VT = tempbx;
} }
static void XGI_GetCRT2Data(unsigned short ModeNo, unsigned short ModeIdIndex, static void XGI_GetCRT2Data(unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
...@@ -2566,13 +2547,12 @@ static void XGI_GetCRT2Data(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2566,13 +2547,12 @@ static void XGI_GetCRT2Data(unsigned short ModeNo, unsigned short ModeIdIndex,
pVBInfo->RVBHRS = 50; pVBInfo->RVBHRS = 50;
if (pVBInfo->VBInfo & SetCRT2ToRAMDAC) { if (pVBInfo->VBInfo & SetCRT2ToRAMDAC) {
XGI_GetRAMDAC2DATA(ModeNo, ModeIdIndex, RefreshRateTableIndex, XGI_GetRAMDAC2DATA(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
pVBInfo);
return; return;
} }
if (pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) { if (pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) {
LCDPtr = XGI_GetLcdPtr(XGI_LCDDataTable, ModeNo, ModeIdIndex, LCDPtr = XGI_GetLcdPtr(XGI_LCDDataTable, ModeIdIndex,
RefreshRateTableIndex, pVBInfo); RefreshRateTableIndex, pVBInfo);
pVBInfo->RVBHCMAX = LCDPtr->RVBHCMAX; pVBInfo->RVBHCMAX = LCDPtr->RVBHCMAX;
...@@ -2654,7 +2634,7 @@ static void XGI_GetCRT2Data(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2654,7 +2634,7 @@ static void XGI_GetCRT2Data(unsigned short ModeNo, unsigned short ModeIdIndex,
if (pVBInfo->VBInfo & (SetCRT2ToTV)) { if (pVBInfo->VBInfo & (SetCRT2ToTV)) {
struct SiS_TVData const *TVPtr; struct SiS_TVData const *TVPtr;
TVPtr = XGI_GetTVPtr(ModeNo, ModeIdIndex, RefreshRateTableIndex, TVPtr = XGI_GetTVPtr(ModeIdIndex, RefreshRateTableIndex,
pVBInfo); pVBInfo);
pVBInfo->RVBHCMAX = TVPtr->RVBHCMAX; pVBInfo->RVBHCMAX = TVPtr->RVBHCMAX;
...@@ -2722,14 +2702,13 @@ static void XGI_GetCRT2Data(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2722,14 +2702,13 @@ static void XGI_GetCRT2Data(unsigned short ModeNo, unsigned short ModeIdIndex,
} }
} }
static void XGI_SetCRT2VCLK(unsigned short ModeNo, unsigned short ModeIdIndex, static void XGI_SetCRT2VCLK(unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned char di_0, di_1, tempal; unsigned char di_0, di_1, tempal;
tempal = XGI_GetVCLKPtr(RefreshRateTableIndex, ModeNo, ModeIdIndex, tempal = XGI_GetVCLKPtr(RefreshRateTableIndex, ModeIdIndex, pVBInfo);
pVBInfo);
XGI_GetVCLKLen(tempal, &di_0, &di_1, pVBInfo); XGI_GetVCLKLen(tempal, &di_0, &di_1, pVBInfo);
XGI_GetLCDVCLKPtr(&di_0, &di_1, pVBInfo); XGI_GetLCDVCLKPtr(&di_0, &di_1, pVBInfo);
...@@ -2751,8 +2730,8 @@ static void XGI_SetCRT2VCLK(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2751,8 +2730,8 @@ static void XGI_SetCRT2VCLK(unsigned short ModeNo, unsigned short ModeIdIndex,
xgifb_reg_or(pVBInfo->Part4Port, 0x12, 0x08); xgifb_reg_or(pVBInfo->Part4Port, 0x12, 0x08);
} }
static unsigned short XGI_GetColorDepth(unsigned short ModeNo, static unsigned short XGI_GetColorDepth(unsigned short ModeIdIndex,
unsigned short ModeIdIndex, struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned short ColorDepth[6] = { 1, 2, 4, 4, 6, 8 }; unsigned short ColorDepth[6] = { 1, 2, 4, 4, 6, 8 };
short index; short index;
...@@ -2786,7 +2765,7 @@ static unsigned short XGI_GetOffset(unsigned short ModeNo, ...@@ -2786,7 +2765,7 @@ static unsigned short XGI_GetOffset(unsigned short ModeNo,
if (infoflag & InterlaceMode) if (infoflag & InterlaceMode)
temp = temp << 1; temp = temp << 1;
colordepth = XGI_GetColorDepth(ModeNo, ModeIdIndex, pVBInfo); colordepth = XGI_GetColorDepth(ModeIdIndex, pVBInfo);
if ((ModeNo >= 0x7C) && (ModeNo <= 0x7E)) { if ((ModeNo >= 0x7C) && (ModeNo <= 0x7E)) {
temp = ModeNo - 0x7C; temp = ModeNo - 0x7C;
...@@ -2846,7 +2825,7 @@ static void XGI_PreSetGroup1(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2846,7 +2825,7 @@ static void XGI_PreSetGroup1(unsigned short ModeNo, unsigned short ModeIdIndex,
xgifb_reg_set(pVBInfo->Part1Port, 0x02, 0x44); /* temp 0206 */ xgifb_reg_set(pVBInfo->Part1Port, 0x02, 0x44); /* temp 0206 */
} }
static void XGI_SetGroup1(unsigned short ModeNo, unsigned short ModeIdIndex, static void XGI_SetGroup1(unsigned short ModeIdIndex,
struct xgi_hw_device_info *HwDeviceExtension, struct xgi_hw_device_info *HwDeviceExtension,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
...@@ -3724,7 +3703,7 @@ static void XGI_SetGroup2(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -3724,7 +3703,7 @@ static void XGI_SetGroup2(unsigned short ModeNo, unsigned short ModeIdIndex,
} }
} }
static void XGI_SetLCDRegs(unsigned short ModeNo, unsigned short ModeIdIndex, static void XGI_SetLCDRegs(unsigned short ModeIdIndex,
struct xgi_hw_device_info *HwDeviceExtension, struct xgi_hw_device_info *HwDeviceExtension,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
...@@ -3772,12 +3751,11 @@ static void XGI_SetLCDRegs(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -3772,12 +3751,11 @@ static void XGI_SetLCDRegs(unsigned short ModeNo, unsigned short ModeIdIndex,
/* Customized LCDB Does not add */ /* Customized LCDB Does not add */
if ((pVBInfo->VBType & VB_SIS301LV) || (pVBInfo->VBType & VB_SIS302LV)) if ((pVBInfo->VBType & VB_SIS301LV) || (pVBInfo->VBType & VB_SIS302LV))
LCDBDesPtr = XGI_GetLcdPtr(xgifb_lcddldes, ModeNo, ModeIdIndex, LCDBDesPtr = XGI_GetLcdPtr(xgifb_lcddldes, ModeIdIndex,
RefreshRateTableIndex, pVBInfo); RefreshRateTableIndex, pVBInfo);
else else
LCDBDesPtr = XGI_GetLcdPtr(XGI_LCDDesDataTable, ModeNo, LCDBDesPtr = XGI_GetLcdPtr(XGI_LCDDesDataTable, ModeIdIndex,
ModeIdIndex, RefreshRateTableIndex, RefreshRateTableIndex, pVBInfo);
pVBInfo);
tempah = pVBInfo->LCDResInfo; tempah = pVBInfo->LCDResInfo;
tempah &= PanelResInfo; tempah &= PanelResInfo;
...@@ -4003,7 +3981,7 @@ static void XGI_SetTap4Regs(struct vb_device_info *pVBInfo) ...@@ -4003,7 +3981,7 @@ static void XGI_SetTap4Regs(struct vb_device_info *pVBInfo)
xgifb_reg_and_or(pVBInfo->Part2Port, 0x4E, ~0x14, 0x10); xgifb_reg_and_or(pVBInfo->Part2Port, 0x4E, ~0x14, 0x10);
} }
static void XGI_SetGroup3(unsigned short ModeNo, unsigned short ModeIdIndex, static void XGI_SetGroup3(unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned short i; unsigned short i;
...@@ -4059,7 +4037,7 @@ static void XGI_SetGroup3(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -4059,7 +4037,7 @@ static void XGI_SetGroup3(unsigned short ModeNo, unsigned short ModeIdIndex,
} }
} }
static void XGI_SetGroup4(unsigned short ModeNo, unsigned short ModeIdIndex, static void XGI_SetGroup4(unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct xgi_hw_device_info *HwDeviceExtension, struct xgi_hw_device_info *HwDeviceExtension,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
...@@ -4224,7 +4202,7 @@ static void XGI_SetGroup4(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -4224,7 +4202,7 @@ static void XGI_SetGroup4(unsigned short ModeNo, unsigned short ModeIdIndex,
} }
/* end 301b */ /* end 301b */
XGI_SetCRT2VCLK(ModeNo, ModeIdIndex, RefreshRateTableIndex, pVBInfo); XGI_SetCRT2VCLK(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
} }
static void XGINew_EnableCRT2(struct vb_device_info *pVBInfo) static void XGINew_EnableCRT2(struct vb_device_info *pVBInfo)
...@@ -4232,7 +4210,7 @@ static void XGINew_EnableCRT2(struct vb_device_info *pVBInfo) ...@@ -4232,7 +4210,7 @@ static void XGINew_EnableCRT2(struct vb_device_info *pVBInfo)
xgifb_reg_and_or(pVBInfo->P3c4, 0x1E, 0xFF, 0x20); xgifb_reg_and_or(pVBInfo->P3c4, 0x1E, 0xFF, 0x20);
} }
static void XGI_SetGroup5(unsigned short ModeNo, unsigned short ModeIdIndex, static void XGI_SetGroup5(unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
if (pVBInfo->ModeType == ModeVGA) { if (pVBInfo->ModeType == ModeVGA) {
...@@ -4281,7 +4259,7 @@ static unsigned char XGI_XG21CheckLVDSMode(struct xgifb_video_info *xgifb_info, ...@@ -4281,7 +4259,7 @@ static unsigned char XGI_XG21CheckLVDSMode(struct xgifb_video_info *xgifb_info,
if (xres != xgifb_info->lvds_data.LVDSHDE || if (xres != xgifb_info->lvds_data.LVDSHDE ||
yres != xgifb_info->lvds_data.LVDSVDE) { yres != xgifb_info->lvds_data.LVDSVDE) {
colordepth = XGI_GetColorDepth(ModeNo, ModeIdIndex, pVBInfo); colordepth = XGI_GetColorDepth(ModeIdIndex, pVBInfo);
if (colordepth > 2) if (colordepth > 2)
return 0; return 0;
} }
...@@ -4290,7 +4268,6 @@ static unsigned char XGI_XG21CheckLVDSMode(struct xgifb_video_info *xgifb_info, ...@@ -4290,7 +4268,6 @@ static unsigned char XGI_XG21CheckLVDSMode(struct xgifb_video_info *xgifb_info,
static void xgifb_set_lvds(struct xgifb_video_info *xgifb_info, static void xgifb_set_lvds(struct xgifb_video_info *xgifb_info,
int chip_id, int chip_id,
unsigned short ModeNo,
unsigned short ModeIdIndex, unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
...@@ -4831,8 +4808,7 @@ static void XGI_SetLCDCap(struct vb_device_info *pVBInfo) ...@@ -4831,8 +4808,7 @@ static void XGI_SetLCDCap(struct vb_device_info *pVBInfo)
/* Output : */ /* Output : */
/* Description : Set TV Customized Param. */ /* Description : Set TV Customized Param. */
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
static void XGI_SetAntiFlicker(unsigned short ModeNo, static void XGI_SetAntiFlicker(unsigned short ModeIdIndex,
unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned short tempbx; unsigned short tempbx;
...@@ -4850,8 +4826,7 @@ static void XGI_SetAntiFlicker(unsigned short ModeNo, ...@@ -4850,8 +4826,7 @@ static void XGI_SetAntiFlicker(unsigned short ModeNo,
xgifb_reg_and_or(pVBInfo->Part2Port, 0x0A, 0x8F, tempah); xgifb_reg_and_or(pVBInfo->Part2Port, 0x0A, 0x8F, tempah);
} }
static void XGI_SetEdgeEnhance(unsigned short ModeNo, static void XGI_SetEdgeEnhance(unsigned short ModeIdIndex,
unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned short tempbx; unsigned short tempbx;
...@@ -4887,7 +4862,7 @@ static void XGI_SetPhaseIncr(struct vb_device_info *pVBInfo) ...@@ -4887,7 +4862,7 @@ static void XGI_SetPhaseIncr(struct vb_device_info *pVBInfo)
& 0xFF000000) >> 24)); & 0xFF000000) >> 24));
} }
static void XGI_SetYFilter(unsigned short ModeNo, unsigned short ModeIdIndex, static void XGI_SetYFilter(unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned short tempbx, index; unsigned short tempbx, index;
...@@ -4957,8 +4932,7 @@ static void XGI_SetYFilter(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -4957,8 +4932,7 @@ static void XGI_SetYFilter(unsigned short ModeNo, unsigned short ModeIdIndex,
/* Output : */ /* Output : */
/* Description : Customized Param. for 301 */ /* Description : Customized Param. for 301 */
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
static void XGI_OEM310Setting(unsigned short ModeNo, static void XGI_OEM310Setting(unsigned short ModeIdIndex,
unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
XGI_SetDelayComp(pVBInfo); XGI_SetDelayComp(pVBInfo);
...@@ -4968,11 +4942,11 @@ static void XGI_OEM310Setting(unsigned short ModeNo, ...@@ -4968,11 +4942,11 @@ static void XGI_OEM310Setting(unsigned short ModeNo,
if (pVBInfo->VBInfo & SetCRT2ToTV) { if (pVBInfo->VBInfo & SetCRT2ToTV) {
XGI_SetPhaseIncr(pVBInfo); XGI_SetPhaseIncr(pVBInfo);
XGI_SetYFilter(ModeNo, ModeIdIndex, pVBInfo); XGI_SetYFilter(ModeIdIndex, pVBInfo);
XGI_SetAntiFlicker(ModeNo, ModeIdIndex, pVBInfo); XGI_SetAntiFlicker(ModeIdIndex, pVBInfo);
if (pVBInfo->VBType & VB_SIS301) if (pVBInfo->VBType & VB_SIS301)
XGI_SetEdgeEnhance(ModeNo, ModeIdIndex, pVBInfo); XGI_SetEdgeEnhance(ModeIdIndex, pVBInfo);
} }
} }
...@@ -4982,8 +4956,7 @@ static void XGI_OEM310Setting(unsigned short ModeNo, ...@@ -4982,8 +4956,7 @@ static void XGI_OEM310Setting(unsigned short ModeNo,
/* Output : */ /* Output : */
/* Description : Origin code for crt2group */ /* Description : Origin code for crt2group */
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
static void XGI_SetCRT2ModeRegs(unsigned short ModeNo, static void XGI_SetCRT2ModeRegs(struct xgi_hw_device_info *HwDeviceExtension,
struct xgi_hw_device_info *HwDeviceExtension,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned short tempbl; unsigned short tempbl;
...@@ -5231,8 +5204,8 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, ...@@ -5231,8 +5204,8 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE,
} }
i--; i--;
if ((pVBInfo->SetFlag & ProgrammingCRT2)) { if ((pVBInfo->SetFlag & ProgrammingCRT2)) {
temp = XGI_AjustCRT2Rate(ModeNo, ModeIdIndex, temp = XGI_AjustCRT2Rate(ModeIdIndex, RefreshRateTableIndex,
RefreshRateTableIndex, &i, pVBInfo); &i, pVBInfo);
} }
return RefreshRateTableIndex + i; return RefreshRateTableIndex + i;
} }
...@@ -5246,12 +5219,12 @@ static void XGI_SetLCDAGroup(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -5246,12 +5219,12 @@ static void XGI_SetLCDAGroup(unsigned short ModeNo, unsigned short ModeIdIndex,
pVBInfo->SetFlag |= ProgrammingCRT2; pVBInfo->SetFlag |= ProgrammingCRT2;
RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo, RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo,
ModeIdIndex, pVBInfo); ModeIdIndex, pVBInfo);
XGI_GetLVDSResInfo(ModeNo, ModeIdIndex, pVBInfo); XGI_GetLVDSResInfo(ModeIdIndex, pVBInfo);
XGI_GetLVDSData(ModeNo, ModeIdIndex, RefreshRateTableIndex, pVBInfo); XGI_GetLVDSData(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
XGI_ModCRT1Regs(ModeNo, ModeIdIndex, RefreshRateTableIndex, XGI_ModCRT1Regs(ModeIdIndex, RefreshRateTableIndex, HwDeviceExtension,
HwDeviceExtension, pVBInfo); pVBInfo);
XGI_SetLVDSRegs(ModeNo, ModeIdIndex, RefreshRateTableIndex, pVBInfo); XGI_SetLVDSRegs(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
XGI_SetCRT2ECLK(ModeNo, ModeIdIndex, RefreshRateTableIndex, pVBInfo); XGI_SetCRT2ECLK(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
} }
static unsigned char XGI_SetCRT2Group301(unsigned short ModeNo, static unsigned char XGI_SetCRT2Group301(unsigned short ModeNo,
...@@ -5266,24 +5239,24 @@ static unsigned char XGI_SetCRT2Group301(unsigned short ModeNo, ...@@ -5266,24 +5239,24 @@ static unsigned char XGI_SetCRT2Group301(unsigned short ModeNo,
RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo, RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo,
ModeIdIndex, pVBInfo); ModeIdIndex, pVBInfo);
XGI_SaveCRT2Info(ModeNo, pVBInfo); XGI_SaveCRT2Info(ModeNo, pVBInfo);
XGI_GetCRT2ResInfo(ModeNo, ModeIdIndex, pVBInfo); XGI_GetCRT2ResInfo(ModeIdIndex, pVBInfo);
XGI_GetCRT2Data(ModeNo, ModeIdIndex, RefreshRateTableIndex, pVBInfo); XGI_GetCRT2Data(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
XGI_PreSetGroup1(ModeNo, ModeIdIndex, HwDeviceExtension, XGI_PreSetGroup1(ModeNo, ModeIdIndex, HwDeviceExtension,
RefreshRateTableIndex, pVBInfo); RefreshRateTableIndex, pVBInfo);
XGI_SetGroup1(ModeNo, ModeIdIndex, HwDeviceExtension, XGI_SetGroup1(ModeIdIndex, HwDeviceExtension, RefreshRateTableIndex,
RefreshRateTableIndex, pVBInfo); pVBInfo);
XGI_SetLockRegs(ModeNo, ModeIdIndex, HwDeviceExtension, XGI_SetLockRegs(ModeNo, ModeIdIndex, HwDeviceExtension,
RefreshRateTableIndex, pVBInfo); RefreshRateTableIndex, pVBInfo);
XGI_SetGroup2(ModeNo, ModeIdIndex, RefreshRateTableIndex, XGI_SetGroup2(ModeNo, ModeIdIndex, RefreshRateTableIndex,
HwDeviceExtension, pVBInfo); HwDeviceExtension, pVBInfo);
XGI_SetLCDRegs(ModeNo, ModeIdIndex, HwDeviceExtension, XGI_SetLCDRegs(ModeIdIndex, HwDeviceExtension, RefreshRateTableIndex,
RefreshRateTableIndex, pVBInfo); pVBInfo);
XGI_SetTap4Regs(pVBInfo); XGI_SetTap4Regs(pVBInfo);
XGI_SetGroup3(ModeNo, ModeIdIndex, pVBInfo); XGI_SetGroup3(ModeIdIndex, pVBInfo);
XGI_SetGroup4(ModeNo, ModeIdIndex, RefreshRateTableIndex, XGI_SetGroup4(ModeIdIndex, RefreshRateTableIndex, HwDeviceExtension,
HwDeviceExtension, pVBInfo); pVBInfo);
XGI_SetCRT2VCLK(ModeNo, ModeIdIndex, RefreshRateTableIndex, pVBInfo); XGI_SetCRT2VCLK(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
XGI_SetGroup5(ModeNo, ModeIdIndex, pVBInfo); XGI_SetGroup5(ModeIdIndex, pVBInfo);
XGI_AutoThreshold(pVBInfo); XGI_AutoThreshold(pVBInfo);
return 1; return 1;
} }
...@@ -5467,10 +5440,10 @@ static void XGI_SetCRT1Group(struct xgifb_video_info *xgifb_info, ...@@ -5467,10 +5440,10 @@ static void XGI_SetCRT1Group(struct xgifb_video_info *xgifb_info,
{ {
unsigned short RefreshRateTableIndex, temp; unsigned short RefreshRateTableIndex, temp;
XGI_SetSeqRegs(ModeNo, ModeIdIndex, pVBInfo); XGI_SetSeqRegs(ModeIdIndex, pVBInfo);
outb(XGI330_StandTable.MISC, pVBInfo->P3c2); outb(XGI330_StandTable.MISC, pVBInfo->P3c2);
XGI_SetCRTCRegs(HwDeviceExtension, pVBInfo); XGI_SetCRTCRegs(HwDeviceExtension, pVBInfo);
XGI_SetATTRegs(ModeNo, ModeIdIndex, pVBInfo); XGI_SetATTRegs(ModeIdIndex, pVBInfo);
XGI_SetGRCRegs(pVBInfo); XGI_SetGRCRegs(pVBInfo);
XGI_ClearExt1Regs(pVBInfo); XGI_ClearExt1Regs(pVBInfo);
...@@ -5495,13 +5468,13 @@ static void XGI_SetCRT1Group(struct xgifb_video_info *xgifb_info, ...@@ -5495,13 +5468,13 @@ static void XGI_SetCRT1Group(struct xgifb_video_info *xgifb_info,
ModeIdIndex, pVBInfo); ModeIdIndex, pVBInfo);
if (RefreshRateTableIndex != 0xFFFF) { if (RefreshRateTableIndex != 0xFFFF) {
XGI_SetSync(RefreshRateTableIndex, pVBInfo); XGI_SetSync(RefreshRateTableIndex, pVBInfo);
XGI_SetCRT1CRTC(ModeNo, ModeIdIndex, RefreshRateTableIndex, XGI_SetCRT1CRTC(ModeIdIndex, RefreshRateTableIndex,
pVBInfo, HwDeviceExtension); pVBInfo, HwDeviceExtension);
XGI_SetCRT1DE(HwDeviceExtension, ModeNo, ModeIdIndex, XGI_SetCRT1DE(HwDeviceExtension, ModeIdIndex,
RefreshRateTableIndex, pVBInfo); RefreshRateTableIndex, pVBInfo);
XGI_SetCRT1Offset(ModeNo, ModeIdIndex, RefreshRateTableIndex, XGI_SetCRT1Offset(ModeNo, ModeIdIndex, RefreshRateTableIndex,
HwDeviceExtension, pVBInfo); HwDeviceExtension, pVBInfo);
XGI_SetCRT1VCLK(ModeNo, ModeIdIndex, HwDeviceExtension, XGI_SetCRT1VCLK(ModeIdIndex, HwDeviceExtension,
RefreshRateTableIndex, pVBInfo); RefreshRateTableIndex, pVBInfo);
} }
...@@ -5510,30 +5483,30 @@ static void XGI_SetCRT1Group(struct xgifb_video_info *xgifb_info, ...@@ -5510,30 +5483,30 @@ static void XGI_SetCRT1Group(struct xgifb_video_info *xgifb_info,
if (temp & 0xA0) { if (temp & 0xA0) {
if (HwDeviceExtension->jChipType == XG27) if (HwDeviceExtension->jChipType == XG27)
XGI_SetXG27CRTC(ModeNo, ModeIdIndex, XGI_SetXG27CRTC(ModeIdIndex,
RefreshRateTableIndex, pVBInfo); RefreshRateTableIndex, pVBInfo);
else else
XGI_SetXG21CRTC(ModeNo, ModeIdIndex, XGI_SetXG21CRTC(ModeIdIndex,
RefreshRateTableIndex, pVBInfo); RefreshRateTableIndex, pVBInfo);
XGI_UpdateXG21CRTC(ModeNo, pVBInfo, XGI_UpdateXG21CRTC(ModeNo, pVBInfo,
RefreshRateTableIndex); RefreshRateTableIndex);
xgifb_set_lcd(HwDeviceExtension->jChipType, xgifb_set_lcd(HwDeviceExtension->jChipType,
pVBInfo, RefreshRateTableIndex, ModeNo); pVBInfo, RefreshRateTableIndex);
if (pVBInfo->IF_DEF_LVDS == 1) if (pVBInfo->IF_DEF_LVDS == 1)
xgifb_set_lvds(xgifb_info, xgifb_set_lvds(xgifb_info,
HwDeviceExtension->jChipType, HwDeviceExtension->jChipType,
ModeNo, ModeIdIndex, pVBInfo); ModeIdIndex, pVBInfo);
} }
} }
pVBInfo->SetFlag &= (~ProgrammingCRT2); pVBInfo->SetFlag &= (~ProgrammingCRT2);
XGI_SetCRT1FIFO(ModeNo, HwDeviceExtension, pVBInfo); XGI_SetCRT1FIFO(HwDeviceExtension, pVBInfo);
XGI_SetCRT1ModeRegs(HwDeviceExtension, ModeNo, ModeIdIndex, XGI_SetCRT1ModeRegs(HwDeviceExtension, ModeIdIndex,
RefreshRateTableIndex, pVBInfo); RefreshRateTableIndex, pVBInfo);
XGI_LoadDAC(ModeNo, ModeIdIndex, pVBInfo); XGI_LoadDAC(ModeIdIndex, pVBInfo);
} }
unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
...@@ -5573,9 +5546,9 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, ...@@ -5573,9 +5546,9 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
XGI_SearchModeID(ModeNo, &ModeIdIndex, pVBInfo); XGI_SearchModeID(ModeNo, &ModeIdIndex, pVBInfo);
if (HwDeviceExtension->jChipType < XG20) { if (HwDeviceExtension->jChipType < XG20) {
XGI_GetVBInfo(ModeNo, ModeIdIndex, HwDeviceExtension, pVBInfo); XGI_GetVBInfo(ModeIdIndex, HwDeviceExtension, pVBInfo);
XGI_GetTVInfo(ModeNo, ModeIdIndex, pVBInfo); XGI_GetTVInfo(ModeIdIndex, pVBInfo);
XGI_GetLCDInfo(ModeNo, ModeIdIndex, pVBInfo); XGI_GetLCDInfo(ModeIdIndex, pVBInfo);
XGI_DisableBridge(xgifb_info, HwDeviceExtension, pVBInfo); XGI_DisableBridge(xgifb_info, HwDeviceExtension, pVBInfo);
if (pVBInfo->VBInfo & (SetSimuScanMode | XGI_SetCRT2ToLCDA) || if (pVBInfo->VBInfo & (SetSimuScanMode | XGI_SetCRT2ToLCDA) ||
...@@ -5602,8 +5575,8 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, ...@@ -5602,8 +5575,8 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
} }
} }
XGI_SetCRT2ModeRegs(ModeNo, HwDeviceExtension, pVBInfo); XGI_SetCRT2ModeRegs(HwDeviceExtension, pVBInfo);
XGI_OEM310Setting(ModeNo, ModeIdIndex, pVBInfo); /*0212*/ XGI_OEM310Setting(ModeIdIndex, pVBInfo); /*0212*/
XGI_EnableBridge(xgifb_info, HwDeviceExtension, pVBInfo); XGI_EnableBridge(xgifb_info, HwDeviceExtension, pVBInfo);
} /* !XG20 */ } /* !XG20 */
else { else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment