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

staging: xgifb: XGI_GetTVPtr: drop the table parameter

Only one TV data table is used by the driver, delete unneeded complexity.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4c047ac4
...@@ -1764,47 +1764,18 @@ static void *XGI_GetLcdPtr(unsigned short BX, unsigned short ModeNo, ...@@ -1764,47 +1764,18 @@ static void *XGI_GetLcdPtr(unsigned short BX, unsigned short ModeNo,
return NULL; return NULL;
} }
static void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo, static void *XGI_GetTVPtr(unsigned short ModeNo,
unsigned short ModeIdIndex, unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned short i, tempdx, tempbx, tempal, modeflag, table; unsigned short i, tempdx, tempal, modeflag;
struct XGI330_TVDataTablStruct *tempdi = NULL; struct XGI330_TVDataTablStruct *tempdi = NULL;
tempbx = BX;
modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag; modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
tempal = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC; tempal = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
tempal = tempal & 0x3f; tempal = tempal & 0x3f;
table = tempbx;
switch (tempbx) {
case 0:
tempdi = NULL;
break;
case 1:
tempdi = NULL;
break;
case 2:
case 6:
tempdi = xgifb_chrontel_tv;
break;
case 3:
tempdi = NULL;
break;
case 4:
tempdi = XGI_TVDataTable; tempdi = XGI_TVDataTable;
break;
case 5:
tempdi = NULL;
break;
default:
break;
}
if (tempdi == NULL) /* OEMUtil */
return NULL;
tempdx = pVBInfo->TVInfo; tempdx = pVBInfo->TVInfo;
if (pVBInfo->VBInfo & SetInSlaveMode) if (pVBInfo->VBInfo & SetInSlaveMode)
...@@ -1821,7 +1792,6 @@ static void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo, ...@@ -1821,7 +1792,6 @@ static void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo,
i++; i++;
} }
if (table == 0x04) {
switch (tempdi[i].DATAPTR) { switch (tempdi[i].DATAPTR) {
case 0: case 0:
return &XGI_ExtPALData[tempal]; return &XGI_ExtPALData[tempal];
...@@ -1868,24 +1838,6 @@ static void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo, ...@@ -1868,24 +1838,6 @@ static void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo,
default: default:
break; break;
} }
} else if (table == 0x02) {
switch (tempdi[i].DATAPTR) {
case 0:
return &XGI_CHTVUNTSCData[tempal];
break;
case 1:
return &XGI_CHTVONTSCData[tempal];
break;
case 2:
return &XGI_CHTVUPALData[tempal];
break;
case 3:
return &XGI_CHTVOPALData[tempal];
break;
default:
break;
}
}
return NULL; return NULL;
} }
...@@ -3414,10 +3366,8 @@ static void XGI_GetCRT2Data(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -3414,10 +3366,8 @@ static void XGI_GetCRT2Data(unsigned short ModeNo, unsigned short ModeIdIndex,
} }
if (pVBInfo->VBInfo & (SetCRT2ToTV)) { if (pVBInfo->VBInfo & (SetCRT2ToTV)) {
tempbx = 4; TVPtr = (struct SiS_TVData *) XGI_GetTVPtr(ModeNo, ModeIdIndex,
TVPtr = (struct SiS_TVData *) XGI_GetTVPtr(tempbx, RefreshRateTableIndex, pVBInfo);
ModeNo, ModeIdIndex, RefreshRateTableIndex,
pVBInfo);
pVBInfo->RVBHCMAX = TVPtr->RVBHCMAX; pVBInfo->RVBHCMAX = TVPtr->RVBHCMAX;
pVBInfo->RVBHCFACT = TVPtr->RVBHCFACT; pVBInfo->RVBHCFACT = TVPtr->RVBHCFACT;
......
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