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

staging: xgifb: delete unused "pVBInfo" parameters

Delete unused "pVBInfo" parameters from internal functions.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 88a3dfdd
...@@ -68,7 +68,7 @@ static int XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr, ...@@ -68,7 +68,7 @@ static int XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr,
int Clock; int Clock;
InitTo330Pointer(HwDeviceExtension->jChipType, XGI_Pr); InitTo330Pointer(HwDeviceExtension->jChipType, XGI_Pr);
XGI_SearchModeID(ModeNo, &ModeIdIndex, XGI_Pr); XGI_SearchModeID(ModeNo, &ModeIdIndex);
RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo, RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo,
ModeIdIndex, XGI_Pr); ModeIdIndex, XGI_Pr);
...@@ -96,7 +96,7 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, ...@@ -96,7 +96,7 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
unsigned char sr_data, cr_data, cr_data2; unsigned char sr_data, cr_data, cr_data2;
int B, C, D, F, temp, j; int B, C, D, F, temp, j;
InitTo330Pointer(HwDeviceExtension->jChipType, XGI_Pr); InitTo330Pointer(HwDeviceExtension->jChipType, XGI_Pr);
if (!XGI_SearchModeID(ModeNo, &ModeIdIndex, XGI_Pr)) if (!XGI_SearchModeID(ModeNo, &ModeIdIndex))
return 0; return 0;
RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo, RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo,
ModeIdIndex, XGI_Pr); ModeIdIndex, XGI_Pr);
......
...@@ -874,8 +874,7 @@ static u8 *xgifb_copy_rom(struct pci_dev *dev, size_t *rom_size) ...@@ -874,8 +874,7 @@ static u8 *xgifb_copy_rom(struct pci_dev *dev, size_t *rom_size)
return rom_copy; return rom_copy;
} }
static bool xgifb_read_vbios(struct pci_dev *pdev, static bool xgifb_read_vbios(struct pci_dev *pdev)
struct vb_device_info *pVBInfo)
{ {
struct xgifb_video_info *xgifb_info = pci_get_drvdata(pdev); struct xgifb_video_info *xgifb_info = pci_get_drvdata(pdev);
u8 *vbios; u8 *vbios;
...@@ -1098,7 +1097,7 @@ static void XGINew_GetXG21Sense(struct pci_dev *pdev, ...@@ -1098,7 +1097,7 @@ static void XGINew_GetXG21Sense(struct pci_dev *pdev,
struct xgifb_video_info *xgifb_info = pci_get_drvdata(pdev); struct xgifb_video_info *xgifb_info = pci_get_drvdata(pdev);
unsigned char Temp; unsigned char Temp;
if (xgifb_read_vbios(pdev, pVBInfo)) { /* For XG21 LVDS */ if (xgifb_read_vbios(pdev)) { /* For XG21 LVDS */
xgifb_reg_or(pVBInfo->P3d4, 0x32, LCDSense); xgifb_reg_or(pVBInfo->P3d4, 0x32, LCDSense);
/* LVDS on chip */ /* LVDS on chip */
xgifb_reg_and_or(pVBInfo->P3d4, 0x38, ~0xE0, 0xC0); xgifb_reg_and_or(pVBInfo->P3d4, 0x38, ~0xE0, 0xC0);
......
...@@ -2164,7 +2164,7 @@ static unsigned char XGI_GetLCDInfo(unsigned short ModeIdIndex, ...@@ -2164,7 +2164,7 @@ static unsigned char XGI_GetLCDInfo(unsigned short ModeIdIndex,
} }
unsigned char XGI_SearchModeID(unsigned short ModeNo, unsigned char XGI_SearchModeID(unsigned short ModeNo,
unsigned short *ModeIdIndex, struct vb_device_info *pVBInfo) unsigned short *ModeIdIndex)
{ {
for (*ModeIdIndex = 0;; (*ModeIdIndex)++) { for (*ModeIdIndex = 0;; (*ModeIdIndex)++) {
if (XGI330_EModeIDTable[*ModeIdIndex].Ext_ModeID == ModeNo) if (XGI330_EModeIDTable[*ModeIdIndex].Ext_ModeID == ModeNo)
...@@ -2715,8 +2715,7 @@ static void XGI_SetCRT2VCLK(unsigned short ModeIdIndex, ...@@ -2715,8 +2715,7 @@ static void XGI_SetCRT2VCLK(unsigned short ModeIdIndex,
xgifb_reg_or(pVBInfo->Part4Port, 0x12, 0x08); xgifb_reg_or(pVBInfo->Part4Port, 0x12, 0x08);
} }
static unsigned short XGI_GetColorDepth(unsigned short ModeIdIndex, static unsigned short XGI_GetColorDepth(unsigned short ModeIdIndex)
struct vb_device_info *pVBInfo)
{ {
unsigned short ColorDepth[6] = { 1, 2, 4, 4, 6, 8 }; unsigned short ColorDepth[6] = { 1, 2, 4, 4, 6, 8 };
short index; short index;
...@@ -2733,8 +2732,7 @@ static unsigned short XGI_GetColorDepth(unsigned short ModeIdIndex, ...@@ -2733,8 +2732,7 @@ static unsigned short XGI_GetColorDepth(unsigned short ModeIdIndex,
static unsigned short XGI_GetOffset(unsigned short ModeNo, static unsigned short XGI_GetOffset(unsigned short ModeNo,
unsigned short ModeIdIndex, unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex)
struct vb_device_info *pVBInfo)
{ {
unsigned short temp, colordepth, modeinfo, index, infoflag, unsigned short temp, colordepth, modeinfo, index, infoflag,
ColorDepth[] = { 0x01, 0x02, 0x04 }; ColorDepth[] = { 0x01, 0x02, 0x04 };
...@@ -2749,7 +2747,7 @@ static unsigned short XGI_GetOffset(unsigned short ModeNo, ...@@ -2749,7 +2747,7 @@ static unsigned short XGI_GetOffset(unsigned short ModeNo,
if (infoflag & InterlaceMode) if (infoflag & InterlaceMode)
temp = temp << 1; temp = temp << 1;
colordepth = XGI_GetColorDepth(ModeIdIndex, pVBInfo); colordepth = XGI_GetColorDepth(ModeIdIndex);
if ((ModeNo >= 0x7C) && (ModeNo <= 0x7E)) { if ((ModeNo >= 0x7C) && (ModeNo <= 0x7E)) {
temp = ModeNo - 0x7C; temp = ModeNo - 0x7C;
...@@ -2772,8 +2770,7 @@ static void XGI_SetCRT2Offset(unsigned short ModeNo, ...@@ -2772,8 +2770,7 @@ static void XGI_SetCRT2Offset(unsigned short ModeNo,
if (pVBInfo->VBInfo & SetInSlaveMode) if (pVBInfo->VBInfo & SetInSlaveMode)
return; return;
offset = XGI_GetOffset(ModeNo, ModeIdIndex, RefreshRateTableIndex, offset = XGI_GetOffset(ModeNo, ModeIdIndex, RefreshRateTableIndex);
pVBInfo);
temp = (unsigned char) (offset & 0xFF); temp = (unsigned char) (offset & 0xFF);
xgifb_reg_set(pVBInfo->Part1Port, 0x07, temp); xgifb_reg_set(pVBInfo->Part1Port, 0x07, temp);
temp = (unsigned char) ((offset & 0xFF00) >> 8); temp = (unsigned char) ((offset & 0xFF00) >> 8);
...@@ -4199,8 +4196,7 @@ static void XGI_DisableGatingCRT(struct vb_device_info *pVBInfo) ...@@ -4199,8 +4196,7 @@ static void XGI_DisableGatingCRT(struct vb_device_info *pVBInfo)
} }
static unsigned char XGI_XG21CheckLVDSMode(struct xgifb_video_info *xgifb_info, static unsigned char XGI_XG21CheckLVDSMode(struct xgifb_video_info *xgifb_info,
unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short ModeNo, unsigned short ModeIdIndex)
struct vb_device_info *pVBInfo)
{ {
unsigned short xres, yres, colordepth, modeflag, resindex; unsigned short xres, yres, colordepth, modeflag, resindex;
...@@ -4229,7 +4225,7 @@ static unsigned char XGI_XG21CheckLVDSMode(struct xgifb_video_info *xgifb_info, ...@@ -4229,7 +4225,7 @@ static unsigned char XGI_XG21CheckLVDSMode(struct xgifb_video_info *xgifb_info,
if (xres != xgifb_info->lvds_data.LVDSHDE || if (xres != xgifb_info->lvds_data.LVDSHDE ||
yres != xgifb_info->lvds_data.LVDSVDE) { yres != xgifb_info->lvds_data.LVDSVDE) {
colordepth = XGI_GetColorDepth(ModeIdIndex, pVBInfo); colordepth = XGI_GetColorDepth(ModeIdIndex);
if (colordepth > 2) if (colordepth > 2)
return 0; return 0;
} }
...@@ -5194,7 +5190,7 @@ static unsigned char XGI_SetCRT2Group301(unsigned short ModeNo, ...@@ -5194,7 +5190,7 @@ static unsigned char XGI_SetCRT2Group301(unsigned short ModeNo,
unsigned short ModeIdIndex, RefreshRateTableIndex; unsigned short ModeIdIndex, RefreshRateTableIndex;
pVBInfo->SetFlag |= ProgrammingCRT2; pVBInfo->SetFlag |= ProgrammingCRT2;
XGI_SearchModeID(ModeNo, &ModeIdIndex, pVBInfo); XGI_SearchModeID(ModeNo, &ModeIdIndex);
pVBInfo->SelectCRT2Rate = 4; pVBInfo->SelectCRT2Rate = 4;
RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo, RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo,
ModeIdIndex, pVBInfo); ModeIdIndex, pVBInfo);
...@@ -5494,7 +5490,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, ...@@ -5494,7 +5490,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
if (HwDeviceExtension->jChipType < XG20) if (HwDeviceExtension->jChipType < XG20)
XGI_UnLockCRT2(pVBInfo); XGI_UnLockCRT2(pVBInfo);
XGI_SearchModeID(ModeNo, &ModeIdIndex, pVBInfo); XGI_SearchModeID(ModeNo, &ModeIdIndex);
if (HwDeviceExtension->jChipType < XG20) { if (HwDeviceExtension->jChipType < XG20) {
XGI_GetVBInfo(ModeIdIndex, pVBInfo); XGI_GetVBInfo(ModeIdIndex, pVBInfo);
...@@ -5533,8 +5529,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, ...@@ -5533,8 +5529,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
else { else {
if (pVBInfo->IF_DEF_LVDS == 1) if (pVBInfo->IF_DEF_LVDS == 1)
if (!XGI_XG21CheckLVDSMode(xgifb_info, ModeNo, if (!XGI_XG21CheckLVDSMode(xgifb_info, ModeNo,
ModeIdIndex, ModeIdIndex))
pVBInfo))
return 0; return 0;
pVBInfo->ModeType = XGI330_EModeIDTable[ModeIdIndex]. pVBInfo->ModeType = XGI330_EModeIDTable[ModeIdIndex].
......
...@@ -14,8 +14,7 @@ extern unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, ...@@ -14,8 +14,7 @@ extern unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
unsigned short ModeNo) ; unsigned short ModeNo) ;
extern unsigned char XGI_SearchModeID(unsigned short ModeNo, extern unsigned char XGI_SearchModeID(unsigned short ModeNo,
unsigned short *ModeIdIndex, unsigned short *ModeIdIndex);
struct vb_device_info *);
extern unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, extern unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE,
unsigned short ModeNo, unsigned short ModeNo,
unsigned short ModeIdIndex, unsigned short ModeIdIndex,
......
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