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

staging: xgifb: eliminate pVBInfo->RefIndex

Access XGI330_RefIndex directly and make it const.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b397992e
...@@ -73,7 +73,7 @@ static int XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr, ...@@ -73,7 +73,7 @@ static int XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr,
RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo, RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo,
ModeIdIndex, XGI_Pr); 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_Pr->VCLKData[ClockIndex].CLOCK * 1000;
...@@ -101,7 +101,7 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, ...@@ -101,7 +101,7 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
return 0; return 0;
RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo, RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo,
ModeIdIndex, XGI_Pr); 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_Pr->XGINEWUB_CRT1Table[index].CR[5];
...@@ -111,7 +111,7 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, ...@@ -111,7 +111,7 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
HT = (cr_data & 0xff) | ((unsigned short) (sr_data & 0x03) << 8); HT = (cr_data & 0xff) | ((unsigned short) (sr_data & 0x03) << 8);
A = HT + 5; A = HT + 5;
HDE = (XGI_Pr->RefIndex[RefreshRateTableIndex].XRes >> 3) - 1; HDE = (XGI330_RefIndex[RefreshRateTableIndex].XRes >> 3) - 1;
E = HDE + 1; E = HDE + 1;
cr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[3]; cr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[3];
...@@ -162,7 +162,7 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, ...@@ -162,7 +162,7 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
| ((unsigned short) (sr_data & 0x01) << 10); | ((unsigned short) (sr_data & 0x01) << 10);
A = VT + 2; A = VT + 2;
VDE = XGI_Pr->RefIndex[RefreshRateTableIndex].YRes - 1; VDE = XGI330_RefIndex[RefreshRateTableIndex].YRes - 1;
E = VDE + 1; E = VDE + 1;
cr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[10]; cr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[10];
...@@ -202,24 +202,24 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, ...@@ -202,24 +202,24 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
*lower_margin = F; *lower_margin = F;
*vsync_len = C; *vsync_len = C;
if (XGI_Pr->RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x8000) if (XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x8000)
*sync &= ~FB_SYNC_VERT_HIGH_ACT; *sync &= ~FB_SYNC_VERT_HIGH_ACT;
else else
*sync |= FB_SYNC_VERT_HIGH_ACT; *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; *sync &= ~FB_SYNC_HOR_HIGH_ACT;
else else
*sync |= FB_SYNC_HOR_HIGH_ACT; *sync |= FB_SYNC_HOR_HIGH_ACT;
*vmode = FB_VMODE_NONINTERLACED; *vmode = FB_VMODE_NONINTERLACED;
if (XGI_Pr->RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x0080) if (XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x0080)
*vmode = FB_VMODE_INTERLACED; *vmode = FB_VMODE_INTERLACED;
else { else {
j = 0; j = 0;
while (XGI330_EModeIDTable[j].Ext_ModeID != 0xff) { while (XGI330_EModeIDTable[j].Ext_ModeID != 0xff) {
if (XGI330_EModeIDTable[j].Ext_ModeID == if (XGI330_EModeIDTable[j].Ext_ModeID ==
XGI_Pr->RefIndex[RefreshRateTableIndex].ModeID) { XGI330_RefIndex[RefreshRateTableIndex].ModeID) {
if (XGI330_EModeIDTable[j].Ext_ModeFlag & if (XGI330_EModeIDTable[j].Ext_ModeFlag &
DoubleScanMode) { DoubleScanMode) {
*vmode = FB_VMODE_DOUBLE; *vmode = FB_VMODE_DOUBLE;
......
...@@ -260,5 +260,6 @@ ...@@ -260,5 +260,6 @@
#define XGI330_SR33 0 #define XGI330_SR33 0
extern const struct XGI_ExtStruct XGI330_EModeIDTable[]; extern const struct XGI_ExtStruct XGI330_EModeIDTable[];
extern const struct XGI_Ext2Struct XGI330_RefIndex[];
#endif #endif
This diff is collapsed.
...@@ -183,7 +183,6 @@ struct vb_device_info { ...@@ -183,7 +183,6 @@ struct vb_device_info {
struct XGI_TimingHStruct TimingH; struct XGI_TimingHStruct TimingH;
struct XGI_TimingVStruct TimingV; struct XGI_TimingVStruct TimingV;
struct XGI_Ext2Struct *RefIndex;
struct XGI_CRT1TableStruct *XGINEWUB_CRT1Table; struct XGI_CRT1TableStruct *XGINEWUB_CRT1Table;
struct SiS_VCLKData *VCLKData; struct SiS_VCLKData *VCLKData;
struct SiS_VBVCLKData *VBVCLKData; struct SiS_VBVCLKData *VBVCLKData;
......
...@@ -1969,7 +1969,7 @@ static const struct XGI330_LCDCapStruct XGI_LCDCapList[] = { ...@@ -1969,7 +1969,7 @@ static const struct XGI330_LCDCapStruct XGI_LCDCapList[] = {
0x30, 0x10, 0x5A, 0x10, 0x10, 0x0A, 0xC0, 0x28, 0x10} 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, {Mode32Bpp + SupportAllCRT2 + SyncPN, RES320x200, VCLK25_175,
0x00, 0x10, 0x59, 320, 200},/* 00 */ 0x00, 0x10, 0x59, 320, 200},/* 00 */
{Mode32Bpp + SupportAllCRT2 + SyncPN, RES320x200, VCLK25_175, {Mode32Bpp + SupportAllCRT2 + SyncPN, RES320x200, VCLK25_175,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment