summaryrefslogtreecommitdiff
path: root/drivers/staging/xgifb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/xgifb')
-rw-r--r--drivers/staging/xgifb/TODO2
-rw-r--r--drivers/staging/xgifb/XGI_main_26.c60
-rw-r--r--drivers/staging/xgifb/vb_def.h9
-rw-r--r--drivers/staging/xgifb/vb_init.c47
-rw-r--r--drivers/staging/xgifb/vb_init.h1
-rw-r--r--drivers/staging/xgifb/vb_setmode.c898
-rw-r--r--drivers/staging/xgifb/vb_struct.h36
-rw-r--r--drivers/staging/xgifb/vb_table.h504
8 files changed, 572 insertions, 985 deletions
diff --git a/drivers/staging/xgifb/TODO b/drivers/staging/xgifb/TODO
index 13d9bc2..392b29d 100644
--- a/drivers/staging/xgifb/TODO
+++ b/drivers/staging/xgifb/TODO
@@ -1,4 +1,4 @@
-This drivers still need a lot of work. I can list all cleanups to do but it's
+This drivers still needs a lot of work. I can list all cleanups to do but it's
going to be long. So, I'm writing "cleanups" and not the list.
Arnaud
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index f775c54..e0f745d 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -73,9 +73,9 @@ static int XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr,
RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo,
ModeIdIndex, XGI_Pr);
- ClockIndex = XGI_Pr->RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
+ ClockIndex = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
- Clock = XGI_Pr->VCLKData[ClockIndex].CLOCK * 1000;
+ Clock = XGI_VCLKData[ClockIndex].CLOCK * 1000;
return Clock;
}
@@ -101,35 +101,35 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
return 0;
RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo,
ModeIdIndex, XGI_Pr);
- index = XGI_Pr->RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
+ index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
- sr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[5];
+ sr_data = XGI_CRT1Table[index].CR[5];
- cr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[0];
+ cr_data = XGI_CRT1Table[index].CR[0];
/* Horizontal total */
HT = (cr_data & 0xff) | ((unsigned short) (sr_data & 0x03) << 8);
A = HT + 5;
- HDE = (XGI_Pr->RefIndex[RefreshRateTableIndex].XRes >> 3) - 1;
+ HDE = (XGI330_RefIndex[RefreshRateTableIndex].XRes >> 3) - 1;
E = HDE + 1;
- cr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[3];
+ cr_data = XGI_CRT1Table[index].CR[3];
/* Horizontal retrace (=sync) start */
HRS = (cr_data & 0xff) | ((unsigned short) (sr_data & 0xC0) << 2);
F = HRS - E - 3;
- cr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[1];
+ cr_data = XGI_CRT1Table[index].CR[1];
/* Horizontal blank start */
HBS = (cr_data & 0xff) | ((unsigned short) (sr_data & 0x30) << 4);
- sr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[6];
+ sr_data = XGI_CRT1Table[index].CR[6];
- cr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[2];
+ cr_data = XGI_CRT1Table[index].CR[2];
- cr_data2 = XGI_Pr->XGINEWUB_CRT1Table[index].CR[4];
+ cr_data2 = XGI_CRT1Table[index].CR[4];
/* Horizontal blank end */
HBE = (cr_data & 0x1f) | ((unsigned short) (cr_data2 & 0x80) >> 2)
@@ -150,11 +150,11 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
*right_margin = F * 8;
*hsync_len = C * 8;
- sr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[14];
+ sr_data = XGI_CRT1Table[index].CR[14];
- cr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[8];
+ cr_data = XGI_CRT1Table[index].CR[8];
- cr_data2 = XGI_Pr->XGINEWUB_CRT1Table[index].CR[9];
+ cr_data2 = XGI_CRT1Table[index].CR[9];
/* Vertical total */
VT = (cr_data & 0xFF) | ((unsigned short) (cr_data2 & 0x01) << 8)
@@ -162,10 +162,10 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
| ((unsigned short) (sr_data & 0x01) << 10);
A = VT + 2;
- VDE = XGI_Pr->RefIndex[RefreshRateTableIndex].YRes - 1;
+ VDE = XGI330_RefIndex[RefreshRateTableIndex].YRes - 1;
E = VDE + 1;
- cr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[10];
+ cr_data = XGI_CRT1Table[index].CR[10];
/* Vertical retrace (=sync) start */
VRS = (cr_data & 0xff) | ((unsigned short) (cr_data2 & 0x04) << 6)
@@ -173,23 +173,23 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
| ((unsigned short) (sr_data & 0x08) << 7);
F = VRS + 1 - E;
- cr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[12];
+ cr_data = XGI_CRT1Table[index].CR[12];
- cr_data3 = (XGI_Pr->XGINEWUB_CRT1Table[index].CR[14] & 0x80) << 5;
+ cr_data3 = (XGI_CRT1Table[index].CR[14] & 0x80) << 5;
/* Vertical blank start */
VBS = (cr_data & 0xff) | ((unsigned short) (cr_data2 & 0x08) << 5)
| ((unsigned short) (cr_data3 & 0x20) << 4)
| ((unsigned short) (sr_data & 0x04) << 8);
- cr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[13];
+ cr_data = XGI_CRT1Table[index].CR[13];
/* Vertical blank end */
VBE = (cr_data & 0xff) | ((unsigned short) (sr_data & 0x10) << 4);
temp = VBE - ((E - 1) & 511);
B = (temp > 0) ? temp : (temp + 512);
- cr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[11];
+ cr_data = XGI_CRT1Table[index].CR[11];
/* Vertical retrace (=sync) end */
VRE = (cr_data & 0x0f) | ((sr_data & 0x20) >> 1);
@@ -202,25 +202,25 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
*lower_margin = F;
*vsync_len = C;
- if (XGI_Pr->RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x8000)
+ if (XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x8000)
*sync &= ~FB_SYNC_VERT_HIGH_ACT;
else
*sync |= FB_SYNC_VERT_HIGH_ACT;
- if (XGI_Pr->RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x4000)
+ if (XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x4000)
*sync &= ~FB_SYNC_HOR_HIGH_ACT;
else
*sync |= FB_SYNC_HOR_HIGH_ACT;
*vmode = FB_VMODE_NONINTERLACED;
- if (XGI_Pr->RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x0080)
+ if (XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x0080)
*vmode = FB_VMODE_INTERLACED;
else {
j = 0;
- while (XGI_Pr->EModeIDTable[j].Ext_ModeID != 0xff) {
- if (XGI_Pr->EModeIDTable[j].Ext_ModeID ==
- XGI_Pr->RefIndex[RefreshRateTableIndex].ModeID) {
- if (XGI_Pr->EModeIDTable[j].Ext_ModeFlag &
+ while (XGI330_EModeIDTable[j].Ext_ModeID != 0xff) {
+ if (XGI330_EModeIDTable[j].Ext_ModeID ==
+ XGI330_RefIndex[RefreshRateTableIndex].ModeID) {
+ if (XGI330_EModeIDTable[j].Ext_ModeFlag &
DoubleScanMode) {
*vmode = FB_VMODE_DOUBLE;
}
@@ -1695,7 +1695,7 @@ static int __init XGIfb_setup(char *options)
return 0;
}
-static int __devinit xgifb_probe(struct pci_dev *pdev,
+static int xgifb_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
u8 reg, reg1;
@@ -2103,7 +2103,7 @@ error:
/* PCI DEVICE HANDLING */
/*****************************************************/
-static void __devexit xgifb_remove(struct pci_dev *pdev)
+static void xgifb_remove(struct pci_dev *pdev)
{
struct xgifb_video_info *xgifb_info = pci_get_drvdata(pdev);
struct fb_info *fb_info = xgifb_info->fb_info;
@@ -2127,7 +2127,7 @@ static struct pci_driver xgifb_driver = {
.name = "xgifb",
.id_table = xgifb_pci_table,
.probe = xgifb_probe,
- .remove = __devexit_p(xgifb_remove)
+ .remove = xgifb_remove
};
diff --git a/drivers/staging/xgifb/vb_def.h b/drivers/staging/xgifb/vb_def.h
index 77137e4..148f637 100644
--- a/drivers/staging/xgifb/vb_def.h
+++ b/drivers/staging/xgifb/vb_def.h
@@ -254,9 +254,16 @@
#define XGI330_SR1F 0
#define XGI330_SR23 0xf6
#define XGI330_SR24 0x0d
-#define XGI330_SR25 0
#define XGI330_SR31 0xc0
#define XGI330_SR32 0x11
#define XGI330_SR33 0
+extern const struct XGI_ExtStruct XGI330_EModeIDTable[];
+extern const struct XGI_Ext2Struct XGI330_RefIndex[];
+extern const struct XGI_CRT1TableStruct XGI_CRT1Table[];
+extern const struct XGI_ECLKDataStruct XGI340_ECLKData[];
+extern const struct SiS_VCLKData XGI_VCLKData[];
+extern const unsigned char XGI340_CR6B[][4];
+extern const unsigned char XGI340_AGPReg[];
+
#endif
diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c
index 7739dbd..2b791c1 100644
--- a/drivers/staging/xgifb/vb_init.c
+++ b/drivers/staging/xgifb/vb_init.c
@@ -94,8 +94,8 @@ static void XGINew_DDR1x_MRS_340(unsigned long P3c4,
0x18,
pVBInfo->SR15[2][pVBInfo->ram_type]); /* SR18 */
xgifb_reg_set(P3c4, 0x19, 0x01);
- xgifb_reg_set(P3c4, 0x16, pVBInfo->SR16[0]);
- xgifb_reg_set(P3c4, 0x16, pVBInfo->SR16[1]);
+ xgifb_reg_set(P3c4, 0x16, 0x03);
+ xgifb_reg_set(P3c4, 0x16, 0x83);
mdelay(1);
xgifb_reg_set(P3c4, 0x1B, 0x03);
udelay(500);
@@ -103,8 +103,8 @@ static void XGINew_DDR1x_MRS_340(unsigned long P3c4,
0x18,
pVBInfo->SR15[2][pVBInfo->ram_type]); /* SR18 */
xgifb_reg_set(P3c4, 0x19, 0x00);
- xgifb_reg_set(P3c4, 0x16, pVBInfo->SR16[2]);
- xgifb_reg_set(P3c4, 0x16, pVBInfo->SR16[3]);
+ xgifb_reg_set(P3c4, 0x16, 0x03);
+ xgifb_reg_set(P3c4, 0x16, 0x83);
xgifb_reg_set(P3c4, 0x1B, 0x00);
}
@@ -124,13 +124,13 @@ static void XGINew_SetMemoryClock(struct xgi_hw_device_info *HwDeviceExtension,
xgifb_reg_set(pVBInfo->P3c4,
0x2E,
- pVBInfo->ECLKData[pVBInfo->ram_type].SR2E);
+ XGI340_ECLKData[pVBInfo->ram_type].SR2E);
xgifb_reg_set(pVBInfo->P3c4,
0x2F,
- pVBInfo->ECLKData[pVBInfo->ram_type].SR2F);
+ XGI340_ECLKData[pVBInfo->ram_type].SR2F);
xgifb_reg_set(pVBInfo->P3c4,
0x30,
- pVBInfo->ECLKData[pVBInfo->ram_type].SR30);
+ XGI340_ECLKData[pVBInfo->ram_type].SR30);
/* When XG42 ECLK = MCLK = 207MHz, Set SR32 D[1:0] = 10b */
/* Modify SR32 value, when MCLK=207MHZ, ELCK=250MHz,
@@ -138,10 +138,10 @@ static void XGINew_SetMemoryClock(struct xgi_hw_device_info *HwDeviceExtension,
if (HwDeviceExtension->jChipType == XG42) {
if ((pVBInfo->MCLKData[pVBInfo->ram_type].SR28 == 0x1C) &&
(pVBInfo->MCLKData[pVBInfo->ram_type].SR29 == 0x01) &&
- (((pVBInfo->ECLKData[pVBInfo->ram_type].SR2E == 0x1C) &&
- (pVBInfo->ECLKData[pVBInfo->ram_type].SR2F == 0x01)) ||
- ((pVBInfo->ECLKData[pVBInfo->ram_type].SR2E == 0x22) &&
- (pVBInfo->ECLKData[pVBInfo->ram_type].SR2F == 0x01))))
+ (((XGI340_ECLKData[pVBInfo->ram_type].SR2E == 0x1C) &&
+ (XGI340_ECLKData[pVBInfo->ram_type].SR2F == 0x01)) ||
+ ((XGI340_ECLKData[pVBInfo->ram_type].SR2E == 0x22) &&
+ (XGI340_ECLKData[pVBInfo->ram_type].SR2F == 0x01))))
xgifb_reg_set(pVBInfo->P3c4,
0x32,
((unsigned char) xgifb_reg_get(
@@ -429,7 +429,7 @@ static void XGINew_SetDRAMDefaultRegister340(
temp2 = 0;
for (i = 0; i < 4; i++) {
/* CR6B DQS fine tune delay */
- temp = pVBInfo->CR6B[pVBInfo->ram_type][i];
+ temp = XGI340_CR6B[pVBInfo->ram_type][i];
for (j = 0; j < 4; j++) {
temp1 = ((temp >> (2 * j)) & 0x03) << 2;
temp2 |= temp1;
@@ -444,7 +444,7 @@ static void XGINew_SetDRAMDefaultRegister340(
temp2 = 0;
for (i = 0; i < 4; i++) {
/* CR6E DQM fine tune delay */
- temp = pVBInfo->CR6E[pVBInfo->ram_type][i];
+ temp = 0;
for (j = 0; j < 4; j++) {
temp1 = ((temp >> (2 * j)) & 0x03) << 2;
temp2 |= temp1;
@@ -463,7 +463,7 @@ static void XGINew_SetDRAMDefaultRegister340(
temp2 = 0;
for (i = 0; i < 8; i++) {
/* CR6F DQ fine tune delay */
- temp = pVBInfo->CR6F[pVBInfo->ram_type][8 * k + i];
+ temp = 0;
for (j = 0; j < 4; j++) {
temp1 = (temp >> (2 * j)) & 0x03;
temp2 |= temp1;
@@ -486,7 +486,7 @@ static void XGINew_SetDRAMDefaultRegister340(
temp2 = 0x80;
/* CR89 terminator type select */
- temp = pVBInfo->CR89[pVBInfo->ram_type][0];
+ temp = 0;
for (j = 0; j < 4; j++) {
temp1 = (temp >> (2 * j)) & 0x03;
temp2 |= temp1;
@@ -496,7 +496,7 @@ static void XGINew_SetDRAMDefaultRegister340(
temp2 += 0x10;
}
- temp = pVBInfo->CR89[pVBInfo->ram_type][1];
+ temp = 0;
temp1 = temp & 0x03;
temp2 |= temp1;
xgifb_reg_set(P3d4, 0x89, temp2);
@@ -1378,17 +1378,17 @@ unsigned char XGIInitNew(struct pci_dev *pdev)
for (i = 0x47; i <= 0x4C; i++)
xgifb_reg_set(pVBInfo->P3d4,
i,
- pVBInfo->AGPReg[i - 0x47]);
+ XGI340_AGPReg[i - 0x47]);
for (i = 0x70; i <= 0x71; i++)
xgifb_reg_set(pVBInfo->P3d4,
i,
- pVBInfo->AGPReg[6 + i - 0x70]);
+ XGI340_AGPReg[6 + i - 0x70]);
for (i = 0x74; i <= 0x77; i++)
xgifb_reg_set(pVBInfo->P3d4,
i,
- pVBInfo->AGPReg[8 + i - 0x74]);
+ XGI340_AGPReg[8 + i - 0x74]);
pci_read_config_dword(pdev, 0x50, &Temp);
Temp >>= 20;
@@ -1401,7 +1401,7 @@ unsigned char XGIInitNew(struct pci_dev *pdev)
/* Set PCI */
xgifb_reg_set(pVBInfo->P3c4, 0x23, XGI330_SR23);
xgifb_reg_set(pVBInfo->P3c4, 0x24, XGI330_SR24);
- xgifb_reg_set(pVBInfo->P3c4, 0x25, XGI330_SR25);
+ xgifb_reg_set(pVBInfo->P3c4, 0x25, 0);
if (HwDeviceExtension->jChipType < XG20) {
/* Set VB */
@@ -1482,11 +1482,8 @@ unsigned char XGIInitNew(struct pci_dev *pdev)
XGINew_SetDRAMSize_340(xgifb_info, HwDeviceExtension, pVBInfo);
- xgifb_reg_set(pVBInfo->P3c4,
- 0x22,
- (unsigned char) ((pVBInfo->SR22) & 0xFE));
-
- xgifb_reg_set(pVBInfo->P3c4, 0x21, pVBInfo->SR21);
+ xgifb_reg_set(pVBInfo->P3c4, 0x22, 0xfa);
+ xgifb_reg_set(pVBInfo->P3c4, 0x21, 0xa3);
XGINew_ChkSenseStatus(HwDeviceExtension, pVBInfo);
XGINew_SetModeScratch(HwDeviceExtension, pVBInfo);
diff --git a/drivers/staging/xgifb/vb_init.h b/drivers/staging/xgifb/vb_init.h
index a27b4fe..d548983 100644
--- a/drivers/staging/xgifb/vb_init.h
+++ b/drivers/staging/xgifb/vb_init.h
@@ -1,6 +1,5 @@
#ifndef _VBINIT_
#define _VBINIT_
extern unsigned char XGIInitNew(struct pci_dev *pdev);
-extern struct XGI21_LVDSCapStruct XGI21_LCDCapList[13];
#endif
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index e95a165..d723a25 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -23,18 +23,7 @@ static const unsigned short XGINew_VGA_DAC[] = {
void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo)
{
- pVBInfo->StandTable = &XGI330_StandTable;
- pVBInfo->EModeIDTable = XGI330_EModeIDTable;
- pVBInfo->RefIndex = XGI330_RefIndex;
- pVBInfo->XGINEWUB_CRT1Table = XGI_CRT1Table;
-
pVBInfo->MCLKData = XGI340New_MCLKData;
- pVBInfo->ECLKData = XGI340_ECLKData;
- pVBInfo->VCLKData = XGI_VCLKData;
- pVBInfo->VBVCLKData = XGI_VBVCLKData;
- pVBInfo->ScreenOffset = XGI330_ScreenOffset;
- pVBInfo->StResInfo = XGI330_StResInfo;
- pVBInfo->ModeResInfo = XGI330_ModeResInfo;
pVBInfo->LCDResInfo = 0;
pVBInfo->LCDTypeInfo = 0;
@@ -44,19 +33,6 @@ void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo)
pVBInfo->SR15 = XGI340_SR13;
pVBInfo->CR40 = XGI340_cr41;
- pVBInfo->CR6B = XGI340_CR6B;
- pVBInfo->CR6E = XGI340_CR6E;
- pVBInfo->CR6F = XGI340_CR6F;
- pVBInfo->CR89 = XGI340_CR89;
- pVBInfo->AGPReg = XGI340_AGPReg;
- pVBInfo->SR16 = XGI340_SR16;
-
- pVBInfo->SR21 = 0xa3;
- pVBInfo->SR22 = 0xfb;
-
- pVBInfo->TimingH = XGI_TimingH;
- pVBInfo->TimingV = XGI_TimingV;
- pVBInfo->UpdateCRT1 = XGI_UpdateCRT1Table;
/* 310 customization related */
if ((pVBInfo->VBType & VB_SIS301LV) || (pVBInfo->VBType & VB_SIS302LV))
@@ -90,10 +66,10 @@ static void XGI_SetSeqRegs(unsigned short ModeNo,
unsigned char tempah, SRdata;
unsigned short i, modeflag;
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
xgifb_reg_set(pVBInfo->P3c4, 0x00, 0x03); /* Set SR0 */
- tempah = pVBInfo->StandTable->SR[0];
+ tempah = XGI330_StandTable.SR[0];
i = XGI_SetCRT2ToLCDA;
if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) {
@@ -108,7 +84,7 @@ static void XGI_SetSeqRegs(unsigned short ModeNo,
for (i = 02; i <= 04; i++) {
/* Get SR2,3,4 from file */
- SRdata = pVBInfo->StandTable->SR[i - 1];
+ SRdata = XGI330_StandTable.SR[i - 1];
xgifb_reg_set(pVBInfo->P3c4, i, SRdata); /* Set SR2 3 4 */
}
}
@@ -125,7 +101,7 @@ static void XGI_SetCRTCRegs(struct xgi_hw_device_info *HwDeviceExtension,
for (i = 0; i <= 0x18; i++) {
/* Get CRTC from file */
- CRTCdata = pVBInfo->StandTable->CRTC[i];
+ CRTCdata = XGI330_StandTable.CRTC[i];
xgifb_reg_set(pVBInfo->P3d4, i, CRTCdata); /* Set CRTC(3d4) */
}
}
@@ -137,10 +113,10 @@ static void XGI_SetATTRegs(unsigned short ModeNo,
unsigned char ARdata;
unsigned short i, modeflag;
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
for (i = 0; i <= 0x13; i++) {
- ARdata = pVBInfo->StandTable->ATTR[i];
+ ARdata = XGI330_StandTable.ATTR[i];
if ((modeflag & Charx8Dot) && i == 0x13) { /* ifndef Dot9 */
if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) {
@@ -171,7 +147,7 @@ static void XGI_SetGRCRegs(struct vb_device_info *pVBInfo)
for (i = 0; i <= 0x08; i++) {
/* Get GR from file */
- GRdata = pVBInfo->StandTable->GRC[i];
+ GRdata = XGI330_StandTable.GRC[i];
xgifb_reg_set(pVBInfo->P3ce, i, GRdata); /* Set GR(3ce) */
}
@@ -194,12 +170,12 @@ static unsigned char XGI_SetDefaultVCLK(struct vb_device_info *pVBInfo)
{
xgifb_reg_and_or(pVBInfo->P3c4, 0x31, ~0x30, 0x20);
- xgifb_reg_set(pVBInfo->P3c4, 0x2B, pVBInfo->VCLKData[0].SR2B);
- xgifb_reg_set(pVBInfo->P3c4, 0x2C, pVBInfo->VCLKData[0].SR2C);
+ xgifb_reg_set(pVBInfo->P3c4, 0x2B, XGI_VCLKData[0].SR2B);
+ xgifb_reg_set(pVBInfo->P3c4, 0x2C, XGI_VCLKData[0].SR2C);
xgifb_reg_and_or(pVBInfo->P3c4, 0x31, ~0x30, 0x10);
- xgifb_reg_set(pVBInfo->P3c4, 0x2B, pVBInfo->VCLKData[1].SR2B);
- xgifb_reg_set(pVBInfo->P3c4, 0x2C, pVBInfo->VCLKData[1].SR2C);
+ xgifb_reg_set(pVBInfo->P3c4, 0x2B, XGI_VCLKData[1].SR2B);
+ xgifb_reg_set(pVBInfo->P3c4, 0x2C, XGI_VCLKData[1].SR2C);
xgifb_reg_and(pVBInfo->P3c4, 0x31, ~0x30);
return 0;
@@ -212,9 +188,9 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeNo,
{
unsigned short tempax, tempbx, resinfo, modeflag, infoflag;
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
- resinfo = pVBInfo->EModeIDTable[ModeIdIndex].Ext_RESINFO;
- tempbx = pVBInfo->RefIndex[RefreshRateTableIndex + (*i)].ModeID;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ resinfo = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
+ tempbx = XGI330_RefIndex[RefreshRateTableIndex + (*i)].ModeID;
tempax = 0;
if (pVBInfo->IF_DEF_LVDS == 0) {
@@ -279,9 +255,9 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeNo,
}
}
- for (; pVBInfo->RefIndex[RefreshRateTableIndex + (*i)].ModeID ==
+ for (; XGI330_RefIndex[RefreshRateTableIndex + (*i)].ModeID ==
tempbx; (*i)--) {
- infoflag = pVBInfo->RefIndex[RefreshRateTableIndex + (*i)].
+ infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)].
Ext_InfoFlag;
if (infoflag & tempax)
return 1;
@@ -291,9 +267,9 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeNo,
}
for ((*i) = 0;; (*i)++) {
- infoflag = pVBInfo->RefIndex[RefreshRateTableIndex + (*i)].
+ infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)].
Ext_InfoFlag;
- if (pVBInfo->RefIndex[RefreshRateTableIndex + (*i)].ModeID
+ if (XGI330_RefIndex[RefreshRateTableIndex + (*i)].ModeID
!= tempbx) {
return 0;
}
@@ -310,7 +286,7 @@ static void XGI_SetSync(unsigned short RefreshRateTableIndex,
unsigned short sync, temp;
/* di+0x00 */
- sync = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_InfoFlag >> 8;
+ sync = XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag >> 8;
sync &= 0xC0;
temp = 0x2F;
temp |= sync;
@@ -328,22 +304,22 @@ static void XGI_SetCRT1Timing_H(struct vb_device_info *pVBInfo,
data &= 0x7F;
xgifb_reg_set(pVBInfo->P3d4, 0x11, data);
- data = pVBInfo->TimingH[0].data[0];
+ data = pVBInfo->TimingH.data[0];
xgifb_reg_set(pVBInfo->P3d4, 0, data);
for (i = 0x01; i <= 0x04; i++) {
- data = pVBInfo->TimingH[0].data[i];
+ data = pVBInfo->TimingH.data[i];
xgifb_reg_set(pVBInfo->P3d4, (unsigned short) (i + 1), data);
}
for (i = 0x05; i <= 0x06; i++) {
- data = pVBInfo->TimingH[0].data[i];
+ data = pVBInfo->TimingH.data[i];
xgifb_reg_set(pVBInfo->P3c4, (unsigned short) (i + 6), data);
}
j = (unsigned char) xgifb_reg_get(pVBInfo->P3c4, 0x0e);
j &= 0x1F;
- data = pVBInfo->TimingH[0].data[7];
+ data = pVBInfo->TimingH.data[7];
data &= 0xE0;
data |= j;
xgifb_reg_set(pVBInfo->P3c4, 0x0e, data);
@@ -385,32 +361,32 @@ static void XGI_SetCRT1Timing_V(unsigned short ModeIdIndex,
unsigned short i, j;
for (i = 0x00; i <= 0x01; i++) {
- data = pVBInfo->TimingV[0].data[i];
+ data = pVBInfo->TimingV.data[i];
xgifb_reg_set(pVBInfo->P3d4, (unsigned short) (i + 6), data);
}
for (i = 0x02; i <= 0x03; i++) {
- data = pVBInfo->TimingV[0].data[i];
+ data = pVBInfo->TimingV.data[i];
xgifb_reg_set(pVBInfo->P3d4, (unsigned short) (i + 0x0e), data);
}
for (i = 0x04; i <= 0x05; i++) {
- data = pVBInfo->TimingV[0].data[i];
+ data = pVBInfo->TimingV.data[i];
xgifb_reg_set(pVBInfo->P3d4, (unsigned short) (i + 0x11), data);
}
j = (unsigned char) xgifb_reg_get(pVBInfo->P3c4, 0x0a);
j &= 0xC0;
- data = pVBInfo->TimingV[0].data[6];
+ data = pVBInfo->TimingV.data[6];
data &= 0x3F;
data |= j;
xgifb_reg_set(pVBInfo->P3c4, 0x0a, data);
- data = pVBInfo->TimingV[0].data[6];
+ data = pVBInfo->TimingV.data[6];
data &= 0x80;
data = data >> 2;
- i = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ i = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
i &= DoubleScanMode;
if (i)
data |= 0x80;
@@ -430,7 +406,7 @@ static void XGI_SetCRT1CRTC(unsigned short ModeNo, unsigned short ModeIdIndex,
unsigned short i;
/* Get index */
- index = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
+ index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
index = index & IndexMask;
data = (unsigned char) xgifb_reg_get(pVBInfo->P3d4, 0x11);
@@ -438,12 +414,12 @@ static void XGI_SetCRT1CRTC(unsigned short ModeNo, unsigned short ModeIdIndex,
xgifb_reg_set(pVBInfo->P3d4, 0x11, data); /* Unlock CRTC */
for (i = 0; i < 8; i++)
- pVBInfo->TimingH[0].data[i]
- = pVBInfo->XGINEWUB_CRT1Table[index].CR[i];
+ pVBInfo->TimingH.data[i]
+ = XGI_CRT1Table[index].CR[i];
for (i = 0; i < 7; i++)
- pVBInfo->TimingV[0].data[i]
- = pVBInfo->XGINEWUB_CRT1Table[index].CR[i + 8];
+ pVBInfo->TimingV.data[i]
+ = XGI_CRT1Table[index].CR[i + 8];
XGI_SetCRT1Timing_H(pVBInfo, HwDeviceExtension);
@@ -466,23 +442,23 @@ static void XGI_SetXG21CRTC(unsigned short ModeNo, unsigned short ModeIdIndex,
unsigned char index, Tempax, Tempbx, Tempcx, Tempdx;
unsigned short Temp1, Temp2, Temp3;
- index = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
+ index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
/* Tempax: CR4 HRS */
- Tempax = pVBInfo->XGINEWUB_CRT1Table[index].CR[3];
+ Tempax = XGI_CRT1Table[index].CR[3];
Tempcx = Tempax; /* Tempcx: HRS */
/* SR2E[7:0]->HRS */
xgifb_reg_set(pVBInfo->P3c4, 0x2E, Tempax);
- Tempdx = pVBInfo->XGINEWUB_CRT1Table[index].CR[5]; /* SRB */
+ Tempdx = XGI_CRT1Table[index].CR[5]; /* SRB */
Tempdx &= 0xC0; /* Tempdx[7:6]: SRB[7:6] */
Temp1 = Tempdx; /* Temp1[7:6]: HRS[9:8] */
Temp1 <<= 2; /* Temp1[9:8]: HRS[9:8] */
Temp1 |= Tempax; /* Temp1[9:0]: HRS[9:0] */
- Tempax = pVBInfo->XGINEWUB_CRT1Table[index].CR[4]; /* CR5 HRE */
+ Tempax = XGI_CRT1Table[index].CR[4]; /* CR5 HRE */
Tempax &= 0x1F; /* Tempax[4:0]: HRE[4:0] */
- Tempbx = pVBInfo->XGINEWUB_CRT1Table[index].CR[6]; /* SRC */
+ Tempbx = XGI_CRT1Table[index].CR[6]; /* SRC */
Tempbx &= 0x04; /* Tempbx[2]: HRE[5] */
Tempbx <<= 3; /* Tempbx[5]: HRE[5] */
Tempax |= Tempbx; /* Tempax[5:0]: HRE[5:0] */
@@ -504,12 +480,12 @@ static void XGI_SetXG21CRTC(unsigned short ModeNo, unsigned short ModeIdIndex,
xgifb_reg_and_or(pVBInfo->P3c4, 0x30, 0xE3, 00);
/* CR10 VRS */
- Tempax = pVBInfo->XGINEWUB_CRT1Table[index].CR[10];
+ Tempax = XGI_CRT1Table[index].CR[10];
Tempbx = Tempax; /* Tempbx: VRS */
Tempax &= 0x01; /* Tempax[0]: VRS[0] */
xgifb_reg_or(pVBInfo->P3c4, 0x33, Tempax); /* SR33[0]->VRS[0] */
/* CR7[2][7] VRE */
- Tempax = pVBInfo->XGINEWUB_CRT1Table[index].CR[9];
+ Tempax = XGI_CRT1Table[index].CR[9];
Tempcx = Tempbx >> 1; /* Tempcx[6:0]: VRS[7:1] */
Tempdx = Tempax & 0x04; /* Tempdx[2]: CR7[2] */
Tempdx <<= 5; /* Tempdx[7]: VRS[8] */
@@ -523,17 +499,17 @@ static void XGI_SetXG21CRTC(unsigned short ModeNo, unsigned short ModeIdIndex,
Temp2 = Tempax << 2; /* Temp2[9]: VRS[9] */
Temp1 |= Temp2; /* Temp1[9:0]: VRS[9:0] */
/* Tempax: SRA */
- Tempax = pVBInfo->XGINEWUB_CRT1Table[index].CR[14];
+ Tempax = XGI_CRT1Table[index].CR[14];
Tempax &= 0x08; /* Tempax[3]: VRS[3] */
Temp2 = Tempax;
Temp2 <<= 7; /* Temp2[10]: VRS[10] */
Temp1 |= Temp2; /* Temp1[10:0]: VRS[10:0] */
/* Tempax: CR11 VRE */
- Tempax = pVBInfo->XGINEWUB_CRT1Table[index].CR[11];
+ Tempax = XGI_CRT1Table[index].CR[11];
Tempax &= 0x0F; /* Tempax[3:0]: VRE[3:0] */
/* Tempbx: SRA */
- Tempbx = pVBInfo->XGINEWUB_CRT1Table[index].CR[14];
+ Tempbx = XGI_CRT1Table[index].CR[14];
Tempbx &= 0x20; /* Tempbx[5]: VRE[5] */
Tempbx >>= 1; /* Tempbx[4]: VRE[4] */
Tempax |= Tempbx; /* Tempax[4:0]: VRE[4:0] */
@@ -563,23 +539,23 @@ static void XGI_SetXG27CRTC(unsigned short ModeNo,
{
unsigned short index, Tempax, Tempbx, Tempcx;
- index = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
+ index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
/* Tempax: CR4 HRS */
- Tempax = pVBInfo->XGINEWUB_CRT1Table[index].CR[3];
+ Tempax = XGI_CRT1Table[index].CR[3];
Tempbx = Tempax; /* Tempbx: HRS[7:0] */
/* SR2E[7:0]->HRS */
xgifb_reg_set(pVBInfo->P3c4, 0x2E, Tempax);
/* SR0B */
- Tempax = pVBInfo->XGINEWUB_CRT1Table[index].CR[5];
+ Tempax = XGI_CRT1Table[index].CR[5];
Tempax &= 0xC0; /* Tempax[7:6]: SR0B[7:6]: HRS[9:8]*/
Tempbx |= (Tempax << 2); /* Tempbx: HRS[9:0] */
- Tempax = pVBInfo->XGINEWUB_CRT1Table[index].CR[4]; /* CR5 HRE */
+ Tempax = XGI_CRT1Table[index].CR[4]; /* CR5 HRE */
Tempax &= 0x1F; /* Tempax[4:0]: HRE[4:0] */
Tempcx = Tempax; /* Tempcx: HRE[4:0] */
- Tempax = pVBInfo->XGINEWUB_CRT1Table[index].CR[6]; /* SRC */
+ Tempax = XGI_CRT1Table[index].CR[6]; /* SRC */
Tempax &= 0x04; /* Tempax[2]: HRE[5] */
Tempax <<= 3; /* Tempax[5]: HRE[5] */
Tempcx |= Tempax; /* Tempcx[5:0]: HRE[5:0] */
@@ -588,12 +564,12 @@ static void XGI_SetXG27CRTC(unsigned short ModeNo,
Tempbx |= Tempcx; /* Tempbx: HRS[9:6]HRE[5:0] */
/* Tempax: CR4 HRS */
- Tempax = pVBInfo->XGINEWUB_CRT1Table[index].CR[3];
+ Tempax = XGI_CRT1Table[index].CR[3];
Tempax &= 0x3F; /* Tempax: HRS[5:0] */
if (Tempcx <= Tempax) /* HRE[5:0] < HRS[5:0] */
Tempbx += 0x40; /* Tempbx= Tempbx + 0x40 : HRE[9:0]*/
- Tempax = pVBInfo->XGINEWUB_CRT1Table[index].CR[5]; /* SR0B */
+ Tempax = XGI_CRT1Table[index].CR[5]; /* SR0B */
Tempax &= 0xC0; /* Tempax[7:6]: SR0B[7:6]: HRS[9:8]*/
Tempax >>= 6; /* Tempax[1:0]: HRS[9:8]*/
Tempax |= ((Tempbx << 2) & 0xFF); /* Tempax[7:2]: HRE[5:0] */
@@ -602,13 +578,13 @@ static void XGI_SetXG27CRTC(unsigned short ModeNo,
xgifb_reg_and_or(pVBInfo->P3c4, 0x30, 0xE3, 00);
/* CR10 VRS */
- Tempax = pVBInfo->XGINEWUB_CRT1Table[index].CR[10];
+ Tempax = XGI_CRT1Table[index].CR[10];
/* SR34[7:0]->VRS[7:0] */
xgifb_reg_set(pVBInfo->P3c4, 0x34, Tempax);
Tempcx = Tempax; /* Tempcx <= VRS[7:0] */
/* CR7[7][2] VRS[9][8] */
- Tempax = pVBInfo->XGINEWUB_CRT1Table[index].CR[9];
+ Tempax = XGI_CRT1Table[index].CR[9];
Tempbx = Tempax; /* Tempbx <= CR07[7:0] */
Tempax = Tempax & 0x04; /* Tempax[2]: CR7[2]: VRS[8] */
Tempax >>= 2; /* Tempax[0]: VRS[8] */
@@ -617,15 +593,15 @@ static void XGI_SetXG27CRTC(unsigned short ModeNo,
Tempcx |= (Tempax << 8); /* Tempcx <= VRS[8:0] */
Tempcx |= ((Tempbx & 0x80) << 2); /* Tempcx <= VRS[9:0] */
/* Tempax: SR0A */
- Tempax = pVBInfo->XGINEWUB_CRT1Table[index].CR[14];
+ Tempax = XGI_CRT1Table[index].CR[14];
Tempax &= 0x08; /* SR0A[3] VRS[10] */
Tempcx |= (Tempax << 7); /* Tempcx <= VRS[10:0] */
/* Tempax: CR11 VRE */
- Tempax = pVBInfo->XGINEWUB_CRT1Table[index].CR[11];
+ Tempax = XGI_CRT1Table[index].CR[11];
Tempax &= 0x0F; /* Tempax[3:0]: VRE[3:0] */
/* Tempbx: SR0A */
- Tempbx = pVBInfo->XGINEWUB_CRT1Table[index].CR[14];
+ Tempbx = XGI_CRT1Table[index].CR[14];
Tempbx &= 0x20; /* Tempbx[5]: SR0A[5]: VRE[4] */
Tempbx >>= 1; /* Tempbx[4]: VRE[4] */
Tempax |= Tempbx; /* Tempax[4:0]: VRE[4:0] */
@@ -698,7 +674,7 @@ static void xgifb_set_lcd(int chip_id,
xgifb_reg_and(pVBInfo->P3c4, 0x30, ~0x20); /* Hsync polarity */
xgifb_reg_and(pVBInfo->P3c4, 0x35, ~0x80); /* Vsync polarity */
- Data = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_InfoFlag;
+ Data = XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag;
if (Data & 0x4000)
/* Hsync polarity */
xgifb_reg_or(pVBInfo->P3c4, 0x30, 0x20);
@@ -721,10 +697,10 @@ static void XGI_UpdateXG21CRTC(unsigned short ModeNo,
xgifb_reg_and(pVBInfo->P3d4, 0x11, 0x7F); /* Unlock CR0~7 */
if (ModeNo == 0x2E &&
- (pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC ==
+ (XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC ==
RES640x480x60))
index = 12;
- else if (ModeNo == 0x2E && (pVBInfo->RefIndex[RefreshRateTableIndex].
+ else if (ModeNo == 0x2E && (XGI330_RefIndex[RefreshRateTableIndex].
Ext_CRT1CRTC == RES640x480x72))
index = 13;
else if (ModeNo == 0x2F)
@@ -736,13 +712,13 @@ static void XGI_UpdateXG21CRTC(unsigned short ModeNo,
if (index != -1) {
xgifb_reg_set(pVBInfo->P3d4, 0x02,
- pVBInfo->UpdateCRT1[index].CR02);
+ XGI_UpdateCRT1Table[index].CR02);
xgifb_reg_set(pVBInfo->P3d4, 0x03,
- pVBInfo->UpdateCRT1[index].CR03);
+ XGI_UpdateCRT1Table[index].CR03);
xgifb_reg_set(pVBInfo->P3d4, 0x15,
- pVBInfo->UpdateCRT1[index].CR15);
+ XGI_UpdateCRT1Table[index].CR15);
xgifb_reg_set(pVBInfo->P3d4, 0x16,
- pVBInfo->UpdateCRT1[index].CR16);
+ XGI_UpdateCRT1Table[index].CR16);
}
}
@@ -755,11 +731,11 @@ static void XGI_SetCRT1DE(struct xgi_hw_device_info *HwDeviceExtension,
unsigned char data;
- resindex = pVBInfo->EModeIDTable[ModeIdIndex].Ext_RESINFO;
+ resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
- tempax = pVBInfo->ModeResInfo[resindex].HTotal;
- tempbx = pVBInfo->ModeResInfo[resindex].VTotal;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ tempax = XGI330_ModeResInfo[resindex].HTotal;
+ tempbx = XGI330_ModeResInfo[resindex].VTotal;
if (modeflag & HalfDCLK)
tempax = tempax >> 1;
@@ -767,7 +743,7 @@ static void XGI_SetCRT1DE(struct xgi_hw_device_info *HwDeviceExtension,
if (modeflag & HalfDCLK)
tempax = tempax << 1;
- temp = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_InfoFlag;
+ temp = XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag;
if (temp & InterlaceMode)
tempbx = tempbx >> 1;
@@ -819,11 +795,11 @@ static void XGI_SetCRT1Offset(unsigned short ModeNo,
unsigned short temp, ah, al, temp2, i, DisplayUnit;
/* GetOffset */
- temp = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeInfo;
+ temp = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeInfo;
temp = temp >> 8;
- temp = pVBInfo->ScreenOffset[temp];
+ temp = XGI330_ScreenOffset[temp];
- temp2 = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_InfoFlag;
+ temp2 = XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag;
temp2 &= InterlaceMode;
if (temp2)
@@ -874,7 +850,7 @@ static void XGI_SetCRT1Offset(unsigned short ModeNo,
xgifb_reg_set(pVBInfo->P3d4, 0x13, temp);
/* SetDisplayUnit */
- temp2 = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_InfoFlag;
+ temp2 = XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag;
temp2 &= InterlaceMode;
if (temp2)
DisplayUnit >>= 1;
@@ -904,9 +880,9 @@ static unsigned short XGI_GetVCLK2Ptr(unsigned short ModeNo,
unsigned short modeflag, resinfo;
/* si+Ext_ResInfo */
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
- resinfo = pVBInfo->EModeIDTable[ModeIdIndex].Ext_RESINFO;
- CRT2Index = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ resinfo = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
+ CRT2Index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
if (pVBInfo->IF_DEF_LVDS == 0) {
CRT2Index = CRT2Index >> 6; /* for LCD */
@@ -947,7 +923,7 @@ static unsigned short XGI_GetVCLK2Ptr(unsigned short ModeNo,
VCLKIndex = TVCLKBASE_315_25 + TVVCLK;
} else { /* for CRT2 */
/* di+Ext_CRTVCLK */
- VCLKIndex = pVBInfo->RefIndex[RefreshRateTableIndex].
+ VCLKIndex = XGI330_RefIndex[RefreshRateTableIndex].
Ext_CRTVCLK;
VCLKIndex &= IndexMask;
}
@@ -971,13 +947,11 @@ static void XGI_SetCRT1VCLK(unsigned short ModeNo,
unsigned short vclkindex;
if (pVBInfo->IF_DEF_LVDS == 1) {
- index = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
+ index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
data = xgifb_reg_get(pVBInfo->P3c4, 0x31) & 0xCF;
xgifb_reg_set(pVBInfo->P3c4, 0x31, data);
- xgifb_reg_set(pVBInfo->P3c4, 0x2B,
- pVBInfo->VCLKData[index].SR2B);
- xgifb_reg_set(pVBInfo->P3c4, 0x2C,
- pVBInfo->VCLKData[index].SR2C);
+ xgifb_reg_set(pVBInfo->P3c4, 0x2B, XGI_VCLKData[index].SR2B);
+ xgifb_reg_set(pVBInfo->P3c4, 0x2C, XGI_VCLKData[index].SR2C);
xgifb_reg_set(pVBInfo->P3c4, 0x2D, 0x01);
} else if ((pVBInfo->VBType & (VB_SIS301B | VB_SIS302B | VB_SIS301LV
| VB_SIS302LV | VB_XGI301C)) && (pVBInfo->VBInfo
@@ -987,24 +961,22 @@ static void XGI_SetCRT1VCLK(unsigned short ModeNo,
pVBInfo);
data = xgifb_reg_get(pVBInfo->P3c4, 0x31) & 0xCF;
xgifb_reg_set(pVBInfo->P3c4, 0x31, data);
- data = pVBInfo->VBVCLKData[vclkindex].Part4_A;
+ data = XGI_VBVCLKData[vclkindex].Part4_A;
xgifb_reg_set(pVBInfo->P3c4, 0x2B, data);
- data = pVBInfo->VBVCLKData[vclkindex].Part4_B;
+ data = XGI_VBVCLKData[vclkindex].Part4_B;
xgifb_reg_set(pVBInfo->P3c4, 0x2C, data);
xgifb_reg_set(pVBInfo->P3c4, 0x2D, 0x01);
} else {
- index = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
+ index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
data = xgifb_reg_get(pVBInfo->P3c4, 0x31) & 0xCF;
xgifb_reg_set(pVBInfo->P3c4, 0x31, data);
- xgifb_reg_set(pVBInfo->P3c4, 0x2B,
- pVBInfo->VCLKData[index].SR2B);
- xgifb_reg_set(pVBInfo->P3c4, 0x2C,
- pVBInfo->VCLKData[index].SR2C);
+ xgifb_reg_set(pVBInfo->P3c4, 0x2B, XGI_VCLKData[index].SR2B);
+ xgifb_reg_set(pVBInfo->P3c4, 0x2C, XGI_VCLKData[index].SR2C);
xgifb_reg_set(pVBInfo->P3c4, 0x2D, 0x01);
}
if (HwDeviceExtension->jChipType >= XG20) {
- if (pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag &
+ if (XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag &
HalfDCLK) {
data = xgifb_reg_get(pVBInfo->P3c4, 0x2B);
xgifb_reg_set(pVBInfo->P3c4, 0x2B, data);
@@ -1064,9 +1036,9 @@ static void XGI_SetVCLKState(struct xgi_hw_device_info *HwDeviceExtension,
unsigned char index;
- index = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
+ index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
index &= IndexMask;
- VCLK = pVBInfo->VCLKData[index].CLOCK;
+ VCLK = XGI_VCLKData[index].CLOCK;
data = xgifb_reg_get(pVBInfo->P3c4, 0x32);
data &= 0xf3;
@@ -1102,8 +1074,8 @@ static void XGI_SetCRT1ModeRegs(struct xgi_hw_device_info *HwDeviceExtension,
unsigned short data, data2, data3, infoflag = 0, modeflag, resindex,
xres;
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
- infoflag = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_InfoFlag;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ infoflag = XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag;
if (xgifb_reg_get(pVBInfo->P3d4, 0x31) & 0x01)
xgifb_reg_and_or(pVBInfo->P3c4, 0x1F, 0x3F, 0x00);
@@ -1120,8 +1092,8 @@ static void XGI_SetCRT1ModeRegs(struct xgi_hw_device_info *HwDeviceExtension,
data2 |= 0x20;
xgifb_reg_and_or(pVBInfo->P3c4, 0x06, ~0x3F, data2);
- resindex = pVBInfo->EModeIDTable[ModeIdIndex].Ext_RESINFO;
- xres = pVBInfo->ModeResInfo[resindex].HTotal; /* xres->ax */
+ resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
+ xres = XGI330_ModeResInfo[resindex].HTotal; /* xres->ax */
data = 0x0000;
if (infoflag & InterlaceMode) {
@@ -1282,13 +1254,13 @@ static void XGI_GetLVDSResInfo(unsigned short ModeNo,
unsigned short resindex, xres, yres, modeflag;
/* si+Ext_ResInfo */
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_RESINFO;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
/* si+Ext_ResInfo */
- resindex = pVBInfo->EModeIDTable[ModeIdIndex].Ext_RESINFO;
+ resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
- xres = pVBInfo->ModeResInfo[resindex].HTotal;
- yres = pVBInfo->ModeResInfo[resindex].VTotal;
+ xres = XGI330_ModeResInfo[resindex].HTotal;
+ yres = XGI330_ModeResInfo[resindex].VTotal;
if (modeflag & HalfDCLK)
xres = xres << 1;
@@ -1305,64 +1277,21 @@ static void XGI_GetLVDSResInfo(unsigned short ModeNo,
pVBInfo->VDE = yres;
}
-static void *XGI_GetLcdPtr(unsigned short BX, unsigned short ModeNo,
+static void const *XGI_GetLcdPtr(struct XGI330_LCDDataTablStruct const *table,
+ unsigned short ModeNo,
unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo)
{
- unsigned short i, tempdx, tempbx, tempal, modeflag, table;
-
- struct XGI330_LCDDataTablStruct *tempdi = NULL;
-
- tempbx = BX;
-
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
- tempal = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
-
- tempal = tempal & 0x0f;
-
- if (tempbx <= 1) { /* ExpLink */
- tempal = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
-
- if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) {
- tempal = pVBInfo->RefIndex[RefreshRateTableIndex].
- Ext_CRT2CRTC2;
- }
+ unsigned short i, tempdx, tempbx, modeflag;
- if (tempbx & 0x01)
- tempal = (tempal >> 4);
-
- tempal = (tempal & 0x0f);
- }
-
- switch (tempbx) {
- case 0:
- case 1:
- tempdi = xgifb_epllcd_crt1;
- break;
- case 2:
- tempdi = XGI_EPLLCDDataPtr;
- break;
- case 3:
- tempdi = XGI_EPLLCDDesDataPtr;
- break;
- case 4:
- tempdi = XGI_LCDDataTable;
- break;
- case 5:
- tempdi = XGI_LCDDesDataTable;
- break;
- default:
- break;
- }
+ tempbx = 0;
- if (tempdi == NULL) /* OEMUtil */
- return NULL;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
- table = tempbx;
i = 0;
- while (tempdi[i].PANELID != 0xff) {
+ while (table[i].PANELID != 0xff) {
tempdx = pVBInfo->LCDResInfo;
if (tempbx & 0x0080) { /* OEMUtil */
tempbx &= (~0x0080);
@@ -1372,341 +1301,21 @@ static void *XGI_GetLcdPtr(unsigned short BX, unsigned short ModeNo,
if (pVBInfo->LCDInfo & EnableScalingLCD)
tempdx &= (~PanelResInfo);
- if (tempdi[i].PANELID == tempdx) {
- tempbx = tempdi[i].MASK;
+ if (table[i].PANELID == tempdx) {
+ tempbx = table[i].MASK;
tempdx = pVBInfo->LCDInfo;
if (modeflag & HalfDCLK)
tempdx |= SetLCDLowResolution;
tempbx &= tempdx;
- if (tempbx == tempdi[i].CAP)
+ if (tempbx == table[i].CAP)
break;
}
i++;
}
- if (table == 0) {
- switch (tempdi[i].DATAPTR) {
- case 0:
- return &XGI_LVDSCRT11024x768_1_H[tempal];
- break;
- case 1:
- return &XGI_LVDSCRT11024x768_2_H[tempal];
- break;
- case 2:
- return &XGI_LVDSCRT11280x1024_1_H[tempal];
- break;
- case 3:
- return &XGI_LVDSCRT11280x1024_2_H[tempal];
- break;
- case 4:
- return &XGI_LVDSCRT11400x1050_1_H[tempal];
- break;
- case 5:
- return &XGI_LVDSCRT11400x1050_2_H[tempal];
- break;
- case 6:
- return &XGI_LVDSCRT11600x1200_1_H[tempal];
- break;
- case 7:
- return &XGI_LVDSCRT11024x768_1_Hx75[tempal];
- break;
- case 8:
- return &XGI_LVDSCRT11024x768_2_Hx75[tempal];
- break;
- case 9:
- return &XGI_LVDSCRT11280x1024_1_Hx75[tempal];
- break;
- case 10:
- return &XGI_LVDSCRT11280x1024_2_Hx75[tempal];
- break;
- default:
- break;
- }
- } else if (table == 1) {
- switch (tempdi[i].DATAPTR) {
- case 0:
- return &XGI_LVDSCRT11024x768_1_V[tempal];
- break;
- case 1:
- return &XGI_LVDSCRT11024x768_2_V[tempal];
- break;
- case 2:
- return &XGI_LVDSCRT11280x1024_1_V[tempal];
- break;
- case 3:
- return &XGI_LVDSCRT11280x1024_2_V[tempal];
- break;
- case 4:
- return &XGI_LVDSCRT11400x1050_1_V[tempal];
- break;
- case 5:
- return &XGI_LVDSCRT11400x1050_2_V[tempal];
- break;
- case 6:
- return &XGI_LVDSCRT11600x1200_1_V[tempal];
- break;
- case 7:
- return &XGI_LVDSCRT11024x768_1_Vx75[tempal];
- break;
- case 8:
- return &XGI_LVDSCRT11024x768_2_Vx75[tempal];
- break;
- case 9:
- return &XGI_LVDSCRT11280x1024_1_Vx75[tempal];
- break;
- case 10:
- return &XGI_LVDSCRT11280x1024_2_Vx75[tempal];
- break;
- default:
- break;
- }
- } else if (table == 2) {
- switch (tempdi[i].DATAPTR) {
- case 0:
- return &XGI_LVDS1024x768Data_1[tempal];
- break;
- case 1:
- return &XGI_LVDS1024x768Data_2[tempal];
- break;
- case 2:
- return &XGI_LVDS1280x1024Data_1[tempal];
- break;
- case 3:
- return &XGI_LVDS1280x1024Data_2[tempal];
- break;
- case 4:
- return &XGI_LVDS1400x1050Data_1[tempal];
- break;
- case 5:
- return &XGI_LVDS1400x1050Data_2[tempal];
- break;
- case 6:
- return &XGI_LVDS1600x1200Data_1[tempal];
- break;
- case 7:
- return &XGI_LVDSNoScalingData[tempal];
- break;
- case 8:
- return &XGI_LVDS1024x768Data_1x75[tempal];
- break;
- case 9:
- return &XGI_LVDS1024x768Data_2x75[tempal];
- break;
- case 10:
- return &XGI_LVDS1280x1024Data_1x75[tempal];
- break;
- case 11:
- return &XGI_LVDS1280x1024Data_2x75[tempal];
- break;
- case 12:
- return &XGI_LVDSNoScalingDatax75[tempal];
- break;
- default:
- break;
- }
- } else if (table == 3) {
- switch (tempdi[i].DATAPTR) {
- case 0:
- return &XGI_LVDS1024x768Des_1[tempal];
- break;
- case 1:
- return &XGI_LVDS1024x768Des_3[tempal];
- break;
- case 2:
- return &XGI_LVDS1024x768Des_2[tempal];
- break;
- case 3:
- return &XGI_LVDS1280x1024Des_1[tempal];
- break;
- case 4:
- return &XGI_LVDS1280x1024Des_2[tempal];
- break;
- case 5:
- return &XGI_LVDS1400x1050Des_1[tempal];
- break;
- case 6:
- return &XGI_LVDS1400x1050Des_2[tempal];
- break;
- case 7:
- return &XGI_LVDS1600x1200Des_1[tempal];
- break;
- case 8:
- return &XGI_LVDSNoScalingDesData[tempal];
- break;
- case 9:
- return &XGI_LVDS1024x768Des_1x75[tempal];
- break;
- case 10:
- return &XGI_LVDS1024x768Des_3x75[tempal];
- break;
- case 11:
- return &XGI_LVDS1024x768Des_2x75[tempal];
- break;
- case 12:
- return &XGI_LVDS1280x1024Des_1x75[tempal];
- break;
- case 13:
- return &XGI_LVDS1280x1024Des_2x75[tempal];
- break;
- case 14:
- return &XGI_LVDSNoScalingDesDatax75[tempal];
- break;
- default:
- break;
- }
- } else if (table == 4) {
- switch (tempdi[i].DATAPTR) {
- case 0:
- return &XGI_ExtLCD1024x768Data[tempal];
- break;
- case 1:
- return &XGI_StLCD1024x768Data[tempal];
- break;
- case 2:
- return &XGI_CetLCD1024x768Data[tempal];
- break;
- case 3:
- return &XGI_ExtLCD1280x1024Data[tempal];
- break;
- case 4:
- return &XGI_StLCD1280x1024Data[tempal];
- break;
- case 5:
- return &XGI_CetLCD1280x1024Data[tempal];
- break;
- case 6:
- case 7:
- return &xgifb_lcd_1400x1050[tempal];
- break;
- case 8:
- return &XGI_CetLCD1400x1050Data[tempal];
- break;
- case 9:
- return &XGI_ExtLCD1600x1200Data[tempal];
- break;
- case 10:
- return &XGI_StLCD1600x1200Data[tempal];
- break;
- case 11:
- return &XGI_NoScalingData[tempal];
- break;
- case 12:
- return &XGI_ExtLCD1024x768x75Data[tempal];
- break;
- case 13:
- return &XGI_ExtLCD1024x768x75Data[tempal];
- break;
- case 14:
- return &XGI_CetLCD1024x768x75Data[tempal];
- break;
- case 15:
- case 16:
- return &xgifb_lcd_1280x1024x75[tempal];
- break;
- case 17:
- return &XGI_CetLCD1280x1024x75Data[tempal];
- break;
- case 18:
- return &XGI_NoScalingDatax75[tempal];
- break;
- default:
- break;
- }
- } else if (table == 5) {
- switch (tempdi[i].DATAPTR) {
- case 0:
- return &XGI_ExtLCDDes1024x768Data[tempal];
- break;
- case 1:
- return &XGI_StLCDDes1024x768Data[tempal];
- break;
- case 2:
- return &XGI_CetLCDDes1024x768Data[tempal];
- break;
- case 3:
- if ((pVBInfo->VBType & VB_SIS301LV) ||
- (pVBInfo->VBType & VB_SIS302LV))
- return &XGI_ExtLCDDLDes1280x1024Data[tempal];
- else
- return &XGI_ExtLCDDes1280x1024Data[tempal];
- break;
- case 4:
- if ((pVBInfo->VBType & VB_SIS301LV) ||
- (pVBInfo->VBType & VB_SIS302LV))
- return &XGI_StLCDDLDes1280x1024Data[tempal];
- else
- return &XGI_StLCDDes1280x1024Data[tempal];
- break;
- case 5:
- if ((pVBInfo->VBType & VB_SIS301LV) ||
- (pVBInfo->VBType & VB_SIS302LV))
- return &XGI_CetLCDDLDes1280x1024Data[tempal];
- else
- return &XGI_CetLCDDes1280x1024Data[tempal];
- break;
- case 6:
- case 7:
- if ((pVBInfo->VBType & VB_SIS301LV) ||
- (pVBInfo->VBType & VB_SIS302LV))
- return &xgifb_lcddldes_1400x1050[tempal];
- else
- return &xgifb_lcddes_1400x1050[tempal];
- break;
- case 8:
- return &XGI_CetLCDDes1400x1050Data[tempal];
- break;
- case 9:
- return &XGI_CetLCDDes1400x1050Data2[tempal];
- break;
- case 10:
- if ((pVBInfo->VBType & VB_SIS301LV) ||
- (pVBInfo->VBType & VB_SIS302LV))
- return &XGI_ExtLCDDLDes1600x1200Data[tempal];
- else
- return &XGI_ExtLCDDes1600x1200Data[tempal];
- break;
- case 11:
- if ((pVBInfo->VBType & VB_SIS301LV) ||
- (pVBInfo->VBType & VB_SIS302LV))
- return &XGI_StLCDDLDes1600x1200Data[tempal];
- else
- return &XGI_StLCDDes1600x1200Data[tempal];
- break;
- case 12:
- return &XGI_NoScalingDesData[tempal];
- break;
- case 13:
- case 14:
- return &xgifb_lcddes_1024x768x75[tempal];
- break;
- case 15:
- return &XGI_CetLCDDes1024x768x75Data[tempal];
- break;
- case 16:
- case 17:
- if ((pVBInfo->VBType & VB_SIS301LV) ||
- (pVBInfo->VBType & VB_SIS302LV))
- return &xgifb_lcddldes_1280x1024x75[tempal];
- else
- return &xgifb_lcddes_1280x1024x75[tempal];
- break;
- case 18:
- if ((pVBInfo->VBType & VB_SIS301LV) ||
- (pVBInfo->VBType & VB_SIS302LV))
- return &XGI_CetLCDDLDes1280x1024x75Data[tempal];
- else
- return &XGI_CetLCDDes1280x1024x75Data[tempal];
- break;
- case 19:
- return &XGI_NoScalingDesDatax75[tempal];
- break;
- default:
- break;
- }
- }
- return NULL;
+ return table[i].DATAPTR;
}
static struct SiS_TVData const *XGI_GetTVPtr(unsigned short ModeNo,
@@ -1716,8 +1325,8 @@ static struct SiS_TVData const *XGI_GetTVPtr(unsigned short ModeNo,
{
unsigned short i, tempdx, tempal, modeflag;
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
- tempal = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ tempal = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
tempal = tempal & 0x3f;
tempdx = pVBInfo->TVInfo;
@@ -1743,40 +1352,35 @@ static void XGI_GetLVDSData(unsigned short ModeNo, unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo)
{
- unsigned short tempbx;
- struct SiS_LVDSData *LCDPtr = NULL;
+ struct SiS_LVDSData const *LCDPtr;
- tempbx = 2;
+ if (!(pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)))
+ return;
- if (pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) {
- LCDPtr = XGI_GetLcdPtr(tempbx, ModeNo, ModeIdIndex,
- RefreshRateTableIndex, pVBInfo);
- pVBInfo->VGAHT = LCDPtr->VGAHT;
- pVBInfo->VGAVT = LCDPtr->VGAVT;
- pVBInfo->HT = LCDPtr->LCDHT;
- pVBInfo->VT = LCDPtr->LCDVT;
- }
+ LCDPtr = XGI_GetLcdPtr(XGI_EPLLCDDataPtr, ModeNo, ModeIdIndex,
+ RefreshRateTableIndex, pVBInfo);
+ pVBInfo->VGAHT = LCDPtr->VGAHT;
+ pVBInfo->VGAVT = LCDPtr->VGAVT;
+ pVBInfo->HT = LCDPtr->LCDHT;
+ pVBInfo->VT = LCDPtr->LCDVT;
- if (pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) {
- if (!(pVBInfo->LCDInfo & (SetLCDtoNonExpanding
- | EnableScalingLCD))) {
- if ((pVBInfo->LCDResInfo == Panel_1024x768) ||
- (pVBInfo->LCDResInfo == Panel_1024x768x75)) {
- pVBInfo->HDE = 1024;
- pVBInfo->VDE = 768;
- } else if ((pVBInfo->LCDResInfo == Panel_1280x1024) ||
- (pVBInfo->LCDResInfo ==
- Panel_1280x1024x75)) {
- pVBInfo->HDE = 1280;
- pVBInfo->VDE = 1024;
- } else if (pVBInfo->LCDResInfo == Panel_1400x1050) {
- pVBInfo->HDE = 1400;
- pVBInfo->VDE = 1050;
- } else {
- pVBInfo->HDE = 1600;
- pVBInfo->VDE = 1200;
- }
- }
+ if (pVBInfo->LCDInfo & (SetLCDtoNonExpanding | EnableScalingLCD))
+ return;
+
+ if ((pVBInfo->LCDResInfo == Panel_1024x768) ||
+ (pVBInfo->LCDResInfo == Panel_1024x768x75)) {
+ pVBInfo->HDE = 1024;
+ pVBInfo->VDE = 768;
+ } else if ((pVBInfo->LCDResInfo == Panel_1280x1024) ||
+ (pVBInfo->LCDResInfo == Panel_1280x1024x75)) {
+ pVBInfo->HDE = 1280;
+ pVBInfo->VDE = 1024;
+ } else if (pVBInfo->LCDResInfo == Panel_1400x1050) {
+ pVBInfo->HDE = 1400;
+ pVBInfo->VDE = 1050;
+ } else {
+ pVBInfo->HDE = 1600;
+ pVBInfo->VDE = 1200;
}
}
@@ -1786,32 +1390,29 @@ static void XGI_ModCRT1Regs(unsigned short ModeNo, unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo)
{
unsigned char index;
- unsigned short tempbx, i;
- struct XGI_LVDSCRT1HDataStruct *LCDPtr = NULL;
- struct XGI_LVDSCRT1VDataStruct *LCDPtr1 = NULL;
+ unsigned short i;
+ struct XGI_LVDSCRT1HDataStruct const *LCDPtr = NULL;
+ struct XGI_LVDSCRT1VDataStruct const *LCDPtr1 = NULL;
- index = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
+ index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
index = index & IndexMask;
- tempbx = 0;
-
if (pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) {
- LCDPtr = XGI_GetLcdPtr(tempbx, ModeNo, ModeIdIndex,
+ LCDPtr = XGI_GetLcdPtr(xgifb_epllcd_crt1_h, ModeNo, ModeIdIndex,
RefreshRateTableIndex, pVBInfo);
for (i = 0; i < 8; i++)
- pVBInfo->TimingH[0].data[i] = LCDPtr[0].Reg[i];
+ pVBInfo->TimingH.data[i] = LCDPtr[0].Reg[i];
}
XGI_SetCRT1Timing_H(pVBInfo, HwDeviceExtension);
- tempbx = 1;
-
if (pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) {
- LCDPtr1 = XGI_GetLcdPtr(tempbx, ModeNo, ModeIdIndex,
- RefreshRateTableIndex, pVBInfo);
+ LCDPtr1 = XGI_GetLcdPtr(xgifb_epllcd_crt1_v, ModeNo,
+ ModeIdIndex, RefreshRateTableIndex,
+ pVBInfo);
for (i = 0; i < 7; i++)
- pVBInfo->TimingV[0].data[i] = LCDPtr1[0].Reg[i];
+ pVBInfo->TimingV.data[i] = LCDPtr1[0].Reg[i];
}
XGI_SetCRT1Timing_V(ModeIdIndex, ModeNo, pVBInfo);
@@ -1895,17 +1496,18 @@ static void XGI_SetLVDSRegs(unsigned short ModeNo, unsigned short ModeIdIndex,
{
unsigned short tempbx, tempax, tempcx, tempdx, push1, push2, modeflag;
unsigned long temp, temp1, temp2, temp3, push3;
- struct XGI_LCDDesStruct *LCDPtr = NULL;
- struct XGI330_LCDDataDesStruct2 *LCDPtr1 = NULL;
+ struct XGI_LCDDesStruct const *LCDPtr = NULL;
+ struct XGI330_LCDDataDesStruct2 const *LCDPtr1 = NULL;
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
- tempbx = 3;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
if (pVBInfo->LCDInfo & EnableScalingLCD)
- LCDPtr1 = XGI_GetLcdPtr(tempbx, ModeNo, ModeIdIndex,
- RefreshRateTableIndex, pVBInfo);
+ LCDPtr1 = XGI_GetLcdPtr(XGI_EPLLCDDesDataPtr, ModeNo,
+ ModeIdIndex, RefreshRateTableIndex,
+ pVBInfo);
else
- LCDPtr = XGI_GetLcdPtr(tempbx, ModeNo, ModeIdIndex,
- RefreshRateTableIndex, pVBInfo);
+ LCDPtr = XGI_GetLcdPtr(XGI_EPLLCDDesDataPtr, ModeNo,
+ ModeIdIndex, RefreshRateTableIndex,
+ pVBInfo);
XGI_GetLCDSync(&tempax, &tempbx, pVBInfo);
push1 = tempbx;
@@ -2179,7 +1781,7 @@ static unsigned char XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex,
unsigned char tempal;
/* si+Ext_ResInfo */
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
if ((pVBInfo->SetFlag & ProgrammingCRT2) &&
(!(pVBInfo->LCDInfo & EnableScalingLCD))) { /* {LCDA/LCDB} */
@@ -2241,7 +1843,7 @@ static unsigned char XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex,
if ((pVBInfo->LCDInfo & EnableScalingLCD) && (modeflag & Charx8Dot))
tempal = tempal ^ tempal; /* ; set to VCLK25MHz always */
- tempal = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
+ tempal = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
return tempal;
}
@@ -2425,7 +2027,7 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
{
unsigned short tempax, push, tempbx, temp, modeflag;
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
pVBInfo->SetFlag = 0;
pVBInfo->ModeType = modeflag & ModeTypeMask;
tempbx = 0;
@@ -2501,7 +2103,7 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
} else {
temp = 0x017C;
}
- } else { /* 3nd party chip */
+ } else { /* 3rd party chip */
temp = SetCRT2ToLCD;
}
@@ -2611,8 +2213,8 @@ static void XGI_GetTVInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
resinfo = 0;
if (pVBInfo->VBInfo & SetCRT2ToTV) {
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
- resinfo = pVBInfo->EModeIDTable[ModeIdIndex].Ext_RESINFO;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ resinfo = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
if (pVBInfo->VBInfo & SetCRT2ToTV) {
temp = xgifb_reg_get(pVBInfo->P3d4, 0x35);
@@ -2697,9 +2299,9 @@ static unsigned char XGI_GetLCDInfo(unsigned short ModeNo,
pVBInfo->LCDTypeInfo = 0;
pVBInfo->LCDInfo = 0;
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
/* si+Ext_ResInfo // */
- resinfo = pVBInfo->EModeIDTable[ModeIdIndex].Ext_RESINFO;
+ resinfo = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
temp = xgifb_reg_get(pVBInfo->P3d4, 0x36); /* Get LCD Res.Info */
tempbx = temp & 0x0F;
@@ -2778,9 +2380,9 @@ unsigned char XGI_SearchModeID(unsigned short ModeNo,
unsigned short *ModeIdIndex, struct vb_device_info *pVBInfo)
{
for (*ModeIdIndex = 0;; (*ModeIdIndex)++) {
- if (pVBInfo->EModeIDTable[*ModeIdIndex].Ext_ModeID == ModeNo)
+ if (XGI330_EModeIDTable[*ModeIdIndex].Ext_ModeID == ModeNo)
break;
- if (pVBInfo->EModeIDTable[*ModeIdIndex].Ext_ModeID == 0xFF)
+ if (XGI330_EModeIDTable[*ModeIdIndex].Ext_ModeID == 0xFF)
return 0;
}
@@ -3020,11 +2622,11 @@ static void XGI_GetCRT2ResInfo(unsigned short ModeNo,
{
unsigned short xres, yres, modeflag, resindex;
- resindex = pVBInfo->EModeIDTable[ModeIdIndex].Ext_RESINFO;
- xres = pVBInfo->ModeResInfo[resindex].HTotal; /* xres->ax */
- yres = pVBInfo->ModeResInfo[resindex].VTotal; /* yres->bx */
+ resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
+ xres = XGI330_ModeResInfo[resindex].HTotal; /* xres->ax */
+ yres = XGI330_ModeResInfo[resindex].VTotal; /* yres->bx */
/* si+St_ModeFlag */
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
if (modeflag & HalfDCLK)
xres *= 2;
@@ -3099,19 +2701,19 @@ static void XGI_GetRAMDAC2DATA(unsigned short ModeNo,
pVBInfo->RVBHCMAX = 1;
pVBInfo->RVBHCFACT = 1;
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
- CRT1Index = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ CRT1Index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
CRT1Index &= IndexMask;
- temp1 = (unsigned short) pVBInfo->XGINEWUB_CRT1Table[CRT1Index].CR[0];
- temp2 = (unsigned short) pVBInfo->XGINEWUB_CRT1Table[CRT1Index].CR[5];
+ temp1 = (unsigned short) XGI_CRT1Table[CRT1Index].CR[0];
+ temp2 = (unsigned short) XGI_CRT1Table[CRT1Index].CR[5];
tempax = (temp1 & 0xFF) | ((temp2 & 0x03) << 8);
- tempbx = (unsigned short) pVBInfo->XGINEWUB_CRT1Table[CRT1Index].CR[8];
+ tempbx = (unsigned short) XGI_CRT1Table[CRT1Index].CR[8];
tempcx = (unsigned short)
- pVBInfo->XGINEWUB_CRT1Table[CRT1Index].CR[14] << 8;
+ XGI_CRT1Table[CRT1Index].CR[14] << 8;
tempcx &= 0x0100;
tempcx = tempcx << 2;
tempbx |= tempcx;
- temp1 = (unsigned short) pVBInfo->XGINEWUB_CRT1Table[CRT1Index].CR[9];
+ temp1 = (unsigned short) XGI_CRT1Table[CRT1Index].CR[9];
if (temp1 & 0x01)
tempbx |= 0x0100;
@@ -3136,13 +2738,13 @@ static void XGI_GetCRT2Data(unsigned short ModeNo, unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo)
{
- unsigned short tempax = 0, tempbx, modeflag, resinfo;
+ unsigned short tempax = 0, tempbx = 0, modeflag, resinfo;
- struct SiS_LCDData *LCDPtr = NULL;
+ struct SiS_LCDData const *LCDPtr = NULL;
/* si+Ext_ResInfo */
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
- resinfo = pVBInfo->EModeIDTable[ModeIdIndex].Ext_RESINFO;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ resinfo = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
pVBInfo->NewFlickerMode = 0;
pVBInfo->RVBHRS = 50;
@@ -3152,10 +2754,8 @@ static void XGI_GetCRT2Data(unsigned short ModeNo, unsigned short ModeIdIndex,
return;
}
- tempbx = 4;
-
if (pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) {
- LCDPtr = XGI_GetLcdPtr(tempbx, ModeNo, ModeIdIndex,
+ LCDPtr = XGI_GetLcdPtr(XGI_LCDDataTable, ModeNo, ModeIdIndex,
RefreshRateTableIndex, pVBInfo);
pVBInfo->RVBHCMAX = LCDPtr->RVBHCMAX;
@@ -3345,7 +2945,7 @@ static unsigned short XGI_GetColorDepth(unsigned short ModeNo,
short index;
unsigned short modeflag;
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
index = (modeflag & ModeTypeMask) - ModeEGA;
if (index < 0)
@@ -3363,12 +2963,12 @@ static unsigned short XGI_GetOffset(unsigned short ModeNo,
unsigned short temp, colordepth, modeinfo, index, infoflag,
ColorDepth[] = { 0x01, 0x02, 0x04 };
- modeinfo = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeInfo;
- infoflag = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_InfoFlag;
+ modeinfo = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeInfo;
+ infoflag = XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag;
index = (modeinfo >> 8) & 0xFF;
- temp = pVBInfo->ScreenOffset[index];
+ temp = XGI330_ScreenOffset[index];
if (infoflag & InterlaceMode)
temp = temp << 1;
@@ -3424,9 +3024,9 @@ static void XGI_PreSetGroup1(unsigned short ModeNo, unsigned short ModeIdIndex,
{
unsigned short tempcx = 0, CRT1Index = 0, resinfo = 0;
- CRT1Index = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
+ CRT1Index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
CRT1Index &= IndexMask;
- resinfo = pVBInfo->EModeIDTable[ModeIdIndex].Ext_RESINFO;
+ resinfo = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
XGI_SetCRT2Offset(ModeNo, ModeIdIndex, RefreshRateTableIndex,
HwDeviceExtension, pVBInfo);
@@ -3447,10 +3047,10 @@ static void XGI_SetGroup1(unsigned short ModeNo, unsigned short ModeIdIndex,
unsigned short temp = 0, tempax = 0, tempbx = 0, tempcx = 0,
pushbx = 0, CRT1Index = 0, modeflag, resinfo = 0;
- CRT1Index = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
+ CRT1Index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
CRT1Index &= IndexMask;
- resinfo = pVBInfo->EModeIDTable[ModeIdIndex].Ext_RESINFO;
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ resinfo = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
/* bainy change table name */
if (modeflag & HalfDCLK) {
@@ -3469,14 +3069,13 @@ static void XGI_SetGroup1(unsigned short ModeNo, unsigned short ModeIdIndex,
tempcx += tempbx;
if (pVBInfo->VBInfo & SetCRT2ToRAMDAC) {
- tempbx = pVBInfo->XGINEWUB_CRT1Table[CRT1Index].CR[4];
- tempbx |= ((pVBInfo->
- XGINEWUB_CRT1Table[CRT1Index].CR[14] &
+ tempbx = XGI_CRT1Table[CRT1Index].CR[4];
+ tempbx |= ((XGI_CRT1Table[CRT1Index].CR[14] &
0xC0) << 2);
tempbx = (tempbx - 3) << 3; /* (VGAHRS-3)*8 */
- tempcx = pVBInfo->XGINEWUB_CRT1Table[CRT1Index].CR[5];
+ tempcx = XGI_CRT1Table[CRT1Index].CR[5];
tempcx &= 0x1F;
- temp = pVBInfo->XGINEWUB_CRT1Table[CRT1Index].CR[15];
+ temp = XGI_CRT1Table[CRT1Index].CR[15];
temp = (temp & 0x04) << (5 - 2); /* VGAHRE D[5] */
tempcx = ((tempcx | temp) - 3) << 3; /* (VGAHRE-3)*8 */
}
@@ -3505,14 +3104,13 @@ static void XGI_SetGroup1(unsigned short ModeNo, unsigned short ModeIdIndex,
tempcx += tempbx;
if (pVBInfo->VBInfo & SetCRT2ToRAMDAC) {
- tempbx = pVBInfo->XGINEWUB_CRT1Table[CRT1Index].CR[3];
- tempbx |= ((pVBInfo->
- XGINEWUB_CRT1Table[CRT1Index].CR[5] &
+ tempbx = XGI_CRT1Table[CRT1Index].CR[3];
+ tempbx |= ((XGI_CRT1Table[CRT1Index].CR[5] &
0xC0) << 2);
tempbx = (tempbx - 3) << 3; /* (VGAHRS-3)*8 */
- tempcx = pVBInfo->XGINEWUB_CRT1Table[CRT1Index].CR[4];
+ tempcx = XGI_CRT1Table[CRT1Index].CR[4];
tempcx &= 0x1F;
- temp = pVBInfo->XGINEWUB_CRT1Table[CRT1Index].CR[6];
+ temp = XGI_CRT1Table[CRT1Index].CR[6];
temp = (temp & 0x04) << (5 - 2); /* VGAHRE D[5] */
tempcx = ((tempcx | temp) - 3) << 3; /* (VGAHRE-3)*8 */
tempbx += 16;
@@ -3554,8 +3152,8 @@ static void XGI_SetGroup1(unsigned short ModeNo, unsigned short ModeIdIndex,
tempcx = ((pVBInfo->VGAVT - pVBInfo->VGAVDE) >> 4) + tempbx + 1;
if (pVBInfo->VBInfo & SetCRT2ToRAMDAC) {
- tempbx = pVBInfo->XGINEWUB_CRT1Table[CRT1Index].CR[10];
- temp = pVBInfo->XGINEWUB_CRT1Table[CRT1Index].CR[9];
+ tempbx = XGI_CRT1Table[CRT1Index].CR[10];
+ temp = XGI_CRT1Table[CRT1Index].CR[9];
if (temp & 0x04)
tempbx |= 0x0100;
@@ -3563,12 +3161,12 @@ static void XGI_SetGroup1(unsigned short ModeNo, unsigned short ModeIdIndex,
if (temp & 0x080)
tempbx |= 0x0200;
- temp = pVBInfo->XGINEWUB_CRT1Table[CRT1Index].CR[14];
+ temp = XGI_CRT1Table[CRT1Index].CR[14];
if (temp & 0x08)
tempbx |= 0x0400;
- temp = pVBInfo->XGINEWUB_CRT1Table[CRT1Index].CR[11];
+ temp = XGI_CRT1Table[CRT1Index].CR[11];
tempcx = (tempcx & 0xFF00) | (temp & 0x00FF);
}
@@ -3609,9 +3207,9 @@ static void XGI_SetLockRegs(unsigned short ModeNo, unsigned short ModeIdIndex,
modeflag, CRT1Index;
/* si+Ext_ResInfo */
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
- resinfo = pVBInfo->EModeIDTable[ModeIdIndex].Ext_RESINFO;
- CRT1Index = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ resinfo = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
+ CRT1Index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
CRT1Index &= IndexMask;
if (!(pVBInfo->VBInfo & SetInSlaveMode))
@@ -3909,9 +3507,9 @@ static void XGI_SetGroup2(unsigned short ModeNo, unsigned short ModeIdIndex,
unsigned long longtemp, tempeax, tempebx, temp2, tempecx;
/* si+Ext_ResInfo */
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
- resinfo = pVBInfo->EModeIDTable[ModeIdIndex].Ext_RESINFO;
- crt2crtc = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ resinfo = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
+ crt2crtc = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
tempax = 0;
@@ -4345,12 +3943,12 @@ static void XGI_SetLCDRegs(unsigned short ModeNo, unsigned short ModeIdIndex,
unsigned short push1, push2, pushbx, tempax, tempbx, tempcx, temp,
tempah, tempbh, tempch, resinfo, modeflag, CRT1Index;
- struct XGI_LCDDesStruct *LCDBDesPtr = NULL;
+ struct XGI_LCDDesStruct const *LCDBDesPtr = NULL;
/* si+Ext_ResInfo */
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
- resinfo = pVBInfo->EModeIDTable[ModeIdIndex].Ext_RESINFO;
- CRT1Index = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ resinfo = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
+ CRT1Index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
CRT1Index &= IndexMask;
if (!(pVBInfo->VBInfo & SetCRT2ToLCD))
@@ -4390,10 +3988,15 @@ static void XGI_SetLCDRegs(unsigned short ModeNo, unsigned short ModeIdIndex,
xgifb_reg_and_or(pVBInfo->Part2Port, 0x17, 0xFB, 0x00);
xgifb_reg_and_or(pVBInfo->Part2Port, 0x18, 0xDF, 0x00);
- /* Customized LCDB Des no add */
- tempbx = 5;
- LCDBDesPtr = XGI_GetLcdPtr(tempbx, ModeNo, ModeIdIndex,
- RefreshRateTableIndex, pVBInfo);
+ /* Customized LCDB Does not add */
+ if ((pVBInfo->VBType & VB_SIS301LV) || (pVBInfo->VBType & VB_SIS302LV))
+ LCDBDesPtr = XGI_GetLcdPtr(xgifb_lcddldes, ModeNo, ModeIdIndex,
+ RefreshRateTableIndex, pVBInfo);
+ else
+ LCDBDesPtr = XGI_GetLcdPtr(XGI_LCDDesDataTable, ModeNo,
+ ModeIdIndex, RefreshRateTableIndex,
+ pVBInfo);
+
tempah = pVBInfo->LCDResInfo;
tempah &= PanelResInfo;
@@ -4545,12 +4148,11 @@ static void XGI_SetLCDRegs(unsigned short ModeNo, unsigned short ModeIdIndex,
/* Output : di -> Tap4 Reg. Setting Pointer */
/* Description : */
/* --------------------------------------------------------------------- */
-static struct XGI301C_Tap4TimingStruct *XGI_GetTap4Ptr(unsigned short tempcx,
- struct vb_device_info *pVBInfo)
+static struct XGI301C_Tap4TimingStruct const
+*XGI_GetTap4Ptr(unsigned short tempcx, struct vb_device_info *pVBInfo)
{
unsigned short tempax, tempbx, i;
-
- struct XGI301C_Tap4TimingStruct *Tap4TimingPtr;
+ struct XGI301C_Tap4TimingStruct const *Tap4TimingPtr;
if (tempcx == 0) {
tempax = pVBInfo->VGAHDE;
@@ -4591,8 +4193,7 @@ static struct XGI301C_Tap4TimingStruct *XGI_GetTap4Ptr(unsigned short tempcx,
static void XGI_SetTap4Regs(struct vb_device_info *pVBInfo)
{
unsigned short i, j;
-
- struct XGI301C_Tap4TimingStruct *Tap4TimingPtr;
+ struct XGI301C_Tap4TimingStruct const *Tap4TimingPtr;
if (!(pVBInfo->VBType & VB_XGI301C))
return;
@@ -4628,7 +4229,7 @@ static void XGI_SetGroup3(unsigned short ModeNo, unsigned short ModeIdIndex,
unsigned short modeflag;
/* si+Ext_ResInfo */
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
xgifb_reg_set(pVBInfo->Part3Port, 0x00, 0x00);
if (pVBInfo->TVInfo & TVSetPAL) {
@@ -4687,7 +4288,7 @@ static void XGI_SetGroup4(unsigned short ModeNo, unsigned short ModeIdIndex,
unsigned long tempebx, tempeax, templong;
/* si+Ext_ResInfo */
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
temp = pVBInfo->RVBHCFACT;
xgifb_reg_set(pVBInfo->Part4Port, 0x13, temp);
@@ -4890,11 +4491,11 @@ static unsigned char XGI_XG21CheckLVDSMode(struct xgifb_video_info *xgifb_info,
{
unsigned short xres, yres, colordepth, modeflag, resindex;
- resindex = pVBInfo->EModeIDTable[ModeIdIndex].Ext_RESINFO;
- xres = pVBInfo->ModeResInfo[resindex].HTotal; /* xres->ax */
- yres = pVBInfo->ModeResInfo[resindex].VTotal; /* yres->bx */
+ resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
+ xres = XGI330_ModeResInfo[resindex].HTotal; /* xres->ax */
+ yres = XGI330_ModeResInfo[resindex].VTotal; /* yres->bx */
/* si+St_ModeFlag */
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
if (!(modeflag & Charx8Dot)) {
xres /= 9;
@@ -4952,11 +4553,11 @@ static void xgifb_set_lvds(struct xgifb_video_info *xgifb_info,
else
XGI_SetXG21FPBits(pVBInfo);
- resindex = pVBInfo->EModeIDTable[ModeIdIndex].Ext_RESINFO;
- xres = pVBInfo->ModeResInfo[resindex].HTotal; /* xres->ax */
- yres = pVBInfo->ModeResInfo[resindex].VTotal; /* yres->bx */
+ resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
+ xres = XGI330_ModeResInfo[resindex].HTotal; /* xres->ax */
+ yres = XGI330_ModeResInfo[resindex].VTotal; /* yres->bx */
/* si+St_ModeFlag */
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
if (!(modeflag & Charx8Dot))
xres = xres * 8 / 9;
@@ -5619,8 +5220,8 @@ static void XGI_SetYFilter(unsigned short ModeNo, unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo)
{
unsigned short tempbx, index;
-
- unsigned char tempcl, tempch, tempal, *filterPtr;
+ unsigned char const *filterPtr;
+ unsigned char tempcl, tempch, tempal;
XGI_GetTVPtrIndex2(&tempbx, &tempcl, &tempch, pVBInfo); /* bx, cl, ch */
@@ -5653,7 +5254,7 @@ static void XGI_SetYFilter(unsigned short ModeNo, unsigned short ModeIdIndex,
return;
}
- tempal = pVBInfo->EModeIDTable[ModeIdIndex].VB_ExtTVYFilterIndex;
+ tempal = XGI330_EModeIDTable[ModeIdIndex].VB_ExtTVYFilterIndex;
if (tempcl == 0)
index = tempal * 4;
else
@@ -5915,7 +5516,7 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE,
unsigned short RefreshRateTableIndex, i, modeflag, index, temp;
- modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
index = xgifb_reg_get(pVBInfo->P3d4, 0x33);
index = index >> pVBInfo->SelectCRT2Rate;
@@ -5948,31 +5549,30 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE,
}
}
- RefreshRateTableIndex = pVBInfo->EModeIDTable[ModeIdIndex].REFindex;
- ModeNo = pVBInfo->RefIndex[RefreshRateTableIndex].ModeID;
+ RefreshRateTableIndex = XGI330_EModeIDTable[ModeIdIndex].REFindex;
+ ModeNo = XGI330_RefIndex[RefreshRateTableIndex].ModeID;
if (pXGIHWDE->jChipType >= XG20) { /* for XG20, XG21, XG27 */
- if ((pVBInfo->RefIndex[RefreshRateTableIndex].XRes == 800) &&
- (pVBInfo->RefIndex[RefreshRateTableIndex].YRes == 600)) {
+ if ((XGI330_RefIndex[RefreshRateTableIndex].XRes == 800) &&
+ (XGI330_RefIndex[RefreshRateTableIndex].YRes == 600)) {
index++;
}
/* do the similar adjustment like XGISearchCRT1Rate() */
- if ((pVBInfo->RefIndex[RefreshRateTableIndex].XRes == 1024) &&
- (pVBInfo->RefIndex[RefreshRateTableIndex].YRes == 768)) {
+ if ((XGI330_RefIndex[RefreshRateTableIndex].XRes == 1024) &&
+ (XGI330_RefIndex[RefreshRateTableIndex].YRes == 768)) {
index++;
}
- if ((pVBInfo->RefIndex[RefreshRateTableIndex].XRes == 1280) &&
- (pVBInfo->RefIndex[RefreshRateTableIndex].YRes == 1024)) {
+ if ((XGI330_RefIndex[RefreshRateTableIndex].XRes == 1280) &&
+ (XGI330_RefIndex[RefreshRateTableIndex].YRes == 1024)) {
index++;
}
}
i = 0;
do {
- if (pVBInfo->RefIndex[RefreshRateTableIndex + i].
+ if (XGI330_RefIndex[RefreshRateTableIndex + i].
ModeID != ModeNo)
break;
- temp = pVBInfo->RefIndex[RefreshRateTableIndex + i].
- Ext_InfoFlag;
+ temp = XGI330_RefIndex[RefreshRateTableIndex + i].Ext_InfoFlag;
temp &= ModeTypeMask;
if (temp < pVBInfo->ModeType)
break;
@@ -5982,7 +5582,7 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE,
} while (index != 0xFFFF);
if (!(pVBInfo->VBInfo & SetCRT2ToRAMDAC)) {
if (pVBInfo->VBInfo & SetInSlaveMode) {
- temp = pVBInfo->RefIndex[RefreshRateTableIndex + i - 1].
+ temp = XGI330_RefIndex[RefreshRateTableIndex + i - 1].
Ext_InfoFlag;
if (temp & InterlaceMode)
i++;
@@ -6272,7 +5872,7 @@ static void XGI_SetCRT1Group(struct xgifb_video_info *xgifb_info,
unsigned short RefreshRateTableIndex, temp;
XGI_SetSeqRegs(ModeNo, ModeIdIndex, pVBInfo);
- outb(pVBInfo->StandTable->MISC, pVBInfo->P3c2);
+ outb(XGI330_StandTable.MISC, pVBInfo->P3c2);
XGI_SetCRTCRegs(HwDeviceExtension, pVBInfo);
XGI_SetATTRegs(ModeNo, ModeIdIndex, pVBInfo);
XGI_SetGRCRegs(pVBInfo);
@@ -6458,7 +6058,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
pVBInfo))
return 0;
- pVBInfo->ModeType = pVBInfo->EModeIDTable[ModeIdIndex].
+ pVBInfo->ModeType = XGI330_EModeIDTable[ModeIdIndex].
Ext_ModeFlag & ModeTypeMask;
pVBInfo->SetFlag = 0;
diff --git a/drivers/staging/xgifb/vb_struct.h b/drivers/staging/xgifb/vb_struct.h
index 70158c2..acf6e7f 100644
--- a/drivers/staging/xgifb/vb_struct.h
+++ b/drivers/staging/xgifb/vb_struct.h
@@ -56,7 +56,7 @@ struct XGI330_LCDDataTablStruct {
unsigned char PANELID;
unsigned short MASK;
unsigned short CAP;
- unsigned short DATAPTR;
+ void const *DATAPTR;
};
struct XGI330_TVDataTablStruct {
@@ -158,40 +158,18 @@ struct vb_device_info {
void __iomem *FBAddr;
unsigned long BaseAddr;
- unsigned char (*CR6B)[4];
- unsigned char (*CR6E)[4];
- unsigned char (*CR6F)[32];
- unsigned char (*CR89)[2];
+ unsigned char const (*SR15)[8];
+ unsigned char const (*CR40)[8];
- unsigned char (*SR15)[8];
- unsigned char (*CR40)[8];
+ struct SiS_MCLKData const *MCLKData;
- unsigned char *AGPReg;
- unsigned char *SR16;
- unsigned char SR21;
- unsigned char SR22;
- unsigned char SR25;
- struct SiS_MCLKData *MCLKData;
- struct XGI_ECLKDataStruct *ECLKData;
-
- unsigned char *ScreenOffset;
unsigned char *pXGINew_DRAMTypeDefinition;
unsigned char XGINew_CR97;
- struct XGI330_LCDCapStruct *LCDCapList;
-
- struct XGI_TimingHStruct *TimingH;
- struct XGI_TimingVStruct *TimingV;
+ struct XGI330_LCDCapStruct const *LCDCapList;
- struct SiS_StandTable_S *StandTable;
- struct XGI_ExtStruct *EModeIDTable;
- struct XGI_Ext2Struct *RefIndex;
- struct XGI_CRT1TableStruct *XGINEWUB_CRT1Table;
- struct SiS_VCLKData *VCLKData;
- struct SiS_VBVCLKData *VBVCLKData;
- struct SiS_StResInfo_S *StResInfo;
- struct SiS_ModeResInfo_S *ModeResInfo;
- struct XGI_XG21CRT1Struct *UpdateCRT1;
+ struct XGI_TimingHStruct TimingH;
+ struct XGI_TimingVStruct TimingV;
int ram_type;
int ram_channel;
diff --git a/drivers/staging/xgifb/vb_table.h b/drivers/staging/xgifb/vb_table.h
index 180aae0..39f528b 100644
--- a/drivers/staging/xgifb/vb_table.h
+++ b/drivers/staging/xgifb/vb_table.h
@@ -1,6 +1,6 @@
#ifndef _VB_TABLE_
#define _VB_TABLE_
-static struct SiS_MCLKData XGI340New_MCLKData[] = {
+static const struct SiS_MCLKData XGI340New_MCLKData[] = {
{0x16, 0x01, 0x01, 166},
{0x19, 0x02, 0x01, 124},
{0x7C, 0x08, 0x01, 200},
@@ -11,7 +11,7 @@ static struct SiS_MCLKData XGI340New_MCLKData[] = {
{0x5c, 0x23, 0x01, 166}
};
-static struct SiS_MCLKData XGI27New_MCLKData[] = {
+static const struct SiS_MCLKData XGI27New_MCLKData[] = {
{0x5c, 0x23, 0x01, 166},
{0x19, 0x02, 0x01, 124},
{0x7C, 0x08, 0x80, 200},
@@ -22,7 +22,7 @@ static struct SiS_MCLKData XGI27New_MCLKData[] = {
{0x5c, 0x23, 0x01, 166}
};
-static struct XGI_ECLKDataStruct XGI340_ECLKData[] = {
+const struct XGI_ECLKDataStruct XGI340_ECLKData[] = {
{0x5c, 0x23, 0x01, 166},
{0x55, 0x84, 0x01, 123},
{0x7C, 0x08, 0x01, 200},
@@ -33,21 +33,21 @@ static struct XGI_ECLKDataStruct XGI340_ECLKData[] = {
{0x5c, 0x23, 0x01, 166}
};
-static unsigned char XG27_SR13[4][8] = {
+static const unsigned char XG27_SR13[4][8] = {
{0x35, 0x45, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x00}, /* SR13 */
{0x41, 0x51, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00}, /* SR14 */
{0x32, 0x32, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00}, /* SR18 */
{0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00} /* SR1B */
};
-static unsigned char XGI340_SR13[4][8] = {
+static const unsigned char XGI340_SR13[4][8] = {
{0x35, 0x45, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x00}, /* SR13 */
{0x41, 0x51, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00}, /* SR14 */
{0x31, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00}, /* SR18 */
{0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00} /* SR1B */
};
-static unsigned char XGI340_cr41[24][8] = {
+static const unsigned char XGI340_cr41[24][8] = {
{0x20, 0x50, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0 CR41 */
{0xc4, 0x40, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 1 CR8A */
{0xc4, 0x40, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 2 CR8B */
@@ -74,7 +74,7 @@ static unsigned char XGI340_cr41[24][8] = {
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} /* 23 CRC5 */
};
-static unsigned char XGI27_cr41[24][8] = {
+static const unsigned char XGI27_cr41[24][8] = {
{0x20, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0 CR41 */
{0xC4, 0x40, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 1 CR8A */
{0xC4, 0x40, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 2 CR8B */
@@ -103,7 +103,7 @@ static unsigned char XGI27_cr41[24][8] = {
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} /* 23 CRC5 */
};
-static unsigned char XGI340_CR6B[8][4] = {
+const unsigned char XGI340_CR6B[8][4] = {
{0xaa, 0xaa, 0xaa, 0xaa},
{0xaa, 0xaa, 0xaa, 0xaa},
{0xaa, 0xaa, 0xaa, 0xaa},
@@ -114,21 +114,13 @@ static unsigned char XGI340_CR6B[8][4] = {
{0x00, 0x00, 0x00, 0x00}
};
-static unsigned char XGI340_CR6E[8][4];
-
-static unsigned char XGI340_CR6F[8][32];
-
-static unsigned char XGI340_CR89[8][2];
-
/* CR47,CR48,CR49,CR4A,CR4B,CR4C,CR70,CR71,CR74,CR75,CR76,CR77 */
-static unsigned char XGI340_AGPReg[12] = {
+const unsigned char XGI340_AGPReg[12] = {
0x28, 0x23, 0x00, 0x20, 0x00, 0x20,
0x00, 0x05, 0xd0, 0x10, 0x10, 0x00
};
-static unsigned char XGI340_SR16[4] = {0x03, 0x83, 0x03, 0x83};
-
-static struct XGI_ExtStruct XGI330_EModeIDTable[] = {
+const struct XGI_ExtStruct XGI330_EModeIDTable[] = {
{0x2e, 0x0a1b, 0x0306, 0x06, 0x05, 0x06},
{0x2f, 0x0a1b, 0x0305, 0x05, 0x05, 0x05},
{0x30, 0x2a1b, 0x0407, 0x07, 0x07, 0x0e},
@@ -200,7 +192,7 @@ static struct XGI_ExtStruct XGI330_EModeIDTable[] = {
{0xff, 0x0000, 0x0000, 0x00, 0x00, 0x00}
};
-static struct SiS_StandTable_S XGI330_StandTable = {
+static const struct SiS_StandTable_S XGI330_StandTable = {
/* ExtVGATable */
0x00, 0x00, 0x00, 0x0000,
{0x01, 0x0f, 0x00, 0x0e},
@@ -216,11 +208,7 @@ static struct SiS_StandTable_S XGI330_StandTable = {
0xff}
};
-static struct XGI_TimingHStruct XGI_TimingH[1];
-
-static struct XGI_TimingVStruct XGI_TimingV[1];
-
-static struct XGI_XG21CRT1Struct XGI_UpdateCRT1Table[] = {
+static const struct XGI_XG21CRT1Struct XGI_UpdateCRT1Table[] = {
{0x01, 0x27, 0x91, 0x8f, 0xc0}, /* 00 */
{0x03, 0x4f, 0x83, 0x8f, 0xc0}, /* 01 */
{0x05, 0x27, 0x91, 0x8f, 0xc0}, /* 02 */
@@ -240,7 +228,7 @@ static struct XGI_XG21CRT1Struct XGI_UpdateCRT1Table[] = {
{0x59, 0x27, 0x91, 0x8f, 0xc0} /* 16 */
};
-static struct XGI_CRT1TableStruct XGI_CRT1Table[] = {
+const struct XGI_CRT1TableStruct XGI_CRT1Table[] = {
{ {0x2d, 0x28, 0x90, 0x2c, 0x90, 0x00, 0x04, 0x00,
0xbf, 0x1f, 0x9c, 0x8e, 0x96, 0xb9, 0x30} }, /* 0x0 */
{ {0x2d, 0x28, 0x90, 0x2c, 0x90, 0x00, 0x04, 0x00,
@@ -404,7 +392,7 @@ static struct XGI_CRT1TableStruct XGI_CRT1Table[] = {
};
/*add for new UNIVGABIOS*/
-static struct SiS_LCDData XGI_StLCD1024x768Data[] = {
+static const struct SiS_LCDData XGI_StLCD1024x768Data[] = {
{62, 25, 800, 546, 1344, 806},
{32, 15, 930, 546, 1344, 806},
{62, 25, 800, 546, 1344, 806}, /*chiawenfordot9->dot8*/
@@ -414,7 +402,7 @@ static struct SiS_LCDData XGI_StLCD1024x768Data[] = {
{1, 1, 1344, 806, 1344, 806}
};
-static struct SiS_LCDData XGI_ExtLCD1024x768Data[] = {
+static const struct SiS_LCDData XGI_ExtLCD1024x768Data[] = {
{42, 25, 1536, 419, 1344, 806},
{48, 25, 1536, 369, 1344, 806},
{42, 25, 1536, 419, 1344, 806},
@@ -430,7 +418,7 @@ static struct SiS_LCDData XGI_ExtLCD1024x768Data[] = {
{1, 1, 1344, 806, 1344, 806}
};
-static struct SiS_LCDData XGI_CetLCD1024x768Data[] = {
+static const struct SiS_LCDData XGI_CetLCD1024x768Data[] = {
{1, 1, 1344, 806, 1344, 806}, /* ; 00 (320x200,320x400,
640x200,640x400) */
{1, 1, 1344, 806, 1344, 806}, /* 01 (320x350,640x350) */
@@ -441,7 +429,7 @@ static struct SiS_LCDData XGI_CetLCD1024x768Data[] = {
{1, 1, 1344, 806, 1344, 806} /* 06 (1024x768x60Hz) */
};
-static struct SiS_LCDData XGI_StLCD1280x1024Data[] = {
+static const struct SiS_LCDData XGI_StLCD1280x1024Data[] = {
{22, 5, 800, 510, 1650, 1088},
{22, 5, 800, 510, 1650, 1088},
{176, 45, 900, 510, 1650, 1088},
@@ -452,7 +440,7 @@ static struct SiS_LCDData XGI_StLCD1280x1024Data[] = {
{1, 1, 1688, 1066, 1688, 1066}
};
-static struct SiS_LCDData XGI_ExtLCD1280x1024Data[] = {
+static const struct SiS_LCDData XGI_ExtLCD1280x1024Data[] = {
{211, 60, 1024, 501, 1688, 1066},
{211, 60, 1024, 508, 1688, 1066},
{211, 60, 1024, 501, 1688, 1066},
@@ -463,7 +451,7 @@ static struct SiS_LCDData XGI_ExtLCD1280x1024Data[] = {
{1, 1, 1688, 1066, 1688, 1066}
};
-static struct SiS_LCDData XGI_CetLCD1280x1024Data[] = {
+static const struct SiS_LCDData XGI_CetLCD1280x1024Data[] = {
{1, 1, 1688, 1066, 1688, 1066}, /* 00 (320x200,320x400,
640x200,640x400) */
{1, 1, 1688, 1066, 1688, 1066}, /* 01 (320x350,640x350) */
@@ -476,7 +464,7 @@ static struct SiS_LCDData XGI_CetLCD1280x1024Data[] = {
{1, 1, 1688, 1066, 1688, 1066} /* 08 (1400x1050x60Hz) */
};
-static struct SiS_LCDData xgifb_lcd_1400x1050[] = {
+static const struct SiS_LCDData xgifb_lcd_1400x1050[] = {
{211, 100, 2100, 408, 1688, 1066}, /* 00 (320x200,320x400,
640x200,640x400) */
{211, 64, 1536, 358, 1688, 1066}, /* 01 (320x350,640x350) */
@@ -490,7 +478,7 @@ static struct SiS_LCDData xgifb_lcd_1400x1050[] = {
{1, 1, 1688, 1066, 1688, 1066} /* 08 (1400x1050x60Hz) */
};
-static struct SiS_LCDData XGI_ExtLCD1600x1200Data[] = {
+static const struct SiS_LCDData XGI_ExtLCD1600x1200Data[] = {
{4, 1, 1620, 420, 2160, 1250}, /* 00 (320x200,320x400,
640x200,640x400)*/
{27, 7, 1920, 375, 2160, 1250}, /* 01 (320x350,640x350) */
@@ -504,7 +492,7 @@ static struct SiS_LCDData XGI_ExtLCD1600x1200Data[] = {
{1, 1, 2160, 1250, 2160, 1250} /* 09 (1600x1200x60Hz) ;302lv */
};
-static struct SiS_LCDData XGI_StLCD1600x1200Data[] = {
+static const struct SiS_LCDData XGI_StLCD1600x1200Data[] = {
{27, 4, 800, 500, 2160, 1250}, /* 00 (320x200,320x400,
640x200,640x400) */
{27, 4, 800, 500, 2160, 1250}, /* 01 (320x350,640x350) */
@@ -520,7 +508,7 @@ static struct SiS_LCDData XGI_StLCD1600x1200Data[] = {
#define XGI_CetLCD1400x1050Data XGI_CetLCD1280x1024Data
-static struct SiS_LCDData XGI_NoScalingData[] = {
+static const struct SiS_LCDData XGI_NoScalingData[] = {
{1, 1, 800, 449, 800, 449},
{1, 1, 800, 449, 800, 449},
{1, 1, 900, 449, 900, 449},
@@ -531,7 +519,7 @@ static struct SiS_LCDData XGI_NoScalingData[] = {
{1, 1, 1688, 1066, 1688, 1066}
};
-static struct SiS_LCDData XGI_ExtLCD1024x768x75Data[] = {
+static const struct SiS_LCDData XGI_ExtLCD1024x768x75Data[] = {
{42, 25, 1536, 419, 1344, 806}, /* ; 00 (320x200,320x400,
640x200,640x400) */
{48, 25, 1536, 369, 1344, 806}, /* ; 01 (320x350,640x350) */
@@ -542,7 +530,7 @@ static struct SiS_LCDData XGI_ExtLCD1024x768x75Data[] = {
{1, 1, 1312, 800, 1312, 800} /* ; 06 (1024x768x75Hz) */
};
-static struct SiS_LCDData XGI_CetLCD1024x768x75Data[] = {
+static const struct SiS_LCDData XGI_CetLCD1024x768x75Data[] = {
{1, 1, 1312, 800, 1312, 800}, /* ; 00 (320x200,320x400,
640x200,640x400) */
{1, 1, 1312, 800, 1312, 800}, /* ; 01 (320x350,640x350) */
@@ -553,7 +541,7 @@ static struct SiS_LCDData XGI_CetLCD1024x768x75Data[] = {
{1, 1, 1312, 800, 1312, 800} /* ; 06 (1024x768x75Hz) */
};
-static struct SiS_LCDData xgifb_lcd_1280x1024x75[] = {
+static const struct SiS_LCDData xgifb_lcd_1280x1024x75[] = {
{211, 60, 1024, 501, 1688, 1066}, /* ; 00 (320x200,320x400,
640x200,640x400) */
{211, 60, 1024, 508, 1688, 1066}, /* ; 01 (320x350,640x350) */
@@ -567,7 +555,7 @@ static struct SiS_LCDData xgifb_lcd_1280x1024x75[] = {
#define XGI_CetLCD1280x1024x75Data XGI_CetLCD1280x1024Data
-static struct SiS_LCDData XGI_NoScalingDatax75[] = {
+static const struct SiS_LCDData XGI_NoScalingDatax75[] = {
{1, 1, 800, 449, 800, 449}, /* ; 00 (320x200, 320x400,
640x200, 640x400) */
{1, 1, 800, 449, 800, 449}, /* ; 01 (320x350, 640x350) */
@@ -582,7 +570,7 @@ static struct SiS_LCDData XGI_NoScalingDatax75[] = {
{1, 1, 1688, 806, 1688, 806} /* ; 0A (1280x768x75Hz) */
};
-static struct XGI_LCDDesStruct XGI_ExtLCDDes1024x768Data[] = {
+static const struct XGI_LCDDesStruct XGI_ExtLCDDes1024x768Data[] = {
{9, 1057, 0, 771}, /* ; 00 (320x200,320x400,640x200,640x400) */
{9, 1057, 0, 771}, /* ; 01 (320x350,640x350) */
{9, 1057, 0, 771}, /* ; 02 (360x400,720x400) */
@@ -592,7 +580,7 @@ static struct XGI_LCDDesStruct XGI_ExtLCDDes1024x768Data[] = {
{9, 1057, 805, 770} /* ; 06 (1024x768x60Hz) */
};
-static struct XGI_LCDDesStruct XGI_StLCDDes1024x768Data[] = {
+static const struct XGI_LCDDesStruct XGI_StLCDDes1024x768Data[] = {
{9, 1057, 737, 703}, /* ; 00 (320x200,320x400,640x200,640x400) */
{9, 1057, 686, 651}, /* ; 01 (320x350,640x350) */
{9, 1057, 737, 703}, /* ; 02 (360x400,720x400) */
@@ -602,7 +590,7 @@ static struct XGI_LCDDesStruct XGI_StLCDDes1024x768Data[] = {
{9, 1057, 805, 770} /* ; 06 (1024x768x60Hz) */
};
-static struct XGI_LCDDesStruct XGI_CetLCDDes1024x768Data[] = {
+static const struct XGI_LCDDesStruct XGI_CetLCDDes1024x768Data[] = {
{1152, 856, 622, 587}, /* ; 00 (320x200,320x400,640x200,640x400) */
{1152, 856, 597, 562}, /* ; 01 (320x350,640x350) */
{1152, 856, 622, 587}, /* ; 02 (360x400,720x400) */
@@ -612,7 +600,7 @@ static struct XGI_LCDDesStruct XGI_CetLCDDes1024x768Data[] = {
{0, 1048, 805, 770} /* ; 06 (1024x768x60Hz) */
};
-static struct XGI_LCDDesStruct XGI_ExtLCDDLDes1280x1024Data[] = {
+static const struct XGI_LCDDesStruct XGI_ExtLCDDLDes1280x1024Data[] = {
{18, 1346, 981, 940}, /* 00 (320x200,320x400,640x200,640x400) */
{18, 1346, 926, 865}, /* 01 (320x350,640x350) */
{18, 1346, 981, 940}, /* 02 (360x400,720x400) */
@@ -623,7 +611,7 @@ static struct XGI_LCDDesStruct XGI_ExtLCDDLDes1280x1024Data[] = {
{18, 1346, 1065, 1024} /* 07 (1280x1024x60Hz) */
};
-static struct XGI_LCDDesStruct XGI_StLCDDLDes1280x1024Data[] = {
+static const struct XGI_LCDDesStruct XGI_StLCDDLDes1280x1024Data[] = {
{18, 1346, 970, 907}, /* 00 (320x200,320x400,640x200,640x400) */
{18, 1346, 917, 854}, /* 01 (320x350,640x350) */
{18, 1346, 970, 907}, /* 02 (360x400,720x400) */
@@ -634,7 +622,7 @@ static struct XGI_LCDDesStruct XGI_StLCDDLDes1280x1024Data[] = {
{18, 1346, 1065, 1024} /* 07 (1280x1024x60Hz) */
};
-static struct XGI_LCDDesStruct XGI_CetLCDDLDes1280x1024Data[] = {
+static const struct XGI_LCDDesStruct XGI_CetLCDDLDes1280x1024Data[] = {
{1368, 1008, 752, 711}, /* 00 (320x200,320x400,640x200,640x400) */
{1368, 1008, 729, 688}, /* 01 (320x350,640x350) */
{1368, 1008, 752, 711}, /* 02 (360x400,720x400) */
@@ -645,7 +633,7 @@ static struct XGI_LCDDesStruct XGI_CetLCDDLDes1280x1024Data[] = {
{18, 1346, 1065, 1024} /* 07 (1280x1024x60Hz) */
};
-static struct XGI_LCDDesStruct XGI_ExtLCDDes1280x1024Data[] = {
+static const struct XGI_LCDDesStruct XGI_ExtLCDDes1280x1024Data[] = {
{9, 1337, 981, 940}, /* ; 00 (320x200,320x400,640x200,640x400) */
{9, 1337, 926, 884}, /* ; 01 (320x350,640x350) alan, 2003/09/30 */
{9, 1337, 981, 940}, /* ; 02 (360x400,720x400) */
@@ -656,7 +644,7 @@ static struct XGI_LCDDesStruct XGI_ExtLCDDes1280x1024Data[] = {
{9, 1337, 1065, 1024} /* ; 07 (1280x1024x60Hz) */
};
-static struct XGI_LCDDesStruct XGI_StLCDDes1280x1024Data[] = {
+static const struct XGI_LCDDesStruct XGI_StLCDDes1280x1024Data[] = {
{9, 1337, 970, 907}, /* ; 00 (320x200,320x400,640x200,640x400) */
{9, 1337, 917, 854}, /* ; 01 (320x350,640x350) */
{9, 1337, 970, 907}, /* ; 02 (360x400,720x400) */
@@ -667,7 +655,7 @@ static struct XGI_LCDDesStruct XGI_StLCDDes1280x1024Data[] = {
{9, 1337, 1065, 1024} /* ; 07 (1280x1024x60Hz) */
};
-static struct XGI_LCDDesStruct XGI_CetLCDDes1280x1024Data[] = {
+static const struct XGI_LCDDesStruct XGI_CetLCDDes1280x1024Data[] = {
{1368, 1008, 752, 711}, /* 00 (320x200,320x400,640x200,640x400) */
{1368, 1008, 729, 688}, /* 01 (320x350,640x350) */
{1368, 1008, 752, 711}, /* 02 (360x400,720x400) */
@@ -678,7 +666,7 @@ static struct XGI_LCDDesStruct XGI_CetLCDDes1280x1024Data[] = {
{9, 1337, 1065, 1024} /* 07 (1280x1024x60Hz) */
};
-static struct XGI_LCDDesStruct xgifb_lcddldes_1400x1050[] = {
+static const struct XGI_LCDDesStruct xgifb_lcddldes_1400x1050[] = {
{18, 1464, 0, 1051}, /* 00 (320x200,320x400,640x200,640x400) */
{18, 1464, 0, 1051}, /* 01 (320x350,640x350) */
{18, 1464, 0, 1051}, /* 02 (360x400,720x400) */
@@ -690,7 +678,7 @@ static struct XGI_LCDDesStruct xgifb_lcddldes_1400x1050[] = {
{18, 1464, 0, 1051} /* 08 (1400x1050x60Hz) */
};
-static struct XGI_LCDDesStruct xgifb_lcddes_1400x1050[] = {
+static const struct XGI_LCDDesStruct xgifb_lcddes_1400x1050[] = {
{9, 1455, 0, 1051}, /* 00 (320x200,320x400,640x200,640x400) */
{9, 1455, 0, 1051}, /* 01 (320x350,640x350) */
{9, 1455, 0, 1051}, /* 02 (360x400,720x400) */
@@ -702,7 +690,7 @@ static struct XGI_LCDDesStruct xgifb_lcddes_1400x1050[] = {
{9, 1455, 0, 1051} /* 08 (1400x1050x60Hz) */
};
-static struct XGI_LCDDesStruct XGI_CetLCDDes1400x1050Data[] = {
+static const struct XGI_LCDDesStruct XGI_CetLCDDes1400x1050Data[] = {
{1308, 1068, 781, 766}, /* 00 (320x200,320x400,640x200,640x400) */
{1308, 1068, 781, 766}, /* 01 (320x350,640x350) */
{1308, 1068, 781, 766}, /* 02 (360x400,720x400) */
@@ -714,7 +702,7 @@ static struct XGI_LCDDesStruct XGI_CetLCDDes1400x1050Data[] = {
{18, 1464, 0, 1051} /* 08 (1400x1050x60Hz) */
};
-static struct XGI_LCDDesStruct XGI_CetLCDDes1400x1050Data2[] = {
+static const struct XGI_LCDDesStruct XGI_CetLCDDes1400x1050Data2[] = {
{0, 1448, 0, 1051}, /* 00 (320x200,320x400,640x200,640x400) */
{0, 1448, 0, 1051}, /* 01 (320x350,640x350) */
{0, 1448, 0, 1051}, /* 02 (360x400,720x400) */
@@ -722,7 +710,7 @@ static struct XGI_LCDDesStruct XGI_CetLCDDes1400x1050Data2[] = {
{0, 1448, 0, 1051} /* 04 (640x480x60Hz) */
};
-static struct XGI_LCDDesStruct XGI_ExtLCDDLDes1600x1200Data[] = {
+static const struct XGI_LCDDesStruct XGI_ExtLCDDLDes1600x1200Data[] = {
{18, 1682, 0, 1201}, /* 00 (320x200,320x400,640x200,640x400) */
{18, 1682, 0, 1201}, /* 01 (320x350,640x350) */
{18, 1682, 0, 1201}, /* 02 (360x400,720x400) */
@@ -735,7 +723,7 @@ static struct XGI_LCDDesStruct XGI_ExtLCDDLDes1600x1200Data[] = {
{18, 1682, 0, 1201} /* 09 (1600x1200x60Hz) */
};
-static struct XGI_LCDDesStruct XGI_StLCDDLDes1600x1200Data[] = {
+static const struct XGI_LCDDesStruct XGI_StLCDDLDes1600x1200Data[] = {
{18, 1682, 1150, 1101}, /* 00 (320x200,320x400,640x200,640x400) */
{18, 1682, 1083, 1034}, /* 01 (320x350,640x350) */
{18, 1682, 1150, 1101}, /* 02 (360x400,720x400) */
@@ -748,7 +736,7 @@ static struct XGI_LCDDesStruct XGI_StLCDDLDes1600x1200Data[] = {
{18, 1682, 0, 1201} /* 09 (1600x1200x60Hz) */
};
-static struct XGI_LCDDesStruct XGI_ExtLCDDes1600x1200Data[] = {
+static const struct XGI_LCDDesStruct XGI_ExtLCDDes1600x1200Data[] = {
{9, 1673, 0, 1201}, /* 00 (320x200,320x400,640x200,640x400) */
{9, 1673, 0, 1201}, /* 01 (320x350,640x350) */
{9, 1673, 0, 1201}, /* 02 (360x400,720x400) */
@@ -761,7 +749,7 @@ static struct XGI_LCDDesStruct XGI_ExtLCDDes1600x1200Data[] = {
{9, 1673, 0, 1201} /* 09 (1600x1200x60Hz) */
};
-static struct XGI_LCDDesStruct XGI_StLCDDes1600x1200Data[] = {
+static const struct XGI_LCDDesStruct XGI_StLCDDes1600x1200Data[] = {
{9, 1673, 1150, 1101}, /* 00 (320x200,320x400,640x200,640x400) */
{9, 1673, 1083, 1034}, /* 01 (320x350,640x350) */
{9, 1673, 1150, 1101}, /* 02 (360x400,720x400) */
@@ -774,7 +762,7 @@ static struct XGI_LCDDesStruct XGI_StLCDDes1600x1200Data[] = {
{9, 1673, 0, 1201} /* 09 (1600x1200x60Hz) */
};
-static struct XGI330_LCDDataDesStruct2 XGI_NoScalingDesData[] = {
+static const struct XGI330_LCDDataDesStruct2 XGI_NoScalingDesData[] = {
{9, 657, 448, 405, 96, 2}, /* 00 (320x200,320x400,
640x200,640x400) */
{9, 657, 448, 355, 96, 2}, /* 01 (320x350,640x350) */
@@ -790,7 +778,7 @@ static struct XGI330_LCDDataDesStruct2 XGI_NoScalingDesData[] = {
};
/* ;;1024x768x75Hz */
-static struct XGI_LCDDesStruct xgifb_lcddes_1024x768x75[] = {
+static const struct XGI_LCDDesStruct xgifb_lcddes_1024x768x75[] = {
{9, 1049, 0, 769}, /* ; 00 (320x200,320x400,640x200,640x400) */
{9, 1049, 0, 769}, /* ; 01 (320x350,640x350) */
{9, 1049, 0, 769}, /* ; 02 (360x400,720x400) */
@@ -801,7 +789,7 @@ static struct XGI_LCDDesStruct xgifb_lcddes_1024x768x75[] = {
};
/* ;;1024x768x75Hz */
-static struct XGI_LCDDesStruct XGI_CetLCDDes1024x768x75Data[] = {
+static const struct XGI_LCDDesStruct XGI_CetLCDDes1024x768x75Data[] = {
{1152, 856, 622, 587}, /* ; 00 (320x200,320x400,640x200,640x400) */
{1152, 856, 597, 562}, /* ; 01 (320x350,640x350) */
{1192, 896, 622, 587}, /* ; 02 (360x400,720x400) */
@@ -812,7 +800,7 @@ static struct XGI_LCDDesStruct XGI_CetLCDDes1024x768x75Data[] = {
};
/* ;;1280x1024x75Hz */
-static struct XGI_LCDDesStruct xgifb_lcddldes_1280x1024x75[] = {
+static const struct XGI_LCDDesStruct xgifb_lcddldes_1280x1024x75[] = {
{18, 1314, 0, 1025}, /* ; 00 (320x200,320x400,640x200,640x400) */
{18, 1314, 0, 1025}, /* ; 01 (320x350,640x350) */
{18, 1314, 0, 1025}, /* ; 02 (360x400,720x400) */
@@ -824,7 +812,7 @@ static struct XGI_LCDDesStruct xgifb_lcddldes_1280x1024x75[] = {
};
/* 1280x1024x75Hz */
-static struct XGI_LCDDesStruct XGI_CetLCDDLDes1280x1024x75Data[] = {
+static const struct XGI_LCDDesStruct XGI_CetLCDDLDes1280x1024x75Data[] = {
{1368, 1008, 752, 711}, /* ; 00 (320x200,320x400,640x200,640x400) */
{1368, 1008, 729, 688}, /* ; 01 (320x350,640x350) */
{1408, 1048, 752, 711}, /* ; 02 (360x400,720x400) */
@@ -836,7 +824,7 @@ static struct XGI_LCDDesStruct XGI_CetLCDDLDes1280x1024x75Data[] = {
};
/* ;;1280x1024x75Hz */
-static struct XGI_LCDDesStruct xgifb_lcddes_1280x1024x75[] = {
+static const struct XGI_LCDDesStruct xgifb_lcddes_1280x1024x75[] = {
{9, 1305, 0, 1025}, /* ; 00 (320x200,320x400,640x200,640x400) */
{9, 1305, 0, 1025}, /* ; 01 (320x350,640x350) */
{9, 1305, 0, 1025}, /* ; 02 (360x400,720x400) */
@@ -848,7 +836,7 @@ static struct XGI_LCDDesStruct xgifb_lcddes_1280x1024x75[] = {
};
/* 1280x1024x75Hz */
-static struct XGI_LCDDesStruct XGI_CetLCDDes1280x1024x75Data[] = {
+static const struct XGI_LCDDesStruct XGI_CetLCDDes1280x1024x75Data[] = {
{1368, 1008, 752, 711}, /* ; 00 (320x200,320x400,640x200,640x400) */
{1368, 1008, 729, 688}, /* ; 01 (320x350,640x350) */
{1408, 1048, 752, 711}, /* ; 02 (360x400,720x400) */
@@ -860,7 +848,7 @@ static struct XGI_LCDDesStruct XGI_CetLCDDes1280x1024x75Data[] = {
};
/* Scaling LCD 75Hz */
-static struct XGI330_LCDDataDesStruct2 XGI_NoScalingDesDatax75[] = {
+static const struct XGI330_LCDDataDesStruct2 XGI_NoScalingDesDatax75[] = {
{9, 657, 448, 405, 96, 2}, /* ; 00 (320x200,320x400,
640x200,640x400) */
{9, 657, 448, 355, 96, 2}, /* ; 01 (320x350,640x350) */
@@ -1174,7 +1162,7 @@ static const unsigned char XGI330_Ren750pGroup3[] = {
0x18, 0x1D, 0x23, 0x28, 0x4C, 0xAA, 0x01
};
-static struct SiS_LVDSData XGI_LVDS1024x768Data_1[] = {
+static const struct SiS_LVDSData XGI_LVDS1024x768Data_1[] = {
{ 960, 438, 1344, 806}, /* 00 (320x200,320x400,640x200,640x400) */
{ 960, 388, 1344, 806}, /* 01 (320x350,640x350) */
{1040, 438, 1344, 806}, /* 02 (360x400,720x400) */
@@ -1185,7 +1173,7 @@ static struct SiS_LVDSData XGI_LVDS1024x768Data_1[] = {
};
-static struct SiS_LVDSData XGI_LVDS1024x768Data_2[] = {
+static const struct SiS_LVDSData XGI_LVDS1024x768Data_2[] = {
{1344, 806, 1344, 806},
{1344, 806, 1344, 806},
{1344, 806, 1344, 806},
@@ -1197,7 +1185,7 @@ static struct SiS_LVDSData XGI_LVDS1024x768Data_2[] = {
{800, 525, 1280, 813}
};
-static struct SiS_LVDSData XGI_LVDS1280x1024Data_1[] = {
+static const struct SiS_LVDSData XGI_LVDS1280x1024Data_1[] = {
{1048, 442, 1688, 1066},
{1048, 392, 1688, 1066},
{1048, 442, 1688, 1066},
@@ -1210,7 +1198,7 @@ static struct SiS_LVDSData XGI_LVDS1280x1024Data_1[] = {
#define XGI_LVDS1280x1024Data_2 XGI_LVDS1024x768Data_2
-static struct SiS_LVDSData XGI_LVDS1400x1050Data_1[] = {
+static const struct SiS_LVDSData XGI_LVDS1400x1050Data_1[] = {
{928, 416, 1688, 1066},
{928, 366, 1688, 1066},
{928, 416, 1688, 1066},
@@ -1222,7 +1210,7 @@ static struct SiS_LVDSData XGI_LVDS1400x1050Data_1[] = {
{1688, 1066, 1688, 1066}
};
-static struct SiS_LVDSData XGI_LVDS1400x1050Data_2[] = {
+static const struct SiS_LVDSData XGI_LVDS1400x1050Data_2[] = {
{1688, 1066, 1688, 1066},
{1688, 1066, 1688, 1066},
{1688, 1066, 1688, 1066},
@@ -1235,7 +1223,7 @@ static struct SiS_LVDSData XGI_LVDS1400x1050Data_2[] = {
};
/* ;;[ycchen] 12/05/02 LCDHTxLCDVT=2048x1320 */
-static struct SiS_LVDSData XGI_LVDS1600x1200Data_1[] = {
+static const struct SiS_LVDSData XGI_LVDS1600x1200Data_1[] = {
{1088, 520, 2048, 1320}, /* 00 (320x200,320x400,640x200,640x400) */
{1088, 470, 2048, 1320}, /* 01 (320x350,640x350) */
{1088, 520, 2048, 1320}, /* 02 (360x400,720x400) */
@@ -1248,7 +1236,7 @@ static struct SiS_LVDSData XGI_LVDS1600x1200Data_1[] = {
{2048, 1320, 2048, 1320} /* 09 (1600x1200) */
};
-static struct SiS_LVDSData XGI_LVDSNoScalingData[] = {
+static const struct SiS_LVDSData XGI_LVDSNoScalingData[] = {
{ 800, 449, 800, 449}, /* 00 (320x200,320x400,640x200,640x400) */
{ 800, 449, 800, 449}, /* 01 (320x350,640x350) */
{ 800, 449, 800, 449}, /* 02 (360x400,720x400) */
@@ -1262,7 +1250,7 @@ static struct SiS_LVDSData XGI_LVDSNoScalingData[] = {
{1688, 806, 1688, 806} /* 0A (1280x768x60Hz) */
};
-static struct SiS_LVDSData XGI_LVDS1024x768Data_1x75[] = {
+static const struct SiS_LVDSData XGI_LVDS1024x768Data_1x75[] = {
{ 960, 438, 1312, 800}, /* 00 (320x200,320x400,640x200,640x400) */
{ 960, 388, 1312, 800}, /* 01 (320x350,640x350) */
{1040, 438, 1312, 800}, /* 02 (360x400,720x400) */
@@ -1273,7 +1261,7 @@ static struct SiS_LVDSData XGI_LVDS1024x768Data_1x75[] = {
};
-static struct SiS_LVDSData XGI_LVDS1024x768Data_2x75[] = {
+static const struct SiS_LVDSData XGI_LVDS1024x768Data_2x75[] = {
{1312, 800, 1312, 800}, /* ; 00 (320x200,320x400,640x200,640x400) */
{1312, 800, 1312, 800}, /* ; 01 (320x350,640x350) */
{1312, 800, 1312, 800}, /* ; 02 (360x400,720x400) */
@@ -1283,7 +1271,7 @@ static struct SiS_LVDSData XGI_LVDS1024x768Data_2x75[] = {
{1312, 800, 1312, 800}, /* ; 06 (512x384,1024x768) */
};
-static struct SiS_LVDSData XGI_LVDS1280x1024Data_1x75[] = {
+static const struct SiS_LVDSData XGI_LVDS1280x1024Data_1x75[] = {
{1048, 442, 1688, 1066 }, /* ; 00 (320x200,320x400,640x200,640x400) */
{1048, 392, 1688, 1066 }, /* ; 01 (320x350,640x350) */
{1128, 442, 1688, 1066 }, /* ; 02 (360x400,720x400) */
@@ -1294,7 +1282,7 @@ static struct SiS_LVDSData XGI_LVDS1280x1024Data_1x75[] = {
{1688, 1066, 1688, 1066 }, /* ; 06; 07 (640x512,1280x1024) */
};
-static struct SiS_LVDSData XGI_LVDS1280x1024Data_2x75[] = {
+static const struct SiS_LVDSData XGI_LVDS1280x1024Data_2x75[] = {
{1688, 1066, 1688, 1066 }, /* ; 00 (320x200,320x400,640x200,640x400) */
{1688, 1066, 1688, 1066 }, /* ; 01 (320x350,640x350) */
{1688, 1066, 1688, 1066 }, /* ; 02 (360x400,720x400) */
@@ -1305,7 +1293,7 @@ static struct SiS_LVDSData XGI_LVDS1280x1024Data_2x75[] = {
{1688, 1066, 1688, 1066 }, /* ; 06; 07 (640x512,1280x1024) */
};
-static struct SiS_LVDSData XGI_LVDSNoScalingDatax75[] = {
+static const struct SiS_LVDSData XGI_LVDSNoScalingDatax75[] = {
{ 800, 449, 800, 449}, /* ; 00 (320x200,320x400,640x200,640x400) */
{ 800, 449, 800, 449}, /* ; 01 (320x350,640x350) */
{ 900, 449, 900, 449}, /* ; 02 (360x400,720x400) */
@@ -1320,7 +1308,7 @@ static struct SiS_LVDSData XGI_LVDSNoScalingDatax75[] = {
{1688, 806, 1688, 806}, /* ; 0A (1280x768x75Hz) */
};
-static struct SiS_LVDSData XGI_LVDS1024x768Des_1[] = {
+static const struct SiS_LVDSData XGI_LVDS1024x768Des_1[] = {
{0, 1048, 0, 771}, /* 00 (320x200,320x400,640x200,640x400) */
{0, 1048, 0, 771}, /* 01 (320x350,640x350) */
{0, 1048, 0, 771}, /* 02 (360x400,720x400) */
@@ -1330,7 +1318,7 @@ static struct SiS_LVDSData XGI_LVDS1024x768Des_1[] = {
{0, 1048, 805, 770} /* 06 (1024x768x60Hz) */
} ;
-static struct SiS_LVDSData XGI_LVDS1024x768Des_2[] = {
+static const struct SiS_LVDSData XGI_LVDS1024x768Des_2[] = {
{1142, 856, 622, 587}, /* 00 (320x200,320x400,640x200,640x400) */
{1142, 856, 597, 562}, /* 01 (320x350,640x350) */
{1142, 856, 622, 587}, /* 02 (360x400,720x400) */
@@ -1340,7 +1328,7 @@ static struct SiS_LVDSData XGI_LVDS1024x768Des_2[] = {
{ 0, 1048, 805, 771} /* 06 (1024x768x60Hz) */
};
-static struct SiS_LVDSData XGI_LVDS1024x768Des_3[] = {
+static const struct SiS_LVDSData XGI_LVDS1024x768Des_3[] = {
{320, 24, 622, 587}, /* 00 (320x200,320x400,640x200,640x400) */
{320, 24, 597, 562}, /* 01 (320x350,640x350) */
{320, 24, 622, 587}, /* 02 (360x400,720x400) */
@@ -1348,7 +1336,7 @@ static struct SiS_LVDSData XGI_LVDS1024x768Des_3[] = {
{320, 24, 722, 687} /* 04 (640x480x60Hz) */
};
-static struct SiS_LVDSData XGI_LVDS1280x1024Des_1[] = {
+static const struct SiS_LVDSData XGI_LVDS1280x1024Des_1[] = {
{0, 1328, 0, 1025}, /* 00 (320x200,320x400,640x200,640x400) */
{0, 1328, 0, 1025}, /* 01 (320x350,640x350) */
{0, 1328, 0, 1025}, /* 02 (360x400,720x400) */
@@ -1360,7 +1348,7 @@ static struct SiS_LVDSData XGI_LVDS1280x1024Des_1[] = {
};
/* The Display setting for DE Mode Panel */
-static struct SiS_LVDSData XGI_LVDS1280x1024Des_2[] = {
+static const struct SiS_LVDSData XGI_LVDS1280x1024Des_2[] = {
{1368, 1008, 752, 711}, /* 00 (320x200,320x400,640x200,640x400) */
{1368, 1008, 729, 688}, /* 01 (320x350,640x350) */
{1408, 1048, 752, 711}, /* 02 (360x400,720x400) */
@@ -1371,7 +1359,7 @@ static struct SiS_LVDSData XGI_LVDS1280x1024Des_2[] = {
{0000, 1328, 0, 1025} /* 07 (1280x1024x60Hz) */
};
-static struct SiS_LVDSData XGI_LVDS1400x1050Des_1[] = {
+static const struct SiS_LVDSData XGI_LVDS1400x1050Des_1[] = {
{0, 1448, 0, 1051}, /* 00 (320x200,320x400,640x200,640x400) */
{0, 1448, 0, 1051}, /* 01 (320x350,640x350) */
{0, 1448, 0, 1051}, /* 02 (360x400,720x400) */
@@ -1383,7 +1371,7 @@ static struct SiS_LVDSData XGI_LVDS1400x1050Des_1[] = {
{0, 1448, 0, 1051} /* 08 (1400x1050x60Hz) */
};
-static struct SiS_LVDSData XGI_LVDS1400x1050Des_2[] = {
+static const struct SiS_LVDSData XGI_LVDS1400x1050Des_2[] = {
{1308, 1068, 781, 766}, /* 00 (320x200,320x400,640x200,640x400) */
{1308, 1068, 781, 766}, /* 01 (320x350,640x350) */
{1308, 1068, 781, 766}, /* 02 (360x400,720x400) */
@@ -1395,7 +1383,7 @@ static struct SiS_LVDSData XGI_LVDS1400x1050Des_2[] = {
{ 0, 1448, 0, 1051} /* 08 (1400x1050x60Hz) */
};
-static struct SiS_LVDSData XGI_LVDS1600x1200Des_1[] = {
+static const struct SiS_LVDSData XGI_LVDS1600x1200Des_1[] = {
{0, 1664, 0, 1201}, /* 00 (320x200,320x400,640x200,640x400) */
{0, 1664, 0, 1201}, /* 01 (320x350,640x350) */
{0, 1664, 0, 1201}, /* 02 (360x400,720x400) */
@@ -1408,7 +1396,7 @@ static struct SiS_LVDSData XGI_LVDS1600x1200Des_1[] = {
{0, 1664, 0, 1201} /* 09 (1600x1200x60Hz) */
};
-static struct XGI330_LCDDataDesStruct2 XGI_LVDSNoScalingDesData[] = {
+static const struct XGI330_LCDDataDesStruct2 XGI_LVDSNoScalingDesData[] = {
{0, 648, 448, 405, 96, 2}, /* 00 (320x200,320x400,
640x200,640x400) */
{0, 648, 448, 355, 96, 2}, /* 01 (320x350,640x350) */
@@ -1424,7 +1412,7 @@ static struct XGI330_LCDDataDesStruct2 XGI_LVDSNoScalingDesData[] = {
};
/* ; 1024x768 Full-screen */
-static struct SiS_LVDSData XGI_LVDS1024x768Des_1x75[] = {
+static const struct SiS_LVDSData XGI_LVDS1024x768Des_1x75[] = {
{0, 1040, 0, 769}, /* ; 00 (320x200,320x400,640x200,640x400) */
{0, 1040, 0, 769}, /* ; 01 (320x350,640x350) */
{0, 1040, 0, 769}, /* ; 02 (360x400,720x400) */
@@ -1435,7 +1423,7 @@ static struct SiS_LVDSData XGI_LVDS1024x768Des_1x75[] = {
};
/* ; 1024x768 center-screen (Enh. Mode) */
-static struct SiS_LVDSData XGI_LVDS1024x768Des_2x75[] = {
+static const struct SiS_LVDSData XGI_LVDS1024x768Des_2x75[] = {
{1142, 856, 622, 587}, /* 00 (320x200,320x400,640x200,640x400) */
{1142, 856, 597, 562}, /* 01 (320x350,640x350) */
{1142, 856, 622, 587}, /* 02 (360x400,720x400) */
@@ -1446,7 +1434,7 @@ static struct SiS_LVDSData XGI_LVDS1024x768Des_2x75[] = {
};
/* ; 1024x768 center-screen (St.Mode) */
-static struct SiS_LVDSData XGI_LVDS1024x768Des_3x75[] = {
+static const struct SiS_LVDSData XGI_LVDS1024x768Des_3x75[] = {
{320, 24, 622, 587}, /* ; 00 (320x200,320x400,640x200,640x400) */
{320, 24, 597, 562}, /* ; 01 (320x350,640x350) */
{320, 24, 622, 587}, /* ; 02 (360x400,720x400) */
@@ -1454,7 +1442,7 @@ static struct SiS_LVDSData XGI_LVDS1024x768Des_3x75[] = {
{320, 24, 722, 687} /* ; 04 (640x480x60Hz) */
};
-static struct SiS_LVDSData XGI_LVDS1280x1024Des_1x75[] = {
+static const struct SiS_LVDSData XGI_LVDS1280x1024Des_1x75[] = {
{0, 1296, 0, 1025}, /* ; 00 (320x200,320x400,640x200,640x400) */
{0, 1296, 0, 1025}, /* ; 01 (320x350,640x350) */
{0, 1296, 0, 1025}, /* ; 02 (360x400,720x400) */
@@ -1467,7 +1455,7 @@ static struct SiS_LVDSData XGI_LVDS1280x1024Des_1x75[] = {
/* The Display setting for DE Mode Panel */
/* Set DE as default */
-static struct SiS_LVDSData XGI_LVDS1280x1024Des_2x75[] = {
+static const struct SiS_LVDSData XGI_LVDS1280x1024Des_2x75[] = {
{1368, 976, 752, 711}, /* ; 00 (320x200,320x400,640x200,640x400) */
{1368, 976, 729, 688}, /* ; 01 (320x350,640x350) */
{1408, 976, 752, 711}, /* ; 02 (360x400,720x400) */
@@ -1479,7 +1467,7 @@ static struct SiS_LVDSData XGI_LVDS1280x1024Des_2x75[] = {
};
/* Scaling LCD 75Hz */
-static struct XGI330_LCDDataDesStruct2 XGI_LVDSNoScalingDesDatax75[] = {
+static const struct XGI330_LCDDataDesStruct2 XGI_LVDSNoScalingDesDatax75[] = {
{0, 648, 448, 405, 96, 2}, /* ; 00 (320x200,320x400,
640x200,640x400) */
{0, 648, 448, 355, 96, 2}, /* ; 01 (320x350,640x350) */
@@ -1495,7 +1483,7 @@ static struct XGI330_LCDDataDesStruct2 XGI_LVDSNoScalingDesDatax75[] = {
};
/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
-static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_1_H[] = {
+static const struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_1_H[] = {
{ {0x4B, 0x27, 0x8F, 0x32, 0x1B, 0x00, 0x45, 0x00} }, /* 00 (320x) */
{ {0x4B, 0x27, 0x8F, 0x2B, 0x03, 0x00, 0x44, 0x00} }, /* 01 (360x) */
{ {0x55, 0x31, 0x99, 0x46, 0x1D, 0x00, 0x55, 0x00} }, /* 02 (400x) */
@@ -1507,7 +1495,7 @@ static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_1_H[] = {
};
/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
-static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_1_H[] = {
+static const struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_1_H[] = {
{ {0x56, 0x27, 0x9A, 0x30, 0x1E, 0x00, 0x05, 0x00 } }, /* 00 (320x) */
{ {0x56, 0x27, 0x9A, 0x30, 0x1E, 0x00, 0x05, 0x00 } }, /* 01 (360x) */
{ {0x60, 0x31, 0x84, 0x3A, 0x88, 0x00, 0x01, 0x00 } }, /* 02 (400x) */
@@ -1520,7 +1508,7 @@ static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_1_H[] = {
};
/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
-static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_2_H[] = {
+static const struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_2_H[] = {
{ {0x63, 0x27, 0x87, 0x3B, 0x8C, 0x00, 0x01, 0x00} }, /* 00 (320x) */
{ {0x63, 0x27, 0x87, 0x3B, 0x8C, 0x00, 0x01, 0x00} }, /* 01 (360x) */
{ {0x63, 0x31, 0x87, 0x3D, 0x8E, 0x00, 0x01, 0x00} }, /* 02 (400x) */
@@ -1532,7 +1520,7 @@ static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_2_H[] = {
};
/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
-static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_2_H[] = {
+static const struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_2_H[] = {
{ {0x7E, 0x3B, 0x9A, 0x44, 0x12, 0x00, 0x01, 0x00} }, /* 00 (320x) */
{ {0x7E, 0x3B, 0x9A, 0x44, 0x12, 0x00, 0x01, 0x00} }, /* 01 (360x) */
{ {0x7E, 0x40, 0x84, 0x49, 0x91, 0x00, 0x01, 0x00} }, /* 02 (400x) */
@@ -1545,7 +1533,7 @@ static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_2_H[] = {
};
/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
-static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11400x1050_1_H[] = {
+static const struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11400x1050_1_H[] = {
{ {0x47, 0x27, 0x8B, 0x2C, 0x1A, 0x00, 0x05, 0x00} }, /* 00 (320x) */
{ {0x47, 0x27, 0x8B, 0x30, 0x1E, 0x00, 0x05, 0x00} }, /* 01 (360x) */
{ {0x51, 0x31, 0x95, 0x36, 0x04, 0x00, 0x01, 0x00} }, /* 02 (400x) */
@@ -1559,7 +1547,7 @@ static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11400x1050_1_H[] = {
};
/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
-static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11400x1050_2_H[] = {
+static const struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11400x1050_2_H[] = {
{ {0x76, 0x3F, 0x83, 0x45, 0x8C, 0x00, 0x41, 0x00} }, /* 00 (320x) */
{ {0x76, 0x3F, 0x83, 0x45, 0x8C, 0x00, 0x41, 0x00} }, /* 01 (360x) */
{ {0x76, 0x31, 0x9A, 0x48, 0x9F, 0x00, 0x41, 0x00} }, /* 02 (400x) */
@@ -1574,7 +1562,7 @@ static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11400x1050_2_H[] = {
/* ;302lv channelA [ycchen] 12/05/02 LCDHT=2048 */
/* ; CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
-static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11600x1200_1_H[] = {
+static const struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11600x1200_1_H[] = {
{ {0x5B, 0x27, 0x9F, 0x32, 0x0A, 0x00, 0x01, 0x00} }, /* 00 (320x) */
{ {0x5B, 0x27, 0x9F, 0x32, 0x0A, 0x00, 0x01, 0x00} }, /* 01 (360x) */
{ {0x65, 0x31, 0x89, 0x3C, 0x94, 0x00, 0x01, 0x00} }, /* 02 (400x) */
@@ -1589,7 +1577,7 @@ static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11600x1200_1_H[] = {
};
/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A+CR09(5->7) */
-static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_1_V[] = {
+static const struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_1_V[] = {
{ {0x97, 0x1F, 0x60, 0x87, 0x5D, 0x83, 0x10} }, /* 00 (x350) */
{ {0xB4, 0x1F, 0x92, 0x89, 0x8F, 0xB5, 0x30} }, /* 01 (x400) */
{ {0x04, 0x3E, 0xE2, 0x89, 0xDF, 0x05, 0x00} }, /* 02 (x480) */
@@ -1598,7 +1586,7 @@ static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_1_V[] = {
};
/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
-static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_2_V[] = {
+static const struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_2_V[] = {
{ {0x24, 0xBB, 0x31, 0x87, 0x5D, 0x25, 0x30} }, /* 00 (x350) */
{ {0x24, 0xBB, 0x4A, 0x80, 0x8F, 0x25, 0x30} }, /* 01 (x400) */
{ {0x24, 0xBB, 0x72, 0x88, 0xDF, 0x25, 0x30} }, /* 02 (x480) */
@@ -1607,7 +1595,7 @@ static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_2_V[] = {
};
/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
-static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_1_V[] = {
+static const struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_1_V[] = {
{ {0x86, 0x1F, 0x5E, 0x82, 0x5D, 0x87, 0x00} }, /* 00 (x350) */
{ {0xB8, 0x1F, 0x90, 0x84, 0x8F, 0xB9, 0x30} }, /* 01 (x400) */
{ {0x08, 0x3E, 0xE0, 0x84, 0xDF, 0x09, 0x00} }, /* 02 (x480) */
@@ -1617,7 +1605,7 @@ static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_1_V[] = {
};
/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
-static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_2_V[] = {
+static const struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_2_V[] = {
{ {0x28, 0xD2, 0xAF, 0x83, 0xAE, 0xD8, 0xA1} }, /* 00 (x350) */
{ {0x28, 0xD2, 0xC8, 0x8C, 0xC7, 0xF2, 0x81} }, /* 01 (x400) */
{ {0x28, 0xD2, 0xF0, 0x84, 0xEF, 0x1A, 0xB1} }, /* 02 (x480) */
@@ -1627,7 +1615,7 @@ static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_2_V[] = {
};
/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
-static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11400x1050_1_V[] = {
+static const struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11400x1050_1_V[] = {
{ {0x6C, 0x1F, 0x60, 0x84, 0x5D, 0x6D, 0x10} }, /* 00 (x350) */
{ {0x9E, 0x1F, 0x93, 0x86, 0x8F, 0x9F, 0x30} }, /* 01 (x400) */
{ {0xEE, 0x1F, 0xE2, 0x86, 0xDF, 0xEF, 0x10} }, /* 02 (x480) */
@@ -1638,7 +1626,7 @@ static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11400x1050_1_V[] = {
};
/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
-static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11400x1050_2_V[] = {
+static const struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11400x1050_2_V[] = {
{ {0x28, 0x92, 0xB6, 0x83, 0xB5, 0xCF, 0x81} }, /* 00 (x350) */
{ {0x28, 0x92, 0xD5, 0x82, 0xD4, 0xEE, 0x81} }, /* 01 (x400) */
{ {0x28, 0x92, 0xFD, 0x8A, 0xFC, 0x16, 0xB1} }, /* 02 (x480) */
@@ -1649,7 +1637,7 @@ static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11400x1050_2_V[] = {
};
/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A+CR09(5->7) */
-static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11600x1200_1_V[] = {
+static const struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11600x1200_1_V[] = {
{ {0xd4, 0x1F, 0x81, 0x84, 0x5D, 0xd5, 0x10} }, /* 00 (x350) */
{ {0x06, 0x3e, 0xb3, 0x86, 0x8F, 0x07, 0x20} }, /* 01 (x400) */
{ {0x56, 0xba, 0x03, 0x86, 0xDF, 0x57, 0x00} }, /* 02 (x480) */
@@ -1661,7 +1649,7 @@ static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11600x1200_1_V[] = {
};
/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
-static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_1_Hx75[] = {
+static const struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_1_Hx75[] = {
{ {0x4B, 0x27, 0x8F, 0x32, 0x1B, 0x00, 0x45, 0x00} },/* ; 00 (320x) */
{ {0x4B, 0x27, 0x8F, 0x2B, 0x03, 0x00, 0x44, 0x00} },/* ; 01 (360x) */
{ {0x55, 0x31, 0x99, 0x46, 0x1D, 0x00, 0x55, 0x00} },/* ; 02 (400x) */
@@ -1673,7 +1661,7 @@ static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_1_Hx75[] = {
};
/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A+CR09(5->7) */
-static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_1_Vx75[] = {
+static const struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_1_Vx75[] = {
{ {0x97, 0x1F, 0x60, 0x87, 0x5D, 0x83, 0x10} },/* ; 00 (x350) */
{ {0xB4, 0x1F, 0x92, 0x89, 0x8F, 0xB5, 0x30} },/* ; 01 (x400) */
{ {0xFE, 0x1F, 0xE0, 0x84, 0xDF, 0xFF, 0x10} },/* ; 02 (x480) */
@@ -1682,7 +1670,7 @@ static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_1_Vx75[] = {
};
/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
-static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_2_Hx75[] = {
+static const struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_2_Hx75[] = {
{ {0x63, 0x27, 0x87, 0x3B, 0x8C, 0x00, 0x01, 0x00} },/* ; 00 (320x) */
{ {0x63, 0x27, 0x87, 0x3B, 0x8C, 0x00, 0x01, 0x00} },/* ; 01 (360x) */
{ {0x63, 0x31, 0x87, 0x3D, 0x8E, 0x00, 0x01, 0x00} },/* ; 02 (400x) */
@@ -1694,7 +1682,7 @@ static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11024x768_2_Hx75[] = {
};
/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
-static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_2_Vx75[] = {
+static const struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_2_Vx75[] = {
{ {0x24, 0xBB, 0x31, 0x87, 0x5D, 0x25, 0x30} },/* ; 00 (x350) */
{ {0x24, 0xBB, 0x4A, 0x80, 0x8F, 0x25, 0x30} },/* ; 01 (x400) */
{ {0x24, 0xBB, 0x72, 0x88, 0xDF, 0x25, 0x30} },/* ; 02 (x480) */
@@ -1703,7 +1691,7 @@ static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11024x768_2_Vx75[] = {
};
/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
-static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_1_Hx75[] = {
+static const struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_1_Hx75[] = {
{ {0x56, 0x27, 0x9A, 0x30, 0x1E, 0x00, 0x05, 0x00} },/* ; 00 (320x) */
{ {0x56, 0x27, 0x9A, 0x30, 0x1E, 0x00, 0x05, 0x00} },/* ; 01 (360x) */
{ {0x60, 0x31, 0x84, 0x3A, 0x88, 0x00, 0x01, 0x00} },/* ; 02 (400x) */
@@ -1716,7 +1704,7 @@ static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_1_Hx75[] = {
};
/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
-static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_1_Vx75[] = {
+static const struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_1_Vx75[] = {
{ {0x86, 0xD1, 0xBC, 0x80, 0xBB, 0xE5, 0x00} },/* ; 00 (x350) */
{ {0xB8, 0x1F, 0x90, 0x84, 0x8F, 0xB9, 0x30} },/* ; 01 (x400) */
{ {0x08, 0x3E, 0xE0, 0x84, 0xDF, 0x09, 0x00} },/* ; 02 (x480) */
@@ -1725,7 +1713,7 @@ static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_1_Vx75[] = {
{ {0x28, 0x5A, 0x13, 0x87, 0xFF, 0x29, 0xA9} } /* ; 05 (x1024) */
};
/* CR00,CR02,CR03,CR04,CR05,SR0B,SR0C,SR0E */
-static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_2_Hx75[] = {
+static const struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_2_Hx75[] = {
{ {0x7E, 0x3B, 0x9A, 0x44, 0x12, 0x00, 0x01, 0x00} },/* ; 00 (320x) */
{ {0x7E, 0x3B, 0x9A, 0x44, 0x12, 0x00, 0x01, 0x00} },/* ; 01 (360x) */
{ {0x7E, 0x40, 0x84, 0x49, 0x91, 0x00, 0x01, 0x00} },/* ; 02 (400x) */
@@ -1738,7 +1726,7 @@ static struct XGI_LVDSCRT1HDataStruct XGI_LVDSCRT11280x1024_2_Hx75[] = {
};
/* CR06,CR07,CR10,CR11,CR15,CR16,SR0A */
-static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_2_Vx75[] = {
+static const struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_2_Vx75[] = {
{ {0x28, 0xD2, 0xAF, 0x83, 0xAE, 0xD8, 0xA1} },/* ; 00 (x350) */
{ {0x28, 0xD2, 0xC8, 0x8C, 0xC7, 0xF2, 0x81} },/* ; 01 (x400) */
{ {0x28, 0xD2, 0xF0, 0x84, 0xEF, 0x1A, 0xB1} },/* ; 02 (x480) */
@@ -1748,115 +1736,141 @@ static struct XGI_LVDSCRT1VDataStruct XGI_LVDSCRT11280x1024_2_Vx75[] = {
};
/*add for new UNIVGABIOS*/
-static struct XGI330_LCDDataTablStruct XGI_LCDDataTable[] = {
- {Panel_1024x768, 0x0019, 0x0001, 0}, /* XGI_ExtLCD1024x768Data */
- {Panel_1024x768, 0x0019, 0x0000, 1}, /* XGI_StLCD1024x768Data */
- {Panel_1024x768, 0x0018, 0x0010, 2}, /* XGI_CetLCD1024x768Data */
- {Panel_1280x1024, 0x0019, 0x0001, 3}, /* XGI_ExtLCD1280x1024Data */
- {Panel_1280x1024, 0x0019, 0x0000, 4}, /* XGI_StLCD1280x1024Data */
- {Panel_1280x1024, 0x0018, 0x0010, 5}, /* XGI_CetLCD1280x1024Data */
- {Panel_1400x1050, 0x0019, 0x0001, 6}, /* XGI_ExtLCD1400x1050Data */
- {Panel_1400x1050, 0x0019, 0x0000, 7}, /* XGI_StLCD1400x1050Data */
- {Panel_1400x1050, 0x0018, 0x0010, 8}, /* XGI_CetLCD1400x1050Data */
- {Panel_1600x1200, 0x0019, 0x0001, 9}, /* XGI_ExtLCD1600x1200Data */
- {Panel_1600x1200, 0x0019, 0x0000, 10}, /* XGI_StLCD1600x1200Data */
- {PanelRef60Hz, 0x0008, 0x0008, 11}, /* XGI_NoScalingData */
- {Panel_1024x768x75, 0x0019, 0x0001, 12}, /* XGI_ExtLCD1024x768x75Data */
- {Panel_1024x768x75, 0x0019, 0x0000, 13}, /* XGI_StLCD1024x768x75Data */
- {Panel_1024x768x75, 0x0018, 0x0010, 14}, /* XGI_CetLCD1024x768x75Data */
- /* XGI_ExtLCD1280x1024x75Data */
- {Panel_1280x1024x75, 0x0019, 0x0001, 15},
- /* XGI_StLCD1280x1024x75Data */
- {Panel_1280x1024x75, 0x0019, 0x0000, 16},
- /* XGI_CetLCD1280x1024x75Data */
- {Panel_1280x1024x75, 0x0018, 0x0010, 17},
- {PanelRef75Hz, 0x0008, 0x0008, 18}, /* XGI_NoScalingDatax75 */
- {0xFF, 0x0000, 0x0000, 0} /* End of table */
-};
-
-static struct XGI330_LCDDataTablStruct XGI_LCDDesDataTable[] = {
- {Panel_1024x768, 0x0019, 0x0001, 0}, /* XGI_ExtLCDDes1024x768Data */
- {Panel_1024x768, 0x0019, 0x0000, 1}, /* XGI_StLCDDes1024x768Data */
- {Panel_1024x768, 0x0018, 0x0010, 2}, /* XGI_CetLCDDes1024x768Data */
- {Panel_1280x1024, 0x0019, 0x0001, 3}, /* XGI_ExtLCDDes1280x1024Data */
- {Panel_1280x1024, 0x0019, 0x0000, 4}, /* XGI_StLCDDes1280x1024Data */
- {Panel_1280x1024, 0x0018, 0x0010, 5}, /* XGI_CetLCDDes1280x1024Data */
- {Panel_1400x1050, 0x0019, 0x0001, 6}, /* XGI_ExtLCDDes1400x1050Data */
- {Panel_1400x1050, 0x0019, 0x0000, 7}, /* XGI_StLCDDes1400x1050Data */
- {Panel_1400x1050, 0x0418, 0x0010, 8}, /* XGI_CetLCDDes1400x1050Data */
- {Panel_1400x1050, 0x0418, 0x0410, 9}, /* XGI_CetLCDDes1400x1050Data2 */
- {Panel_1600x1200, 0x0019, 0x0001, 10}, /* XGI_ExtLCDDes1600x1200Data */
- {Panel_1600x1200, 0x0019, 0x0000, 11}, /* XGI_StLCDDes1600x1200Data */
- {PanelRef60Hz, 0x0008, 0x0008, 12}, /* XGI_NoScalingDesData */
- /* XGI_ExtLCDDes1024x768x75Data */
- {Panel_1024x768x75, 0x0019, 0x0001, 13},
- /* XGI_StLCDDes1024x768x75Data */
- {Panel_1024x768x75, 0x0019, 0x0000, 14},
- /* XGI_CetLCDDes1024x768x75Data */
- {Panel_1024x768x75, 0x0018, 0x0010, 15},
- /* XGI_ExtLCDDes1280x1024x75Data */
- {Panel_1280x1024x75, 0x0019, 0x0001, 16},
- /* XGI_StLCDDes1280x1024x75Data */
- {Panel_1280x1024x75, 0x0019, 0x0000, 17},
- /* XGI_CetLCDDes1280x1024x75Data */
- {Panel_1280x1024x75, 0x0018, 0x0010, 18},
- {PanelRef75Hz, 0x0008, 0x0008, 19}, /* XGI_NoScalingDesDatax75 */
- {0xFF, 0x0000, 0x0000, 0}
-};
-
-static struct XGI330_LCDDataTablStruct xgifb_epllcd_crt1[] = {
- {Panel_1024x768, 0x0018, 0x0000, 0}, /* XGI_LVDSCRT11024x768_1 */
- {Panel_1024x768, 0x0018, 0x0010, 1}, /* XGI_LVDSCRT11024x768_2 */
- {Panel_1280x1024, 0x0018, 0x0000, 2}, /* XGI_LVDSCRT11280x1024_1 */
- {Panel_1280x1024, 0x0018, 0x0010, 3}, /* XGI_LVDSCRT11280x1024_2 */
- {Panel_1400x1050, 0x0018, 0x0000, 4}, /* XGI_LVDSCRT11400x1050_1 */
- {Panel_1400x1050, 0x0018, 0x0010, 5}, /* XGI_LVDSCRT11400x1050_2 */
- {Panel_1600x1200, 0x0018, 0x0000, 6}, /* XGI_LVDSCRT11600x1200_1 */
- {Panel_1024x768x75, 0x0018, 0x0000, 7}, /* XGI_LVDSCRT11024x768_1x75 */
- {Panel_1024x768x75, 0x0018, 0x0010, 8}, /* XGI_LVDSCRT11024x768_2x75 */
- {Panel_1280x1024x75, 0x0018, 0x0000, 9}, /*XGI_LVDSCRT11280x1024_1x75*/
- {Panel_1280x1024x75, 0x0018, 0x0010, 10},/*XGI_LVDSCRT11280x1024_2x75*/
- {0xFF, 0x0000, 0x0000, 0}
-};
-
-static struct XGI330_LCDDataTablStruct XGI_EPLLCDDataPtr[] = {
- {Panel_1024x768, 0x0018, 0x0000, 0}, /* XGI_LVDS1024x768Data_1 */
- {Panel_1024x768, 0x0018, 0x0010, 1}, /* XGI_LVDS1024x768Data_2 */
- {Panel_1280x1024, 0x0018, 0x0000, 2}, /* XGI_LVDS1280x1024Data_1 */
- {Panel_1280x1024, 0x0018, 0x0010, 3}, /* XGI_LVDS1280x1024Data_2 */
- {Panel_1400x1050, 0x0018, 0x0000, 4}, /* XGI_LVDS1400x1050Data_1 */
- {Panel_1400x1050, 0x0018, 0x0010, 5}, /* XGI_LVDS1400x1050Data_2 */
- {Panel_1600x1200, 0x0018, 0x0000, 6}, /* XGI_LVDS1600x1200Data_1 */
- {PanelRef60Hz, 0x0008, 0x0008, 7}, /* XGI_LVDSNoScalingData */
- {Panel_1024x768x75, 0x0018, 0x0000, 8}, /* XGI_LVDS1024x768Data_1x75 */
- {Panel_1024x768x75, 0x0018, 0x0010, 9}, /* XGI_LVDS1024x768Data_2x75 */
- /* XGI_LVDS1280x1024Data_1x75 */
- {Panel_1280x1024x75, 0x0018, 0x0000, 10},
- /* XGI_LVDS1280x1024Data_2x75 */
- {Panel_1280x1024x75, 0x0018, 0x0010, 11},
- {PanelRef75Hz, 0x0008, 0x0008, 12}, /* XGI_LVDSNoScalingDatax75 */
- {0xFF, 0x0000, 0x0000, 0}
-};
-
-static struct XGI330_LCDDataTablStruct XGI_EPLLCDDesDataPtr[] = {
- {Panel_1024x768, 0x0018, 0x0000, 0}, /* XGI_LVDS1024x768Des_1 */
- {Panel_1024x768, 0x0618, 0x0410, 1}, /* XGI_LVDS1024x768Des_3 */
- {Panel_1024x768, 0x0018, 0x0010, 2}, /* XGI_LVDS1024x768Des_2 */
- {Panel_1280x1024, 0x0018, 0x0000, 3}, /* XGI_LVDS1280x1024Des_1 */
- {Panel_1280x1024, 0x0018, 0x0010, 4}, /* XGI_LVDS1280x1024Des_2 */
- {Panel_1400x1050, 0x0018, 0x0000, 5}, /* XGI_LVDS1400x1050Des_1 */
- {Panel_1400x1050, 0x0018, 0x0010, 6}, /* XGI_LVDS1400x1050Des_2 */
- {Panel_1600x1200, 0x0018, 0x0000, 7}, /* XGI_LVDS1600x1200Des_1 */
- {PanelRef60Hz, 0x0008, 0x0008, 8}, /* XGI_LVDSNoScalingDesData */
- {Panel_1024x768x75, 0x0018, 0x0000, 9}, /* XGI_LVDS1024x768Des_1x75 */
- {Panel_1024x768x75, 0x0618, 0x0410, 10}, /* XGI_LVDS1024x768Des_3x75 */
- {Panel_1024x768x75, 0x0018, 0x0010, 11}, /* XGI_LVDS1024x768Des_2x75 */
- /* XGI_LVDS1280x1024Des_1x75 */
- {Panel_1280x1024x75, 0x0018, 0x0000, 12},
- /* XGI_LVDS1280x1024Des_2x75 */
- {Panel_1280x1024x75, 0x0018, 0x0010, 13},
- {PanelRef75Hz, 0x0008, 0x0008, 14}, /* XGI_LVDSNoScalingDesDatax75 */
- {0xFF, 0x0000, 0x0000, 0}
+static const struct XGI330_LCDDataTablStruct XGI_LCDDataTable[] = {
+ {Panel_1024x768, 0x0019, 0x0001, XGI_ExtLCD1024x768Data },
+ {Panel_1024x768, 0x0019, 0x0000, XGI_StLCD1024x768Data },
+ {Panel_1024x768, 0x0018, 0x0010, XGI_CetLCD1024x768Data },
+ {Panel_1280x1024, 0x0019, 0x0001, XGI_ExtLCD1280x1024Data },
+ {Panel_1280x1024, 0x0019, 0x0000, XGI_StLCD1280x1024Data },
+ {Panel_1280x1024, 0x0018, 0x0010, XGI_CetLCD1280x1024Data },
+ {Panel_1400x1050, 0x0019, 0x0001, xgifb_lcd_1400x1050 },
+ {Panel_1400x1050, 0x0019, 0x0000, xgifb_lcd_1400x1050 },
+ {Panel_1400x1050, 0x0018, 0x0010, XGI_CetLCD1400x1050Data },
+ {Panel_1600x1200, 0x0019, 0x0001, XGI_ExtLCD1600x1200Data },
+ {Panel_1600x1200, 0x0019, 0x0000, XGI_StLCD1600x1200Data },
+ {PanelRef60Hz, 0x0008, 0x0008, XGI_NoScalingData },
+ {Panel_1024x768x75, 0x0019, 0x0001, XGI_ExtLCD1024x768x75Data },
+ {Panel_1024x768x75, 0x0019, 0x0000, XGI_ExtLCD1024x768x75Data },
+ {Panel_1024x768x75, 0x0018, 0x0010, XGI_CetLCD1024x768x75Data },
+ {Panel_1280x1024x75, 0x0019, 0x0001, xgifb_lcd_1280x1024x75 },
+ {Panel_1280x1024x75, 0x0019, 0x0000, xgifb_lcd_1280x1024x75 },
+ {Panel_1280x1024x75, 0x0018, 0x0010, XGI_CetLCD1280x1024x75Data },
+ {PanelRef75Hz, 0x0008, 0x0008, XGI_NoScalingDatax75 },
+ {0xFF, 0x0000, 0x0000, NULL } /* End of table */
+};
+
+static const struct XGI330_LCDDataTablStruct XGI_LCDDesDataTable[] = {
+ {Panel_1024x768, 0x0019, 0x0001, XGI_ExtLCDDes1024x768Data },
+ {Panel_1024x768, 0x0019, 0x0000, XGI_StLCDDes1024x768Data },
+ {Panel_1024x768, 0x0018, 0x0010, XGI_CetLCDDes1024x768Data },
+ {Panel_1280x1024, 0x0019, 0x0001, XGI_ExtLCDDes1280x1024Data },
+ {Panel_1280x1024, 0x0019, 0x0000, XGI_StLCDDes1280x1024Data },
+ {Panel_1280x1024, 0x0018, 0x0010, XGI_CetLCDDes1280x1024Data },
+ {Panel_1400x1050, 0x0019, 0x0001, xgifb_lcddes_1400x1050 },
+ {Panel_1400x1050, 0x0019, 0x0000, xgifb_lcddes_1400x1050 },
+ {Panel_1400x1050, 0x0418, 0x0010, XGI_CetLCDDes1400x1050Data },
+ {Panel_1400x1050, 0x0418, 0x0410, XGI_CetLCDDes1400x1050Data2 },
+ {Panel_1600x1200, 0x0019, 0x0001, XGI_ExtLCDDes1600x1200Data },
+ {Panel_1600x1200, 0x0019, 0x0000, XGI_StLCDDes1600x1200Data },
+ {PanelRef60Hz, 0x0008, 0x0008, XGI_NoScalingDesData },
+ {Panel_1024x768x75, 0x0019, 0x0001, xgifb_lcddes_1024x768x75 },
+ {Panel_1024x768x75, 0x0019, 0x0000, xgifb_lcddes_1024x768x75 },
+ {Panel_1024x768x75, 0x0018, 0x0010, XGI_CetLCDDes1024x768x75Data },
+ {Panel_1280x1024x75, 0x0019, 0x0001, xgifb_lcddes_1280x1024x75 },
+ {Panel_1280x1024x75, 0x0019, 0x0000, xgifb_lcddes_1280x1024x75 },
+ {Panel_1280x1024x75, 0x0018, 0x0010, XGI_CetLCDDes1280x1024x75Data },
+ {PanelRef75Hz, 0x0008, 0x0008, XGI_NoScalingDesDatax75 },
+ {0xFF, 0x0000, 0x0000, NULL }
+};
+
+static const struct XGI330_LCDDataTablStruct xgifb_lcddldes[] = {
+ {Panel_1024x768, 0x0019, 0x0001, XGI_ExtLCDDes1024x768Data },
+ {Panel_1024x768, 0x0019, 0x0000, XGI_StLCDDes1024x768Data },
+ {Panel_1024x768, 0x0018, 0x0010, XGI_CetLCDDes1024x768Data },
+ {Panel_1280x1024, 0x0019, 0x0001, XGI_ExtLCDDLDes1280x1024Data },
+ {Panel_1280x1024, 0x0019, 0x0000, XGI_StLCDDLDes1280x1024Data },
+ {Panel_1280x1024, 0x0018, 0x0010, XGI_CetLCDDLDes1280x1024Data },
+ {Panel_1400x1050, 0x0019, 0x0001, xgifb_lcddldes_1400x1050 },
+ {Panel_1400x1050, 0x0019, 0x0000, xgifb_lcddldes_1400x1050 },
+ {Panel_1400x1050, 0x0418, 0x0010, XGI_CetLCDDes1400x1050Data },
+ {Panel_1400x1050, 0x0418, 0x0410, XGI_CetLCDDes1400x1050Data2 },
+ {Panel_1600x1200, 0x0019, 0x0001, XGI_ExtLCDDLDes1600x1200Data },
+ {Panel_1600x1200, 0x0019, 0x0000, XGI_StLCDDLDes1600x1200Data },
+ {PanelRef60Hz, 0x0008, 0x0008, XGI_NoScalingDesData },
+ {Panel_1024x768x75, 0x0019, 0x0001, xgifb_lcddes_1024x768x75 },
+ {Panel_1024x768x75, 0x0019, 0x0000, xgifb_lcddes_1024x768x75 },
+ {Panel_1024x768x75, 0x0018, 0x0010, XGI_CetLCDDes1024x768x75Data },
+ {Panel_1280x1024x75, 0x0019, 0x0001, xgifb_lcddldes_1280x1024x75 },
+ {Panel_1280x1024x75, 0x0019, 0x0000, xgifb_lcddldes_1280x1024x75 },
+ {Panel_1280x1024x75, 0x0018, 0x0010, XGI_CetLCDDLDes1280x1024x75Data },
+ {PanelRef75Hz, 0x0008, 0x0008, XGI_NoScalingDesDatax75 },
+ {0xFF, 0x0000, 0x0000, NULL }
+};
+
+static const struct XGI330_LCDDataTablStruct xgifb_epllcd_crt1_h[] = {
+ {Panel_1024x768, 0x0018, 0x0000, XGI_LVDSCRT11024x768_1_H },
+ {Panel_1024x768, 0x0018, 0x0010, XGI_LVDSCRT11024x768_2_H },
+ {Panel_1280x1024, 0x0018, 0x0000, XGI_LVDSCRT11280x1024_1_H },
+ {Panel_1280x1024, 0x0018, 0x0010, XGI_LVDSCRT11280x1024_2_H },
+ {Panel_1400x1050, 0x0018, 0x0000, XGI_LVDSCRT11400x1050_1_H },
+ {Panel_1400x1050, 0x0018, 0x0010, XGI_LVDSCRT11400x1050_2_H },
+ {Panel_1600x1200, 0x0018, 0x0000, XGI_LVDSCRT11600x1200_1_H },
+ {Panel_1024x768x75, 0x0018, 0x0000, XGI_LVDSCRT11024x768_1_Hx75 },
+ {Panel_1024x768x75, 0x0018, 0x0010, XGI_LVDSCRT11024x768_2_Hx75 },
+ {Panel_1280x1024x75, 0x0018, 0x0000, XGI_LVDSCRT11280x1024_1_Hx75 },
+ {Panel_1280x1024x75, 0x0018, 0x0010, XGI_LVDSCRT11280x1024_2_Hx75 },
+ {0xFF, 0x0000, 0x0000, NULL }
+};
+
+static const struct XGI330_LCDDataTablStruct xgifb_epllcd_crt1_v[] = {
+ {Panel_1024x768, 0x0018, 0x0000, XGI_LVDSCRT11024x768_1_V },
+ {Panel_1024x768, 0x0018, 0x0010, XGI_LVDSCRT11024x768_2_V },
+ {Panel_1280x1024, 0x0018, 0x0000, XGI_LVDSCRT11280x1024_1_V },
+ {Panel_1280x1024, 0x0018, 0x0010, XGI_LVDSCRT11280x1024_2_V },
+ {Panel_1400x1050, 0x0018, 0x0000, XGI_LVDSCRT11400x1050_1_V },
+ {Panel_1400x1050, 0x0018, 0x0010, XGI_LVDSCRT11400x1050_2_V },
+ {Panel_1600x1200, 0x0018, 0x0000, XGI_LVDSCRT11600x1200_1_V },
+ {Panel_1024x768x75, 0x0018, 0x0000, XGI_LVDSCRT11024x768_1_Vx75 },
+ {Panel_1024x768x75, 0x0018, 0x0010, XGI_LVDSCRT11024x768_2_Vx75 },
+ {Panel_1280x1024x75, 0x0018, 0x0000, XGI_LVDSCRT11280x1024_1_Vx75 },
+ {Panel_1280x1024x75, 0x0018, 0x0010, XGI_LVDSCRT11280x1024_2_Vx75 },
+ {0xFF, 0x0000, 0x0000, NULL }
+};
+
+static const struct XGI330_LCDDataTablStruct XGI_EPLLCDDataPtr[] = {
+ {Panel_1024x768, 0x0018, 0x0000, XGI_LVDS1024x768Data_1 },
+ {Panel_1024x768, 0x0018, 0x0010, XGI_LVDS1024x768Data_2 },
+ {Panel_1280x1024, 0x0018, 0x0000, XGI_LVDS1280x1024Data_1 },
+ {Panel_1280x1024, 0x0018, 0x0010, XGI_LVDS1280x1024Data_2 },
+ {Panel_1400x1050, 0x0018, 0x0000, XGI_LVDS1400x1050Data_1 },
+ {Panel_1400x1050, 0x0018, 0x0010, XGI_LVDS1400x1050Data_2 },
+ {Panel_1600x1200, 0x0018, 0x0000, XGI_LVDS1600x1200Data_1 },
+ {PanelRef60Hz, 0x0008, 0x0008, XGI_LVDSNoScalingData },
+ {Panel_1024x768x75, 0x0018, 0x0000, XGI_LVDS1024x768Data_1x75 },
+ {Panel_1024x768x75, 0x0018, 0x0010, XGI_LVDS1024x768Data_2x75 },
+ {Panel_1280x1024x75, 0x0018, 0x0000, XGI_LVDS1280x1024Data_1x75 },
+ {Panel_1280x1024x75, 0x0018, 0x0010, XGI_LVDS1280x1024Data_2x75 },
+ {PanelRef75Hz, 0x0008, 0x0008, XGI_LVDSNoScalingDatax75 },
+ {0xFF, 0x0000, 0x0000, NULL }
+};
+
+static const struct XGI330_LCDDataTablStruct XGI_EPLLCDDesDataPtr[] = {
+ {Panel_1024x768, 0x0018, 0x0000, XGI_LVDS1024x768Des_1 },
+ {Panel_1024x768, 0x0618, 0x0410, XGI_LVDS1024x768Des_3 },
+ {Panel_1024x768, 0x0018, 0x0010, XGI_LVDS1024x768Des_2 },
+ {Panel_1280x1024, 0x0018, 0x0000, XGI_LVDS1280x1024Des_1 },
+ {Panel_1280x1024, 0x0018, 0x0010, XGI_LVDS1280x1024Des_2 },
+ {Panel_1400x1050, 0x0018, 0x0000, XGI_LVDS1400x1050Des_1 },
+ {Panel_1400x1050, 0x0018, 0x0010, XGI_LVDS1400x1050Des_2 },
+ {Panel_1600x1200, 0x0018, 0x0000, XGI_LVDS1600x1200Des_1 },
+ {PanelRef60Hz, 0x0008, 0x0008, XGI_LVDSNoScalingDesData },
+ {Panel_1024x768x75, 0x0018, 0x0000, XGI_LVDS1024x768Des_1x75 },
+ {Panel_1024x768x75, 0x0618, 0x0410, XGI_LVDS1024x768Des_3x75 },
+ {Panel_1024x768x75, 0x0018, 0x0010, XGI_LVDS1024x768Des_2x75 },
+ {Panel_1280x1024x75, 0x0018, 0x0000, XGI_LVDS1280x1024Des_1x75 },
+ {Panel_1280x1024x75, 0x0018, 0x0010, XGI_LVDS1280x1024Des_2x75 },
+ {PanelRef75Hz, 0x0008, 0x0008, XGI_LVDSNoScalingDesDatax75 },
+ {0xFF, 0x0000, 0x0000, NULL }
};
static const struct XGI330_TVDataTablStruct XGI_TVDataTable[] = {
@@ -1877,7 +1891,7 @@ static const struct XGI330_TVDataTablStruct XGI_TVDataTable[] = {
};
/* Dual link only */
-static struct XGI330_LCDCapStruct XGI_LCDDLCapList[] = {
+static const struct XGI330_LCDCapStruct XGI_LCDDLCapList[] = {
/* LCDCap1024x768 */
{Panel_1024x768, DefaultLCDCap, 0, 0x88, 0x06, VCLK65_315,
0x6C, 0xC3, 0x35, 0x62, 0x02, 0x14, 0x0A, 0x02, 0x00,
@@ -1912,7 +1926,7 @@ static struct XGI330_LCDCapStruct XGI_LCDDLCapList[] = {
0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x28, 0x10}
};
-static struct XGI330_LCDCapStruct XGI_LCDCapList[] = {
+static const struct XGI330_LCDCapStruct XGI_LCDCapList[] = {
/* LCDCap1024x768 */
{Panel_1024x768, DefaultLCDCap, 0, 0x88, 0x06, VCLK65_315,
0x6C, 0xC3, 0x35, 0x62, 0x02, 0x14, 0x0A, 0x02, 0x00,
@@ -1947,7 +1961,7 @@ static struct XGI330_LCDCapStruct XGI_LCDCapList[] = {
0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x28, 0x10}
};
-static struct XGI_Ext2Struct XGI330_RefIndex[] = {
+const struct XGI_Ext2Struct XGI330_RefIndex[] = {
{Mode32Bpp + SupportAllCRT2 + SyncPN, RES320x200, VCLK25_175,
0x00, 0x10, 0x59, 320, 200},/* 00 */
{Mode32Bpp + SupportAllCRT2 + SyncPN, RES320x200, VCLK25_175,
@@ -2101,21 +2115,13 @@ static struct XGI_Ext2Struct XGI330_RefIndex[] = {
0x30, 0x47, 0x37, 1024, 768},/* 48 1024x768x160Hz */
};
-static unsigned char XGI330_ScreenOffset[] = {
+static const unsigned char XGI330_ScreenOffset[] = {
0x14, 0x19, 0x20, 0x28, 0x32, 0x40,
0x50, 0x64, 0x78, 0x80, 0x2d, 0x35,
0x57, 0x48
};
-static struct SiS_StResInfo_S XGI330_StResInfo[] = {
- {640, 400},
- {640, 350},
- {720, 400},
- {720, 350},
- {640, 480}
-};
-
-static struct SiS_ModeResInfo_S XGI330_ModeResInfo[] = {
+static const struct SiS_ModeResInfo_S XGI330_ModeResInfo[] = {
{ 320, 200, 8, 8},
{ 320, 240, 8, 8},
{ 320, 400, 8, 8},
@@ -2141,7 +2147,7 @@ static struct SiS_ModeResInfo_S XGI330_ModeResInfo[] = {
{1152, 864, 8, 16}
};
-static struct SiS_VCLKData XGI_VCLKData[] = {
+const struct SiS_VCLKData XGI_VCLKData[] = {
/* SR2B,SR2C,SR2D */
{0x1B, 0xE1, 25}, /* 00 (25.175MHz) */
{0x4E, 0xE4, 28}, /* 01 (28.322MHz) */
@@ -2234,7 +2240,7 @@ static struct SiS_VCLKData XGI_VCLKData[] = {
{0xFF, 0x00, 0} /* End mark */
};
-static struct SiS_VBVCLKData XGI_VBVCLKData[] = {
+static const struct SiS_VBVCLKData XGI_VBVCLKData[] = {
{0x1B, 0xE1, 25}, /* 00 (25.175MHz) */
{0x4E, 0xE4, 28}, /* 01 (28.322MHz) */
{0x57, 0xE4, 31}, /* 02 (31.500MHz) */
@@ -2329,7 +2335,7 @@ static struct SiS_VBVCLKData XGI_VBVCLKData[] = {
#define XGI301TVDelay 0x22
#define XGI301LCDDelay 0x12
-static unsigned char TVAntiFlickList[] = {/* NTSCAntiFlicker */
+static const unsigned char TVAntiFlickList[] = {/* NTSCAntiFlicker */
0x04, /* ; 0 Adaptive */
0x00, /* ; 1 new anti-flicker ? */
@@ -2341,7 +2347,7 @@ static unsigned char TVAntiFlickList[] = {/* NTSCAntiFlicker */
};
-static unsigned char TVEdgeList[] = {
+static const unsigned char TVEdgeList[] = {
0x00, /* ; 0 NTSC No Edge enhance */
0x04, /* ; 1 NTSC Adaptive Edge enhance */
0x00, /* ; 0 PAL No Edge enhance */
@@ -2350,7 +2356,7 @@ static unsigned char TVEdgeList[] = {
0x00 /* ; 1 HiTV */
};
-static unsigned long TVPhaseList[] = {
+static const unsigned long TVPhaseList[] = {
0x08BAED21, /* ; 0 NTSC phase */
0x00E3052A, /* ; 1 PAL phase */
0x9B2EE421, /* ; 2 PAL-M phase */
@@ -2367,7 +2373,7 @@ static unsigned long TVPhaseList[] = {
0xE00A831E /* ; D PAL-M 1024x768 */
};
-static unsigned char NTSCYFilter1[] = {
+static const unsigned char NTSCYFilter1[] = {
0x00, 0xF4, 0x10, 0x38, /* 0 : 320x text mode */
0x00, 0xF4, 0x10, 0x38, /* 1 : 360x text mode */
0xEB, 0x04, 0x25, 0x18, /* 2 : 640x text mode */
@@ -2377,7 +2383,7 @@ static unsigned char NTSCYFilter1[] = {
0xEB, 0x15, 0x25, 0xF6 /* 6 : 800x gra. mode */
};
-static unsigned char PALYFilter1[] = {
+static const unsigned char PALYFilter1[] = {
0x00, 0xF4, 0x10, 0x38, /* 0 : 320x text mode */
0x00, 0xF4, 0x10, 0x38, /* 1 : 360x text mode */
0xF1, 0xF7, 0x1F, 0x32, /* 2 : 640x text mode */
@@ -2387,7 +2393,7 @@ static unsigned char PALYFilter1[] = {
0xFC, 0xFB, 0x14, 0x2A /* 6 : 800x gra. mode */
};
-static unsigned char xgifb_palmn_yfilter1[] = {
+static const unsigned char xgifb_palmn_yfilter1[] = {
0x00, 0xF4, 0x10, 0x38, /* 0 : 320x text mode */
0x00, 0xF4, 0x10, 0x38, /* 1 : 360x text mode */
0xEB, 0x04, 0x10, 0x18, /* 2 : 640x text mode */
@@ -2398,7 +2404,7 @@ static unsigned char xgifb_palmn_yfilter1[] = {
0xFF, 0xFF, 0xFF, 0xFF /* End of Table */
};
-static unsigned char xgifb_yfilter2[] = {
+static const unsigned char xgifb_yfilter2[] = {
0xFF, 0x03, 0x02, 0xF6, 0xFC, 0x27, 0x46, /* 0 : 320x text mode */
0x01, 0x02, 0xFE, 0xF7, 0x03, 0x27, 0x3C, /* 1 : 360x text mode */
0xFF, 0x03, 0x02, 0xF6, 0xFC, 0x27, 0x46, /* 2 : 640x text mode */
@@ -2409,13 +2415,13 @@ static unsigned char xgifb_yfilter2[] = {
0xFF, 0xFF, 0xFC, 0x00, 0x0F, 0x22, 0x28 /* 7 : 1024xgra. mode */
};
-static unsigned char XGI_NTSC1024AdjTime[] = {
+static const unsigned char XGI_NTSC1024AdjTime[] = {
0xa7, 0x07, 0xf2, 0x6e, 0x17, 0x8b, 0x73, 0x53,
0x13, 0x40, 0x34, 0xF4, 0x63, 0xBB, 0xCC, 0x7A,
0x58, 0xe4, 0x73, 0xd0, 0x13
};
-static struct XGI301C_Tap4TimingStruct xgifb_tap4_timing[] = {
+static const struct XGI301C_Tap4TimingStruct xgifb_tap4_timing[] = {
{0, {
0x00, 0x20, 0x00, 0x00, 0x7F, 0x20, 0x02, 0x7F, /* ; C0-C7 */
0x7D, 0x20, 0x04, 0x7F, 0x7D, 0x1F, 0x06, 0x7E, /* ; C8-CF */
@@ -2429,7 +2435,7 @@ static struct XGI301C_Tap4TimingStruct xgifb_tap4_timing[] = {
}
};
-static struct XGI301C_Tap4TimingStruct PALTap4Timing[] = {
+static const struct XGI301C_Tap4TimingStruct PALTap4Timing[] = {
{600, {
0x05, 0x19, 0x05, 0x7D, 0x03, 0x19, 0x06, 0x7E, /* ; C0-C7 */
0x02, 0x19, 0x08, 0x7D, 0x01, 0x18, 0x0A, 0x7D, /* ; C8-CF */
@@ -2465,7 +2471,7 @@ static struct XGI301C_Tap4TimingStruct PALTap4Timing[] = {
}
};
-static struct XGI301C_Tap4TimingStruct xgifb_ntsc_525_tap4_timing[] = {
+static const struct XGI301C_Tap4TimingStruct xgifb_ntsc_525_tap4_timing[] = {
{480, {
0x04, 0x1A, 0x04, 0x7E, 0x03, 0x1A, 0x06, 0x7D, /* ; C0-C7 */
0x01, 0x1A, 0x08, 0x7D, 0x00, 0x19, 0x0A, 0x7D, /* ; C8-CF */
@@ -2501,7 +2507,7 @@ static struct XGI301C_Tap4TimingStruct xgifb_ntsc_525_tap4_timing[] = {
}
};
-static struct XGI301C_Tap4TimingStruct YPbPr750pTap4Timing[] = {
+static const struct XGI301C_Tap4TimingStruct YPbPr750pTap4Timing[] = {
{0xFFFF, {
0x05, 0x19, 0x05, 0x7D, 0x03, 0x19, 0x06, 0x7E, /* ; C0-C7 */
0x02, 0x19, 0x08, 0x7D, 0x01, 0x18, 0x0A, 0x7D, /* ; C8-CF */