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

staging: xgifb: eliminate pVBInfo->ModeResInfo

Access XGI330_ModeResInfo 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 224114c7
...@@ -25,7 +25,6 @@ void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo) ...@@ -25,7 +25,6 @@ void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo)
{ {
pVBInfo->MCLKData = XGI340New_MCLKData; pVBInfo->MCLKData = XGI340New_MCLKData;
pVBInfo->StResInfo = XGI330_StResInfo; pVBInfo->StResInfo = XGI330_StResInfo;
pVBInfo->ModeResInfo = XGI330_ModeResInfo;
pVBInfo->LCDResInfo = 0; pVBInfo->LCDResInfo = 0;
pVBInfo->LCDTypeInfo = 0; pVBInfo->LCDTypeInfo = 0;
...@@ -742,8 +741,8 @@ static void XGI_SetCRT1DE(struct xgi_hw_device_info *HwDeviceExtension, ...@@ -742,8 +741,8 @@ static void XGI_SetCRT1DE(struct xgi_hw_device_info *HwDeviceExtension,
resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO; resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag; modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
tempax = pVBInfo->ModeResInfo[resindex].HTotal; tempax = XGI330_ModeResInfo[resindex].HTotal;
tempbx = pVBInfo->ModeResInfo[resindex].VTotal; tempbx = XGI330_ModeResInfo[resindex].VTotal;
if (modeflag & HalfDCLK) if (modeflag & HalfDCLK)
tempax = tempax >> 1; tempax = tempax >> 1;
...@@ -1101,7 +1100,7 @@ static void XGI_SetCRT1ModeRegs(struct xgi_hw_device_info *HwDeviceExtension, ...@@ -1101,7 +1100,7 @@ static void XGI_SetCRT1ModeRegs(struct xgi_hw_device_info *HwDeviceExtension,
xgifb_reg_and_or(pVBInfo->P3c4, 0x06, ~0x3F, data2); xgifb_reg_and_or(pVBInfo->P3c4, 0x06, ~0x3F, data2);
resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO; resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
xres = pVBInfo->ModeResInfo[resindex].HTotal; /* xres->ax */ xres = XGI330_ModeResInfo[resindex].HTotal; /* xres->ax */
data = 0x0000; data = 0x0000;
if (infoflag & InterlaceMode) { if (infoflag & InterlaceMode) {
...@@ -1267,8 +1266,8 @@ static void XGI_GetLVDSResInfo(unsigned short ModeNo, ...@@ -1267,8 +1266,8 @@ static void XGI_GetLVDSResInfo(unsigned short ModeNo,
/* si+Ext_ResInfo */ /* si+Ext_ResInfo */
resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO; resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
xres = pVBInfo->ModeResInfo[resindex].HTotal; xres = XGI330_ModeResInfo[resindex].HTotal;
yres = pVBInfo->ModeResInfo[resindex].VTotal; yres = XGI330_ModeResInfo[resindex].VTotal;
if (modeflag & HalfDCLK) if (modeflag & HalfDCLK)
xres = xres << 1; xres = xres << 1;
...@@ -2631,8 +2630,8 @@ static void XGI_GetCRT2ResInfo(unsigned short ModeNo, ...@@ -2631,8 +2630,8 @@ static void XGI_GetCRT2ResInfo(unsigned short ModeNo,
unsigned short xres, yres, modeflag, resindex; unsigned short xres, yres, modeflag, resindex;
resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO; resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
xres = pVBInfo->ModeResInfo[resindex].HTotal; /* xres->ax */ xres = XGI330_ModeResInfo[resindex].HTotal; /* xres->ax */
yres = pVBInfo->ModeResInfo[resindex].VTotal; /* yres->bx */ yres = XGI330_ModeResInfo[resindex].VTotal; /* yres->bx */
/* si+St_ModeFlag */ /* si+St_ModeFlag */
modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag; modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
...@@ -4502,8 +4501,8 @@ static unsigned char XGI_XG21CheckLVDSMode(struct xgifb_video_info *xgifb_info, ...@@ -4502,8 +4501,8 @@ static unsigned char XGI_XG21CheckLVDSMode(struct xgifb_video_info *xgifb_info,
unsigned short xres, yres, colordepth, modeflag, resindex; unsigned short xres, yres, colordepth, modeflag, resindex;
resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO; resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
xres = pVBInfo->ModeResInfo[resindex].HTotal; /* xres->ax */ xres = XGI330_ModeResInfo[resindex].HTotal; /* xres->ax */
yres = pVBInfo->ModeResInfo[resindex].VTotal; /* yres->bx */ yres = XGI330_ModeResInfo[resindex].VTotal; /* yres->bx */
/* si+St_ModeFlag */ /* si+St_ModeFlag */
modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag; modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
...@@ -4564,8 +4563,8 @@ static void xgifb_set_lvds(struct xgifb_video_info *xgifb_info, ...@@ -4564,8 +4563,8 @@ static void xgifb_set_lvds(struct xgifb_video_info *xgifb_info,
XGI_SetXG21FPBits(pVBInfo); XGI_SetXG21FPBits(pVBInfo);
resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO; resindex = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
xres = pVBInfo->ModeResInfo[resindex].HTotal; /* xres->ax */ xres = XGI330_ModeResInfo[resindex].HTotal; /* xres->ax */
yres = pVBInfo->ModeResInfo[resindex].VTotal; /* yres->bx */ yres = XGI330_ModeResInfo[resindex].VTotal; /* yres->bx */
/* si+St_ModeFlag */ /* si+St_ModeFlag */
modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag; modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
......
...@@ -179,7 +179,6 @@ struct vb_device_info { ...@@ -179,7 +179,6 @@ struct vb_device_info {
struct XGI_TimingVStruct TimingV; struct XGI_TimingVStruct TimingV;
struct SiS_StResInfo_S *StResInfo; struct SiS_StResInfo_S *StResInfo;
struct SiS_ModeResInfo_S *ModeResInfo;
int ram_type; int ram_type;
int ram_channel; int ram_channel;
......
...@@ -2131,7 +2131,7 @@ static struct SiS_StResInfo_S XGI330_StResInfo[] = { ...@@ -2131,7 +2131,7 @@ static struct SiS_StResInfo_S XGI330_StResInfo[] = {
{640, 480} {640, 480}
}; };
static struct SiS_ModeResInfo_S XGI330_ModeResInfo[] = { static const struct SiS_ModeResInfo_S XGI330_ModeResInfo[] = {
{ 320, 200, 8, 8}, { 320, 200, 8, 8},
{ 320, 240, 8, 8}, { 320, 240, 8, 8},
{ 320, 400, 8, 8}, { 320, 400, 8, 8},
......
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