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

staging: xgifb: eliminate pVBInfo->ScreenOffset

Access XGI330_ScreenOffset 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 acfe093e
...@@ -24,7 +24,6 @@ static const unsigned short XGINew_VGA_DAC[] = { ...@@ -24,7 +24,6 @@ static const unsigned short XGINew_VGA_DAC[] = {
void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo) void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo)
{ {
pVBInfo->MCLKData = XGI340New_MCLKData; pVBInfo->MCLKData = XGI340New_MCLKData;
pVBInfo->ScreenOffset = XGI330_ScreenOffset;
pVBInfo->StResInfo = XGI330_StResInfo; pVBInfo->StResInfo = XGI330_StResInfo;
pVBInfo->ModeResInfo = XGI330_ModeResInfo; pVBInfo->ModeResInfo = XGI330_ModeResInfo;
...@@ -806,7 +805,7 @@ static void XGI_SetCRT1Offset(unsigned short ModeNo, ...@@ -806,7 +805,7 @@ static void XGI_SetCRT1Offset(unsigned short ModeNo,
/* GetOffset */ /* GetOffset */
temp = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeInfo; temp = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeInfo;
temp = temp >> 8; temp = temp >> 8;
temp = pVBInfo->ScreenOffset[temp]; temp = XGI330_ScreenOffset[temp];
temp2 = XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag; temp2 = XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag;
temp2 &= InterlaceMode; temp2 &= InterlaceMode;
...@@ -2977,7 +2976,7 @@ static unsigned short XGI_GetOffset(unsigned short ModeNo, ...@@ -2977,7 +2976,7 @@ static unsigned short XGI_GetOffset(unsigned short ModeNo,
index = (modeinfo >> 8) & 0xFF; index = (modeinfo >> 8) & 0xFF;
temp = pVBInfo->ScreenOffset[index]; temp = XGI330_ScreenOffset[index];
if (infoflag & InterlaceMode) if (infoflag & InterlaceMode)
temp = temp << 1; temp = temp << 1;
......
...@@ -170,7 +170,6 @@ struct vb_device_info { ...@@ -170,7 +170,6 @@ struct vb_device_info {
unsigned char SR25; unsigned char SR25;
struct SiS_MCLKData *MCLKData; struct SiS_MCLKData *MCLKData;
unsigned char *ScreenOffset;
unsigned char *pXGINew_DRAMTypeDefinition; unsigned char *pXGINew_DRAMTypeDefinition;
unsigned char XGINew_CR97; unsigned char XGINew_CR97;
......
...@@ -2117,7 +2117,7 @@ const struct XGI_Ext2Struct XGI330_RefIndex[] = { ...@@ -2117,7 +2117,7 @@ const struct XGI_Ext2Struct XGI330_RefIndex[] = {
0x30, 0x47, 0x37, 1024, 768},/* 48 1024x768x160Hz */ 0x30, 0x47, 0x37, 1024, 768},/* 48 1024x768x160Hz */
}; };
static unsigned char XGI330_ScreenOffset[] = { static const unsigned char XGI330_ScreenOffset[] = {
0x14, 0x19, 0x20, 0x28, 0x32, 0x40, 0x14, 0x19, 0x20, 0x28, 0x32, 0x40,
0x50, 0x64, 0x78, 0x80, 0x2d, 0x35, 0x50, 0x64, 0x78, 0x80, 0x2d, 0x35,
0x57, 0x48 0x57, 0x48
......
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