xgifb_reg_set(P3c4, 0x1B, 0x00);
}
-static void XGINew_SetMemoryClock(struct xgi_hw_device_info *HwDeviceExtension,
- struct vb_device_info *pVBInfo)
+static void XGINew_SetMemoryClock(struct vb_device_info *pVBInfo)
{
-
xgifb_reg_set(pVBInfo->P3c4,
0x28,
pVBInfo->MCLKData[pVBInfo->ram_type].SR28);
{
unsigned long P3d4 = P3c4 + 0x10;
pVBInfo->ram_type = XGINew_GetXG20DRAMType(HwDeviceExtension, pVBInfo);
- XGINew_SetMemoryClock(HwDeviceExtension, pVBInfo);
+ XGINew_SetMemoryClock(pVBInfo);
/* Set Double Frequency */
xgifb_reg_set(P3d4, 0x97, pVBInfo->XGINew_CR97); /* CR97 */
unsigned long P3d4 = P3c4 + 0x10;
pVBInfo->ram_type = XGINew_GetXG20DRAMType(HwDeviceExtension, pVBInfo);
- XGINew_SetMemoryClock(HwDeviceExtension, pVBInfo);
+ XGINew_SetMemoryClock(pVBInfo);
xgifb_reg_set(P3d4, 0x97, 0x11); /* CR97 */
unsigned long P3d4 = Port, P3c4 = Port - 0x10;
if (HwDeviceExtension->jChipType >= XG20) {
- XGINew_SetMemoryClock(HwDeviceExtension, pVBInfo);
+ XGINew_SetMemoryClock(pVBInfo);
xgifb_reg_set(P3d4,
0x82,
pVBInfo->CR40[11][pVBInfo->ram_type]); /* CR82 */
XGINew_DDR1x_MRS_XG20(P3c4, pVBInfo);
} else {
- XGINew_SetMemoryClock(HwDeviceExtension, pVBInfo);
+ XGINew_SetMemoryClock(pVBInfo);
switch (HwDeviceExtension->jChipType) {
case XG42:
return false;
}
-static void XGINew_ChkSenseStatus(struct xgi_hw_device_info *HwDeviceExtension,
- struct vb_device_info *pVBInfo)
+static void XGINew_ChkSenseStatus(struct vb_device_info *pVBInfo)
{
unsigned short tempbx = 0, temp, tempcx, CR3CData;
xgifb_reg_set(pVBInfo->P3d4, 0x3e, ((tempbx & 0xFF00) >> 8));
}
-static void XGINew_SetModeScratch(struct xgi_hw_device_info *HwDeviceExtension,
- struct vb_device_info *pVBInfo)
+static void XGINew_SetModeScratch(struct vb_device_info *pVBInfo)
{
unsigned short temp, tempcl = 0, tempch = 0, CR31Data, CR38Data;
}
}
-static void XGINew_GetXG27Sense(struct xgi_hw_device_info *HwDeviceExtension,
- struct vb_device_info *pVBInfo)
+static void XGINew_GetXG27Sense(struct vb_device_info *pVBInfo)
{
unsigned char Temp, bCR4A;
XGINew_GetXG21Sense(pdev, pVBInfo);
if (HwDeviceExtension->jChipType == XG27)
- XGINew_GetXG27Sense(HwDeviceExtension, pVBInfo);
+ XGINew_GetXG27Sense(pVBInfo);
/* Reset Extended register */
if (HwDeviceExtension->jChipType < XG20) {
/* Set VB */
- XGI_UnLockCRT2(HwDeviceExtension, pVBInfo);
+ XGI_UnLockCRT2(pVBInfo);
/* disable VideoCapture */
xgifb_reg_and_or(pVBInfo->Part0Port, 0x3F, 0xEF, 0x00);
xgifb_reg_set(pVBInfo->Part1Port, 0x00, 0x00);
xgifb_reg_set(pVBInfo->Part4Port,
0x10, XGI330_CRT2Data_4_10);
xgifb_reg_set(pVBInfo->Part4Port, 0x0F, 0x3F);
- XGI_LockCRT2(HwDeviceExtension, pVBInfo);
+ XGI_LockCRT2(pVBInfo);
}
} /* != XG20 */
xgifb_reg_set(pVBInfo->P3c4, 0x22, 0xfa);
xgifb_reg_set(pVBInfo->P3c4, 0x21, 0xa3);
- XGINew_ChkSenseStatus(HwDeviceExtension, pVBInfo);
- XGINew_SetModeScratch(HwDeviceExtension, pVBInfo);
+ XGINew_ChkSenseStatus(pVBInfo);
+ XGINew_SetModeScratch(pVBInfo);
xgifb_reg_set(pVBInfo->P3d4, 0x8c, 0x87);
}
}
-static void XGI_SetCRTCRegs(struct xgi_hw_device_info *HwDeviceExtension,
- struct vb_device_info *pVBInfo)
+static void XGI_SetCRTCRegs(struct vb_device_info *pVBInfo)
{
unsigned char CRTCdata;
unsigned short i;
}
}
-static void XGI_SetCRT1DE(struct xgi_hw_device_info *HwDeviceExtension,
- unsigned short ModeIdIndex,
+static void XGI_SetCRT1DE(unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo)
{
static unsigned short XGI_GetVCLK2Ptr(unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex,
- struct xgi_hw_device_info *HwDeviceExtension,
struct vb_device_info *pVBInfo)
{
unsigned short VCLKIndex, modeflag;
VB_SIS302LV | VB_XGI301C)) &&
(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) {
vclkindex = XGI_GetVCLK2Ptr(ModeIdIndex, RefreshRateTableIndex,
- HwDeviceExtension, pVBInfo);
+ pVBInfo);
data = xgifb_reg_get(pVBInfo->P3c4, 0x31) & 0xCF;
xgifb_reg_set(pVBInfo->P3c4, 0x31, data);
data = XGI_VBVCLKData[vclkindex].Part4_A;
}
}
-static void XGI_UpdateModeInfo(struct xgi_hw_device_info *HwDeviceExtension,
- struct vb_device_info *pVBInfo)
+static void XGI_UpdateModeInfo(struct vb_device_info *pVBInfo)
{
unsigned short tempcl, tempch, temp, tempbl, tempax;
}
static void XGI_GetVBInfo(unsigned short ModeIdIndex,
- struct xgi_hw_device_info *HwDeviceExtension,
struct vb_device_info *pVBInfo)
{
unsigned short tempax, push, tempbx, temp, modeflag;
static unsigned short XGI_GetOffset(unsigned short ModeNo,
unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex,
- struct xgi_hw_device_info *HwDeviceExtension,
struct vb_device_info *pVBInfo)
{
unsigned short temp, colordepth, modeinfo, index, infoflag,
static void XGI_SetCRT2Offset(unsigned short ModeNo,
unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex,
- struct xgi_hw_device_info *HwDeviceExtension,
struct vb_device_info *pVBInfo)
{
unsigned short offset;
return;
offset = XGI_GetOffset(ModeNo, ModeIdIndex, RefreshRateTableIndex,
- HwDeviceExtension, pVBInfo);
+ pVBInfo);
temp = (unsigned char) (offset & 0xFF);
xgifb_reg_set(pVBInfo->Part1Port, 0x07, temp);
temp = (unsigned char) ((offset & 0xFF00) >> 8);
}
static void XGI_PreSetGroup1(unsigned short ModeNo, unsigned short ModeIdIndex,
- struct xgi_hw_device_info *HwDeviceExtension,
unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo)
{
u8 tempcx;
- XGI_SetCRT2Offset(ModeNo, ModeIdIndex, RefreshRateTableIndex,
- HwDeviceExtension, pVBInfo);
+ XGI_SetCRT2Offset(ModeNo, ModeIdIndex, RefreshRateTableIndex, pVBInfo);
XGI_SetCRT2FIFO(pVBInfo);
for (tempcx = 4; tempcx < 7; tempcx++)
}
static void XGI_SetGroup1(unsigned short ModeIdIndex,
- struct xgi_hw_device_info *HwDeviceExtension,
unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo)
{
}
static void XGI_SetLockRegs(unsigned short ModeNo, unsigned short ModeIdIndex,
- struct xgi_hw_device_info *HwDeviceExtension,
unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo)
{
static void XGI_SetGroup2(unsigned short ModeNo, unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex,
- struct xgi_hw_device_info *HwDeviceExtension,
struct vb_device_info *pVBInfo)
{
unsigned short i, j, tempax, tempbx, tempcx, temp, push1, push2,
}
static void XGI_SetLCDRegs(unsigned short ModeIdIndex,
- struct xgi_hw_device_info *HwDeviceExtension,
unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo)
{
static void XGI_SetGroup4(unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex,
- struct xgi_hw_device_info *HwDeviceExtension,
struct vb_device_info *pVBInfo)
{
unsigned short tempax, tempcx, tempbx, modeflag, temp, temp2;
}
}
-static void XGI_DisableGatingCRT(struct xgi_hw_device_info *HwDeviceExtension,
- struct vb_device_info *pVBInfo)
+static void XGI_DisableGatingCRT(struct vb_device_info *pVBInfo)
{
-
xgifb_reg_and_or(pVBInfo->P3d4, 0x63, 0xBF, 0x00);
}
/* Output : */
/* Description : Origin code for crt2group */
/* --------------------------------------------------------------------- */
-static void XGI_SetCRT2ModeRegs(struct xgi_hw_device_info *HwDeviceExtension,
- struct vb_device_info *pVBInfo)
+static void XGI_SetCRT2ModeRegs(struct vb_device_info *pVBInfo)
{
unsigned short tempbl;
short tempcl;
}
-void XGI_UnLockCRT2(struct xgi_hw_device_info *HwDeviceExtension,
- struct vb_device_info *pVBInfo)
+void XGI_UnLockCRT2(struct vb_device_info *pVBInfo)
{
-
xgifb_reg_and_or(pVBInfo->Part1Port, 0x2f, 0xFF, 0x01);
-
}
-void XGI_LockCRT2(struct xgi_hw_device_info *HwDeviceExtension,
- struct vb_device_info *pVBInfo)
+void XGI_LockCRT2(struct vb_device_info *pVBInfo)
{
-
xgifb_reg_and_or(pVBInfo->Part1Port, 0x2F, 0xFE, 0x00);
-
}
unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE,
XGI_SaveCRT2Info(ModeNo, pVBInfo);
XGI_GetCRT2ResInfo(ModeIdIndex, pVBInfo);
XGI_GetCRT2Data(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
- XGI_PreSetGroup1(ModeNo, ModeIdIndex, HwDeviceExtension,
- RefreshRateTableIndex, pVBInfo);
- XGI_SetGroup1(ModeIdIndex, HwDeviceExtension, RefreshRateTableIndex,
- pVBInfo);
- XGI_SetLockRegs(ModeNo, ModeIdIndex, HwDeviceExtension,
- RefreshRateTableIndex, pVBInfo);
- XGI_SetGroup2(ModeNo, ModeIdIndex, RefreshRateTableIndex,
- HwDeviceExtension, pVBInfo);
- XGI_SetLCDRegs(ModeIdIndex, HwDeviceExtension, RefreshRateTableIndex,
- pVBInfo);
+ XGI_PreSetGroup1(ModeNo, ModeIdIndex, RefreshRateTableIndex, pVBInfo);
+ XGI_SetGroup1(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
+ XGI_SetLockRegs(ModeNo, ModeIdIndex, RefreshRateTableIndex, pVBInfo);
+ XGI_SetGroup2(ModeNo, ModeIdIndex, RefreshRateTableIndex, pVBInfo);
+ XGI_SetLCDRegs(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
XGI_SetTap4Regs(pVBInfo);
XGI_SetGroup3(ModeIdIndex, pVBInfo);
- XGI_SetGroup4(ModeIdIndex, RefreshRateTableIndex, HwDeviceExtension,
- pVBInfo);
+ XGI_SetGroup4(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
XGI_SetCRT2VCLK(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
XGI_SetGroup5(pVBInfo);
XGI_AutoThreshold(pVBInfo);
/* EnablePart4_1F */
xgifb_reg_or(pVBInfo->Part4Port, 0x1F, tempah);
- XGI_DisableGatingCRT(HwDeviceExtension, pVBInfo);
+ XGI_DisableGatingCRT(pVBInfo);
XGI_DisplayOn(xgifb_info, HwDeviceExtension, pVBInfo);
} /* 301 */
else { /* LVDS */
XGI_SetSeqRegs(pVBInfo);
outb(XGI330_StandTable.MISC, pVBInfo->P3c2);
- XGI_SetCRTCRegs(HwDeviceExtension, pVBInfo);
+ XGI_SetCRTCRegs(pVBInfo);
XGI_SetATTRegs(ModeIdIndex, pVBInfo);
XGI_SetGRCRegs(pVBInfo);
XGI_ClearExt1Regs(pVBInfo);
XGI_SetSync(RefreshRateTableIndex, pVBInfo);
XGI_SetCRT1CRTC(ModeIdIndex, RefreshRateTableIndex,
pVBInfo, HwDeviceExtension);
- XGI_SetCRT1DE(HwDeviceExtension, ModeIdIndex,
- RefreshRateTableIndex, pVBInfo);
+ XGI_SetCRT1DE(ModeIdIndex, RefreshRateTableIndex, pVBInfo);
XGI_SetCRT1Offset(ModeNo, ModeIdIndex, RefreshRateTableIndex,
HwDeviceExtension, pVBInfo);
XGI_SetCRT1VCLK(ModeIdIndex, HwDeviceExtension,
xgifb_reg_set(pVBInfo->P3c4, 0x05, 0x86);
if (HwDeviceExtension->jChipType < XG20)
- XGI_UnLockCRT2(HwDeviceExtension, pVBInfo);
+ XGI_UnLockCRT2(pVBInfo);
XGI_SearchModeID(ModeNo, &ModeIdIndex, pVBInfo);
if (HwDeviceExtension->jChipType < XG20) {
- XGI_GetVBInfo(ModeIdIndex, HwDeviceExtension, pVBInfo);
+ XGI_GetVBInfo(ModeIdIndex, pVBInfo);
XGI_GetTVInfo(ModeIdIndex, pVBInfo);
XGI_GetLCDInfo(ModeIdIndex, pVBInfo);
XGI_DisableBridge(xgifb_info, HwDeviceExtension, pVBInfo);
}
}
- XGI_SetCRT2ModeRegs(HwDeviceExtension, pVBInfo);
+ XGI_SetCRT2ModeRegs(pVBInfo);
XGI_OEM310Setting(ModeIdIndex, pVBInfo); /*0212*/
XGI_EnableBridge(xgifb_info, HwDeviceExtension, pVBInfo);
} /* !XG20 */
XGI_DisplayOn(xgifb_info, HwDeviceExtension, pVBInfo);
}
- XGI_UpdateModeInfo(HwDeviceExtension, pVBInfo);
+ XGI_UpdateModeInfo(pVBInfo);
if (HwDeviceExtension->jChipType < XG20)
- XGI_LockCRT2(HwDeviceExtension, pVBInfo);
+ XGI_LockCRT2(pVBInfo);
return 1;
}