Commit b053af16 authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman
Browse files

staging: xgifb: delete unused "HwDeviceExtension" parameters



Delete unused "HwDeviceExtension" 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 6b6e6a39
Loading
Loading
Loading
Loading
+13 −18
Original line number Original line Diff line number Diff line
@@ -102,10 +102,8 @@ static void XGINew_DDR1x_MRS_340(unsigned long P3c4,
	xgifb_reg_set(P3c4, 0x1B, 0x00);
	xgifb_reg_set(P3c4, 0x1B, 0x00);
}
}


static void XGINew_SetMemoryClock(struct xgi_hw_device_info *HwDeviceExtension,
static void XGINew_SetMemoryClock(struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{

	xgifb_reg_set(pVBInfo->P3c4,
	xgifb_reg_set(pVBInfo->P3c4,
		      0x28,
		      0x28,
		      pVBInfo->MCLKData[pVBInfo->ram_type].SR28);
		      pVBInfo->MCLKData[pVBInfo->ram_type].SR28);
@@ -133,7 +131,7 @@ static void XGINew_DDRII_Bootup_XG27(
{
{
	unsigned long P3d4 = P3c4 + 0x10;
	unsigned long P3d4 = P3c4 + 0x10;
	pVBInfo->ram_type = XGINew_GetXG20DRAMType(HwDeviceExtension, pVBInfo);
	pVBInfo->ram_type = XGINew_GetXG20DRAMType(HwDeviceExtension, pVBInfo);
	XGINew_SetMemoryClock(HwDeviceExtension, pVBInfo);
	XGINew_SetMemoryClock(pVBInfo);


	/* Set Double Frequency */
	/* Set Double Frequency */
	xgifb_reg_set(P3d4, 0x97, pVBInfo->XGINew_CR97); /* CR97 */
	xgifb_reg_set(P3d4, 0x97, pVBInfo->XGINew_CR97); /* CR97 */
@@ -206,7 +204,7 @@ static void XGINew_DDR2_MRS_XG20(struct xgi_hw_device_info *HwDeviceExtension,
	unsigned long P3d4 = P3c4 + 0x10;
	unsigned long P3d4 = P3c4 + 0x10;


	pVBInfo->ram_type = XGINew_GetXG20DRAMType(HwDeviceExtension, pVBInfo);
	pVBInfo->ram_type = XGINew_GetXG20DRAMType(HwDeviceExtension, pVBInfo);
	XGINew_SetMemoryClock(HwDeviceExtension, pVBInfo);
	XGINew_SetMemoryClock(pVBInfo);


	xgifb_reg_set(P3d4, 0x97, 0x11); /* CR97 */
	xgifb_reg_set(P3d4, 0x97, 0x11); /* CR97 */


@@ -280,7 +278,7 @@ static void XGINew_DDR1x_DefaultRegister(
	unsigned long P3d4 = Port, P3c4 = Port - 0x10;
	unsigned long P3d4 = Port, P3c4 = Port - 0x10;


	if (HwDeviceExtension->jChipType >= XG20) {
	if (HwDeviceExtension->jChipType >= XG20) {
		XGINew_SetMemoryClock(HwDeviceExtension, pVBInfo);
		XGINew_SetMemoryClock(pVBInfo);
		xgifb_reg_set(P3d4,
		xgifb_reg_set(P3d4,
			      0x82,
			      0x82,
			      pVBInfo->CR40[11][pVBInfo->ram_type]); /* CR82 */
			      pVBInfo->CR40[11][pVBInfo->ram_type]); /* CR82 */
@@ -296,7 +294,7 @@ static void XGINew_DDR1x_DefaultRegister(


		XGINew_DDR1x_MRS_XG20(P3c4, pVBInfo);
		XGINew_DDR1x_MRS_XG20(P3c4, pVBInfo);
	} else {
	} else {
		XGINew_SetMemoryClock(HwDeviceExtension, pVBInfo);
		XGINew_SetMemoryClock(pVBInfo);


		switch (HwDeviceExtension->jChipType) {
		switch (HwDeviceExtension->jChipType) {
		case XG42:
		case XG42:
@@ -948,8 +946,7 @@ static bool xgifb_read_vbios(struct pci_dev *pdev,
	return false;
	return false;
}
}


static void XGINew_ChkSenseStatus(struct xgi_hw_device_info *HwDeviceExtension,
static void XGINew_ChkSenseStatus(struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{
	unsigned short tempbx = 0, temp, tempcx, CR3CData;
	unsigned short tempbx = 0, temp, tempcx, CR3CData;


@@ -991,8 +988,7 @@ static void XGINew_ChkSenseStatus(struct xgi_hw_device_info *HwDeviceExtension,
	xgifb_reg_set(pVBInfo->P3d4, 0x3e, ((tempbx & 0xFF00) >> 8));
	xgifb_reg_set(pVBInfo->P3d4, 0x3e, ((tempbx & 0xFF00) >> 8));
}
}


static void XGINew_SetModeScratch(struct xgi_hw_device_info *HwDeviceExtension,
static void XGINew_SetModeScratch(struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{
	unsigned short temp, tempcl = 0, tempch = 0, CR31Data, CR38Data;
	unsigned short temp, tempcl = 0, tempch = 0, CR31Data, CR38Data;


@@ -1126,8 +1122,7 @@ static void XGINew_GetXG21Sense(struct pci_dev *pdev,
	}
	}
}
}


static void XGINew_GetXG27Sense(struct xgi_hw_device_info *HwDeviceExtension,
static void XGINew_GetXG27Sense(struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{
	unsigned char Temp, bCR4A;
	unsigned char Temp, bCR4A;


@@ -1222,7 +1217,7 @@ unsigned char XGIInitNew(struct pci_dev *pdev)
		XGINew_GetXG21Sense(pdev, pVBInfo);
		XGINew_GetXG21Sense(pdev, pVBInfo);


	if (HwDeviceExtension->jChipType == XG27)
	if (HwDeviceExtension->jChipType == XG27)
		XGINew_GetXG27Sense(HwDeviceExtension, pVBInfo);
		XGINew_GetXG27Sense(pVBInfo);


	/* Reset Extended register */
	/* Reset Extended register */


@@ -1294,7 +1289,7 @@ unsigned char XGIInitNew(struct pci_dev *pdev)


	if (HwDeviceExtension->jChipType < XG20) {
	if (HwDeviceExtension->jChipType < XG20) {
		/* Set VB */
		/* Set VB */
		XGI_UnLockCRT2(HwDeviceExtension, pVBInfo);
		XGI_UnLockCRT2(pVBInfo);
		/* disable VideoCapture */
		/* disable VideoCapture */
		xgifb_reg_and_or(pVBInfo->Part0Port, 0x3F, 0xEF, 0x00);
		xgifb_reg_and_or(pVBInfo->Part0Port, 0x3F, 0xEF, 0x00);
		xgifb_reg_set(pVBInfo->Part1Port, 0x00, 0x00);
		xgifb_reg_set(pVBInfo->Part1Port, 0x00, 0x00);
@@ -1334,7 +1329,7 @@ unsigned char XGIInitNew(struct pci_dev *pdev)
			xgifb_reg_set(pVBInfo->Part4Port,
			xgifb_reg_set(pVBInfo->Part4Port,
				      0x10, XGI330_CRT2Data_4_10);
				      0x10, XGI330_CRT2Data_4_10);
			xgifb_reg_set(pVBInfo->Part4Port, 0x0F, 0x3F);
			xgifb_reg_set(pVBInfo->Part4Port, 0x0F, 0x3F);
			XGI_LockCRT2(HwDeviceExtension, pVBInfo);
			XGI_LockCRT2(pVBInfo);
		}
		}
	} /* != XG20 */
	} /* != XG20 */


@@ -1370,8 +1365,8 @@ unsigned char XGIInitNew(struct pci_dev *pdev)
	xgifb_reg_set(pVBInfo->P3c4, 0x22, 0xfa);
	xgifb_reg_set(pVBInfo->P3c4, 0x22, 0xfa);
	xgifb_reg_set(pVBInfo->P3c4, 0x21, 0xa3);
	xgifb_reg_set(pVBInfo->P3c4, 0x21, 0xa3);


	XGINew_ChkSenseStatus(HwDeviceExtension, pVBInfo);
	XGINew_ChkSenseStatus(pVBInfo);
	XGINew_SetModeScratch(HwDeviceExtension, pVBInfo);
	XGINew_SetModeScratch(pVBInfo);


	xgifb_reg_set(pVBInfo->P3d4, 0x8c, 0x87);
	xgifb_reg_set(pVBInfo->P3d4, 0x8c, 0x87);


+24 −54
Original line number Original line Diff line number Diff line
@@ -77,8 +77,7 @@ static void XGI_SetSeqRegs(struct vb_device_info *pVBInfo)
	}
	}
}
}


static void XGI_SetCRTCRegs(struct xgi_hw_device_info *HwDeviceExtension,
static void XGI_SetCRTCRegs(struct vb_device_info *pVBInfo)
			    struct vb_device_info *pVBInfo)
{
{
	unsigned char CRTCdata;
	unsigned char CRTCdata;
	unsigned short i;
	unsigned short i;
@@ -678,8 +677,7 @@ static void XGI_UpdateXG21CRTC(unsigned short ModeNo,
	}
	}
}
}


static void XGI_SetCRT1DE(struct xgi_hw_device_info *HwDeviceExtension,
static void XGI_SetCRT1DE(unsigned short ModeIdIndex,
		unsigned short ModeIdIndex,
		unsigned short RefreshRateTableIndex,
		unsigned short RefreshRateTableIndex,
		struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{
@@ -827,7 +825,6 @@ static void XGI_SetCRT1Offset(unsigned short ModeNo,


static unsigned short XGI_GetVCLK2Ptr(unsigned short ModeIdIndex,
static unsigned short XGI_GetVCLK2Ptr(unsigned short ModeIdIndex,
		unsigned short RefreshRateTableIndex,
		unsigned short RefreshRateTableIndex,
		struct xgi_hw_device_info *HwDeviceExtension,
		struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{
	unsigned short VCLKIndex, modeflag;
	unsigned short VCLKIndex, modeflag;
@@ -889,7 +886,7 @@ static void XGI_SetCRT1VCLK(unsigned short ModeIdIndex,
				VB_SIS302LV | VB_XGI301C)) &&
				VB_SIS302LV | VB_XGI301C)) &&
	    (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) {
	    (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) {
		vclkindex = XGI_GetVCLK2Ptr(ModeIdIndex, RefreshRateTableIndex,
		vclkindex = XGI_GetVCLK2Ptr(ModeIdIndex, RefreshRateTableIndex,
					    HwDeviceExtension, pVBInfo);
					    pVBInfo);
		data = xgifb_reg_get(pVBInfo->P3c4, 0x31) & 0xCF;
		data = xgifb_reg_get(pVBInfo->P3c4, 0x31) & 0xCF;
		xgifb_reg_set(pVBInfo->P3c4, 0x31, data);
		xgifb_reg_set(pVBInfo->P3c4, 0x31, data);
		data = XGI_VBVCLKData[vclkindex].Part4_A;
		data = XGI_VBVCLKData[vclkindex].Part4_A;
@@ -1774,8 +1771,7 @@ static void XGI_SetCRT2ECLK(unsigned short ModeIdIndex,
	}
	}
}
}


static void XGI_UpdateModeInfo(struct xgi_hw_device_info *HwDeviceExtension,
static void XGI_UpdateModeInfo(struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{
	unsigned short tempcl, tempch, temp, tempbl, tempax;
	unsigned short tempcl, tempch, temp, tempbl, tempax;


@@ -1902,7 +1898,6 @@ void XGI_GetVBType(struct vb_device_info *pVBInfo)
}
}


static void XGI_GetVBInfo(unsigned short ModeIdIndex,
static void XGI_GetVBInfo(unsigned short ModeIdIndex,
		struct xgi_hw_device_info *HwDeviceExtension,
		struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{
	unsigned short tempax, push, tempbx, temp, modeflag;
	unsigned short tempax, push, tempbx, temp, modeflag;
@@ -2745,7 +2740,6 @@ 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 xgi_hw_device_info *HwDeviceExtension,
		struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{
	unsigned short temp, colordepth, modeinfo, index, infoflag,
	unsigned short temp, colordepth, modeinfo, index, infoflag,
@@ -2776,7 +2770,6 @@ static unsigned short XGI_GetOffset(unsigned short ModeNo,
static void XGI_SetCRT2Offset(unsigned short ModeNo,
static void XGI_SetCRT2Offset(unsigned short ModeNo,
		unsigned short ModeIdIndex,
		unsigned short ModeIdIndex,
		unsigned short RefreshRateTableIndex,
		unsigned short RefreshRateTableIndex,
		struct xgi_hw_device_info *HwDeviceExtension,
		struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{
	unsigned short offset;
	unsigned short offset;
@@ -2786,7 +2779,7 @@ static void XGI_SetCRT2Offset(unsigned short ModeNo,
		return;
		return;


	offset = XGI_GetOffset(ModeNo, ModeIdIndex, RefreshRateTableIndex,
	offset = XGI_GetOffset(ModeNo, ModeIdIndex, RefreshRateTableIndex,
			HwDeviceExtension, pVBInfo);
			       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);
@@ -2804,14 +2797,12 @@ static void XGI_SetCRT2FIFO(struct vb_device_info *pVBInfo)
}
}


static void XGI_PreSetGroup1(unsigned short ModeNo, unsigned short ModeIdIndex,
static void XGI_PreSetGroup1(unsigned short ModeNo, unsigned short ModeIdIndex,
		struct xgi_hw_device_info *HwDeviceExtension,
		unsigned short RefreshRateTableIndex,
		unsigned short RefreshRateTableIndex,
		struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{
	u8 tempcx;
	u8 tempcx;


	XGI_SetCRT2Offset(ModeNo, ModeIdIndex, RefreshRateTableIndex,
	XGI_SetCRT2Offset(ModeNo, ModeIdIndex, RefreshRateTableIndex, pVBInfo);
			HwDeviceExtension, pVBInfo);
	XGI_SetCRT2FIFO(pVBInfo);
	XGI_SetCRT2FIFO(pVBInfo);


	for (tempcx = 4; tempcx < 7; tempcx++)
	for (tempcx = 4; tempcx < 7; tempcx++)
@@ -2822,7 +2813,6 @@ static void XGI_PreSetGroup1(unsigned short ModeNo, unsigned short ModeIdIndex,
}
}


static void XGI_SetGroup1(unsigned short ModeIdIndex,
static void XGI_SetGroup1(unsigned short ModeIdIndex,
		struct xgi_hw_device_info *HwDeviceExtension,
		unsigned short RefreshRateTableIndex,
		unsigned short RefreshRateTableIndex,
		struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{
@@ -2977,7 +2967,6 @@ static unsigned short XGI_GetVGAHT2(struct vb_device_info *pVBInfo)
}
}


static void XGI_SetLockRegs(unsigned short ModeNo, unsigned short ModeIdIndex,
static void XGI_SetLockRegs(unsigned short ModeNo, unsigned short ModeIdIndex,
		struct xgi_hw_device_info *HwDeviceExtension,
		unsigned short RefreshRateTableIndex,
		unsigned short RefreshRateTableIndex,
		struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{
@@ -3270,7 +3259,6 @@ static void XGI_SetLockRegs(unsigned short ModeNo, unsigned short ModeIdIndex,


static void XGI_SetGroup2(unsigned short ModeNo, unsigned short ModeIdIndex,
static void XGI_SetGroup2(unsigned short ModeNo, unsigned short ModeIdIndex,
		unsigned short RefreshRateTableIndex,
		unsigned short RefreshRateTableIndex,
		struct xgi_hw_device_info *HwDeviceExtension,
		struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{
	unsigned short i, j, tempax, tempbx, tempcx, temp, push1, push2,
	unsigned short i, j, tempax, tempbx, tempcx, temp, push1, push2,
@@ -3700,7 +3688,6 @@ static void XGI_SetGroup2(unsigned short ModeNo, unsigned short ModeIdIndex,
}
}


static void XGI_SetLCDRegs(unsigned short ModeIdIndex,
static void XGI_SetLCDRegs(unsigned short ModeIdIndex,
		struct xgi_hw_device_info *HwDeviceExtension,
		unsigned short RefreshRateTableIndex,
		unsigned short RefreshRateTableIndex,
		struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{
@@ -4035,7 +4022,6 @@ static void XGI_SetGroup3(unsigned short ModeIdIndex,


static void XGI_SetGroup4(unsigned short ModeIdIndex,
static void XGI_SetGroup4(unsigned short ModeIdIndex,
		unsigned short RefreshRateTableIndex,
		unsigned short RefreshRateTableIndex,
		struct xgi_hw_device_info *HwDeviceExtension,
		struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{
	unsigned short tempax, tempcx, tempbx, modeflag, temp, temp2;
	unsigned short tempax, tempcx, tempbx, modeflag, temp, temp2;
@@ -4216,10 +4202,8 @@ static void XGI_SetGroup5(struct vb_device_info *pVBInfo)
	}
	}
}
}


static void XGI_DisableGatingCRT(struct xgi_hw_device_info *HwDeviceExtension,
static void XGI_DisableGatingCRT(struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{

	xgifb_reg_and_or(pVBInfo->P3d4, 0x63, 0xBF, 0x00);
	xgifb_reg_and_or(pVBInfo->P3d4, 0x63, 0xBF, 0x00);
}
}


@@ -4949,8 +4933,7 @@ static void XGI_OEM310Setting(unsigned short ModeIdIndex,
/* Output : */
/* Output : */
/* Description : Origin code for crt2group */
/* Description : Origin code for crt2group */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
static void XGI_SetCRT2ModeRegs(struct xgi_hw_device_info *HwDeviceExtension,
static void XGI_SetCRT2ModeRegs(struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{
	unsigned short tempbl;
	unsigned short tempbl;
	short tempcl;
	short tempcl;
@@ -5112,20 +5095,14 @@ static void XGI_SetCRT2ModeRegs(struct xgi_hw_device_info *HwDeviceExtension,
}
}




void XGI_UnLockCRT2(struct xgi_hw_device_info *HwDeviceExtension,
void XGI_UnLockCRT2(struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{

	xgifb_reg_and_or(pVBInfo->Part1Port, 0x2f, 0xFF, 0x01);
	xgifb_reg_and_or(pVBInfo->Part1Port, 0x2f, 0xFF, 0x01);

}
}


void XGI_LockCRT2(struct xgi_hw_device_info *HwDeviceExtension,
void XGI_LockCRT2(struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{

	xgifb_reg_and_or(pVBInfo->Part1Port, 0x2F, 0xFE, 0x00);
	xgifb_reg_and_or(pVBInfo->Part1Port, 0x2F, 0xFE, 0x00);

}
}


unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE,
unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE,
@@ -5234,20 +5211,14 @@ static unsigned char XGI_SetCRT2Group301(unsigned short ModeNo,
	XGI_SaveCRT2Info(ModeNo, pVBInfo);
	XGI_SaveCRT2Info(ModeNo, pVBInfo);
	XGI_GetCRT2ResInfo(ModeIdIndex, pVBInfo);
	XGI_GetCRT2ResInfo(ModeIdIndex, pVBInfo);
	XGI_GetCRT2Data(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
	XGI_GetCRT2Data(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
	XGI_PreSetGroup1(ModeNo, ModeIdIndex, HwDeviceExtension,
	XGI_PreSetGroup1(ModeNo, ModeIdIndex, RefreshRateTableIndex, pVBInfo);
			RefreshRateTableIndex, pVBInfo);
	XGI_SetGroup1(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
	XGI_SetGroup1(ModeIdIndex, HwDeviceExtension, RefreshRateTableIndex,
	XGI_SetLockRegs(ModeNo, ModeIdIndex, RefreshRateTableIndex, pVBInfo);
		      pVBInfo);
	XGI_SetGroup2(ModeNo, ModeIdIndex, RefreshRateTableIndex, pVBInfo);
	XGI_SetLockRegs(ModeNo, ModeIdIndex, HwDeviceExtension,
	XGI_SetLCDRegs(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
			RefreshRateTableIndex, pVBInfo);
	XGI_SetGroup2(ModeNo, ModeIdIndex, RefreshRateTableIndex,
			HwDeviceExtension, pVBInfo);
	XGI_SetLCDRegs(ModeIdIndex, HwDeviceExtension, RefreshRateTableIndex,
		       pVBInfo);
	XGI_SetTap4Regs(pVBInfo);
	XGI_SetTap4Regs(pVBInfo);
	XGI_SetGroup3(ModeIdIndex, pVBInfo);
	XGI_SetGroup3(ModeIdIndex, pVBInfo);
	XGI_SetGroup4(ModeIdIndex, RefreshRateTableIndex, HwDeviceExtension,
	XGI_SetGroup4(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
		      pVBInfo);
	XGI_SetCRT2VCLK(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
	XGI_SetCRT2VCLK(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
	XGI_SetGroup5(pVBInfo);
	XGI_SetGroup5(pVBInfo);
	XGI_AutoThreshold(pVBInfo);
	XGI_AutoThreshold(pVBInfo);
@@ -5408,7 +5379,7 @@ static void XGI_EnableBridge(struct xgifb_video_info *xgifb_info,
		/* EnablePart4_1F */
		/* EnablePart4_1F */
		xgifb_reg_or(pVBInfo->Part4Port, 0x1F, tempah);
		xgifb_reg_or(pVBInfo->Part4Port, 0x1F, tempah);


		XGI_DisableGatingCRT(HwDeviceExtension, pVBInfo);
		XGI_DisableGatingCRT(pVBInfo);
		XGI_DisplayOn(xgifb_info, HwDeviceExtension, pVBInfo);
		XGI_DisplayOn(xgifb_info, HwDeviceExtension, pVBInfo);
	} /* 301 */
	} /* 301 */
	else { /* LVDS */
	else { /* LVDS */
@@ -5435,7 +5406,7 @@ static void XGI_SetCRT1Group(struct xgifb_video_info *xgifb_info,


	XGI_SetSeqRegs(pVBInfo);
	XGI_SetSeqRegs(pVBInfo);
	outb(XGI330_StandTable.MISC, pVBInfo->P3c2);
	outb(XGI330_StandTable.MISC, pVBInfo->P3c2);
	XGI_SetCRTCRegs(HwDeviceExtension, pVBInfo);
	XGI_SetCRTCRegs(pVBInfo);
	XGI_SetATTRegs(ModeIdIndex, pVBInfo);
	XGI_SetATTRegs(ModeIdIndex, pVBInfo);
	XGI_SetGRCRegs(pVBInfo);
	XGI_SetGRCRegs(pVBInfo);
	XGI_ClearExt1Regs(pVBInfo);
	XGI_ClearExt1Regs(pVBInfo);
@@ -5463,8 +5434,7 @@ static void XGI_SetCRT1Group(struct xgifb_video_info *xgifb_info,
		XGI_SetSync(RefreshRateTableIndex, pVBInfo);
		XGI_SetSync(RefreshRateTableIndex, pVBInfo);
		XGI_SetCRT1CRTC(ModeIdIndex, RefreshRateTableIndex,
		XGI_SetCRT1CRTC(ModeIdIndex, RefreshRateTableIndex,
				pVBInfo, HwDeviceExtension);
				pVBInfo, HwDeviceExtension);
		XGI_SetCRT1DE(HwDeviceExtension, ModeIdIndex,
		XGI_SetCRT1DE(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
				RefreshRateTableIndex, pVBInfo);
		XGI_SetCRT1Offset(ModeNo, ModeIdIndex, RefreshRateTableIndex,
		XGI_SetCRT1Offset(ModeNo, ModeIdIndex, RefreshRateTableIndex,
				HwDeviceExtension, pVBInfo);
				HwDeviceExtension, pVBInfo);
		XGI_SetCRT1VCLK(ModeIdIndex, HwDeviceExtension,
		XGI_SetCRT1VCLK(ModeIdIndex, HwDeviceExtension,
@@ -5532,12 +5502,12 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
	xgifb_reg_set(pVBInfo->P3c4, 0x05, 0x86);
	xgifb_reg_set(pVBInfo->P3c4, 0x05, 0x86);


	if (HwDeviceExtension->jChipType < XG20)
	if (HwDeviceExtension->jChipType < XG20)
		XGI_UnLockCRT2(HwDeviceExtension, pVBInfo);
		XGI_UnLockCRT2(pVBInfo);


	XGI_SearchModeID(ModeNo, &ModeIdIndex, pVBInfo);
	XGI_SearchModeID(ModeNo, &ModeIdIndex, pVBInfo);


	if (HwDeviceExtension->jChipType < XG20) {
	if (HwDeviceExtension->jChipType < XG20) {
		XGI_GetVBInfo(ModeIdIndex, HwDeviceExtension, pVBInfo);
		XGI_GetVBInfo(ModeIdIndex, pVBInfo);
		XGI_GetTVInfo(ModeIdIndex, pVBInfo);
		XGI_GetTVInfo(ModeIdIndex, pVBInfo);
		XGI_GetLCDInfo(ModeIdIndex, pVBInfo);
		XGI_GetLCDInfo(ModeIdIndex, pVBInfo);
		XGI_DisableBridge(xgifb_info, HwDeviceExtension, pVBInfo);
		XGI_DisableBridge(xgifb_info, HwDeviceExtension, pVBInfo);
@@ -5566,7 +5536,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
			}
			}
		}
		}


		XGI_SetCRT2ModeRegs(HwDeviceExtension, pVBInfo);
		XGI_SetCRT2ModeRegs(pVBInfo);
		XGI_OEM310Setting(ModeIdIndex, pVBInfo); /*0212*/
		XGI_OEM310Setting(ModeIdIndex, pVBInfo); /*0212*/
		XGI_EnableBridge(xgifb_info, HwDeviceExtension, pVBInfo);
		XGI_EnableBridge(xgifb_info, HwDeviceExtension, pVBInfo);
	} /* !XG20 */
	} /* !XG20 */
@@ -5591,10 +5561,10 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
		XGI_DisplayOn(xgifb_info, HwDeviceExtension, pVBInfo);
		XGI_DisplayOn(xgifb_info, HwDeviceExtension, pVBInfo);
	}
	}


	XGI_UpdateModeInfo(HwDeviceExtension, pVBInfo);
	XGI_UpdateModeInfo(pVBInfo);


	if (HwDeviceExtension->jChipType < XG20)
	if (HwDeviceExtension->jChipType < XG20)
		XGI_LockCRT2(HwDeviceExtension, pVBInfo);
		XGI_LockCRT2(pVBInfo);


	return 1;
	return 1;
}
}
+2 −4
Original line number Original line Diff line number Diff line
@@ -2,10 +2,8 @@
#define _VBSETMODE_
#define _VBSETMODE_


extern void InitTo330Pointer(unsigned char, struct vb_device_info *);
extern void InitTo330Pointer(unsigned char, struct vb_device_info *);
extern void XGI_UnLockCRT2(struct xgi_hw_device_info *HwDeviceExtension,
extern void XGI_UnLockCRT2(struct vb_device_info *);
			   struct vb_device_info *);
extern void XGI_LockCRT2(struct vb_device_info *);
extern void XGI_LockCRT2(struct xgi_hw_device_info *HwDeviceExtension,
			 struct vb_device_info *);
extern void XGI_DisplayOff(struct xgifb_video_info *,
extern void XGI_DisplayOff(struct xgifb_video_info *,
			   struct xgi_hw_device_info *,
			   struct xgi_hw_device_info *,
			   struct vb_device_info *);
			   struct vb_device_info *);