aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2011-03-08 15:16:16 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-09 19:02:54 -0500
commitf4dccca54ac8b848fe45a807aac2518bed080458 (patch)
treef1b65c809ea324b04e5281bb8491e0f56934a297 /drivers/staging
parenteb51a917028351db1174d5f9b43a53e62983fc19 (diff)
staging: xgifb: vb_ext: delete unused functions
Delete unused functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/xgifb/vb_ext.c437
-rw-r--r--drivers/staging/xgifb/vb_ext.h3
2 files changed, 0 insertions, 440 deletions
diff --git a/drivers/staging/xgifb/vb_ext.c b/drivers/staging/xgifb/vb_ext.c
index e1f9188261c..cc78815c8be 100644
--- a/drivers/staging/xgifb/vb_ext.c
+++ b/drivers/staging/xgifb/vb_ext.c
@@ -34,28 +34,6 @@ static unsigned char XGINew_Is301B(struct vb_device_info *pVBInfo)
34 return 1; 34 return 1;
35} 35}
36 36
37unsigned char XGI_Is301C(struct vb_device_info *pVBInfo)
38{
39 if ((XGINew_GetReg1(pVBInfo->Part4Port, 0x01) & 0xF0) == 0xC0)
40 return 1;
41
42 if (XGINew_GetReg1(pVBInfo->Part4Port, 0x01) >= 0xD0) {
43 if (XGINew_GetReg1(pVBInfo->Part4Port, 0x39) == 0xE0)
44 return 1;
45 }
46
47 return 0;
48}
49
50unsigned char XGI_Is301LV(struct vb_device_info *pVBInfo)
51{
52 if (XGINew_GetReg1(pVBInfo->Part4Port, 0x01) >= 0xD0) {
53 if (XGINew_GetReg1(pVBInfo->Part4Port, 0x39) == 0xFF)
54 return 1;
55 }
56 return 0;
57}
58
59unsigned char XGINew_Sense(unsigned short tempbx, unsigned short tempcx, struct vb_device_info *pVBInfo) 37unsigned char XGINew_Sense(unsigned short tempbx, unsigned short tempcx, struct vb_device_info *pVBInfo)
60{ 38{
61 unsigned short temp, i, tempch; 39 unsigned short temp, i, tempch;
@@ -80,190 +58,6 @@ unsigned char XGINew_Sense(unsigned short tempbx, unsigned short tempcx, struct
80 return 0; 58 return 0;
81} 59}
82 60
83void XGISetDPMS(struct xgi_hw_device_info *pXGIHWDE, unsigned long VESA_POWER_STATE)
84{
85 unsigned short ModeNo, ModeIdIndex;
86 unsigned char temp;
87 struct vb_device_info VBINF;
88 struct vb_device_info *pVBInfo = &VBINF;
89 pVBInfo->BaseAddr = (unsigned long) pXGIHWDE->pjIOAddress;
90 pVBInfo->ROMAddr = pXGIHWDE->pjVirtualRomBase;
91
92 pVBInfo->IF_DEF_LVDS = 0;
93 pVBInfo->IF_DEF_CH7005 = 0;
94 pVBInfo->IF_DEF_HiVision = 1;
95 pVBInfo->IF_DEF_LCDA = 1;
96 pVBInfo->IF_DEF_CH7017 = 0;
97 pVBInfo->IF_DEF_YPbPr = 1;
98 pVBInfo->IF_DEF_CRT2Monitor = 0;
99 pVBInfo->IF_DEF_VideoCapture = 0;
100 pVBInfo->IF_DEF_ScaleLCD = 0;
101 pVBInfo->IF_DEF_OEMUtil = 0;
102 pVBInfo->IF_DEF_PWD = 0;
103
104 InitTo330Pointer(pXGIHWDE->jChipType, pVBInfo);
105 ReadVBIOSTablData(pXGIHWDE->jChipType, pVBInfo);
106
107 pVBInfo->P3c4 = pVBInfo->BaseAddr + 0x14;
108 pVBInfo->P3d4 = pVBInfo->BaseAddr + 0x24;
109 pVBInfo->P3c0 = pVBInfo->BaseAddr + 0x10;
110 pVBInfo->P3ce = pVBInfo->BaseAddr + 0x1e;
111 pVBInfo->P3c2 = pVBInfo->BaseAddr + 0x12;
112 pVBInfo->P3ca = pVBInfo->BaseAddr + 0x1a;
113 pVBInfo->P3c6 = pVBInfo->BaseAddr + 0x16;
114 pVBInfo->P3c7 = pVBInfo->BaseAddr + 0x17;
115 pVBInfo->P3c8 = pVBInfo->BaseAddr + 0x18;
116 pVBInfo->P3c9 = pVBInfo->BaseAddr + 0x19;
117 pVBInfo->P3da = pVBInfo->BaseAddr + 0x2A;
118 pVBInfo->Part0Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_00;
119 pVBInfo->Part1Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_04;
120 pVBInfo->Part2Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_10;
121 pVBInfo->Part3Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_12;
122 pVBInfo->Part4Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_14;
123 pVBInfo->Part5Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_14 + 2;
124
125 if (pXGIHWDE->jChipType == XG27) {
126 if ((XGINew_GetReg1(pVBInfo->P3d4, 0x38) & 0xE0) == 0xC0) {
127 if (XGINew_GetReg1(pVBInfo->P3d4, 0x30) & 0x20)
128 pVBInfo->IF_DEF_LVDS = 1;
129 }
130 }
131
132 if (pVBInfo->IF_DEF_CH7007 == 0)
133 XGINew_SetModeScratch(pXGIHWDE, pVBInfo);
134
135 XGINew_SetReg1(pVBInfo->P3c4, 0x05, 0x86); /* 1.Openkey */
136 XGI_UnLockCRT2(pXGIHWDE, pVBInfo);
137 ModeNo = XGINew_GetReg1(pVBInfo->P3d4, 0x34);
138 XGI_SearchModeID(ModeNo, &ModeIdIndex, pVBInfo);
139 XGI_GetVGAType(pXGIHWDE, pVBInfo);
140
141 if ((pXGIHWDE->ujVBChipID == VB_CHIP_301) || (pXGIHWDE->ujVBChipID == VB_CHIP_302) || (pVBInfo->IF_DEF_CH7007 == 1)) {
142 XGI_GetVBType(pVBInfo);
143 XGI_GetVBInfo(ModeNo, ModeIdIndex, pXGIHWDE, pVBInfo);
144 XGI_GetTVInfo(ModeNo, ModeIdIndex, pVBInfo);
145 XGI_GetLCDInfo(ModeNo, ModeIdIndex, pVBInfo);
146 }
147
148 if (VESA_POWER_STATE == 0x00000400)
149 XGINew_SetReg1(pVBInfo->Part4Port, 0x31, (unsigned char) (XGINew_GetReg1(pVBInfo->Part4Port, 0x31) & 0xFE));
150 else
151 XGINew_SetReg1(pVBInfo->Part4Port, 0x31, (unsigned char) (XGINew_GetReg1(pVBInfo->Part4Port, 0x31) | 0x01));
152
153 temp = (unsigned char) XGINew_GetReg1(pVBInfo->P3c4, 0x1f);
154 temp &= 0x3f;
155 switch (VESA_POWER_STATE) {
156 case 0x00000000: /* on */
157 if ((pXGIHWDE->ujVBChipID == VB_CHIP_301) || (pXGIHWDE->ujVBChipID == VB_CHIP_302)) {
158 XGINew_SetReg1(pVBInfo->P3c4, 0x1f, (unsigned char) (temp | 0x00));
159 XGI_EnableBridge(pXGIHWDE, pVBInfo);
160 } else {
161 if (pXGIHWDE->jChipType == XG21) {
162 if (pVBInfo->IF_DEF_LVDS == 1) {
163 XGI_XG21BLSignalVDD(0x01, 0x01, pVBInfo); /* LVDS VDD on */
164 XGI_XG21SetPanelDelay(2, pVBInfo);
165 }
166 }
167 if (pXGIHWDE->jChipType == XG27) {
168 if (pVBInfo->IF_DEF_LVDS == 1) {
169 XGI_XG27BLSignalVDD(0x01, 0x01, pVBInfo); /* LVDS VDD on */
170 XGI_XG21SetPanelDelay(2, pVBInfo);
171 }
172 }
173 XGINew_SetRegANDOR(pVBInfo->P3c4, 0x1F, ~0xC0, 0x00);
174 XGINew_SetRegAND(pVBInfo->P3c4, 0x01, ~0x20); /* CRT on */
175
176 if (pXGIHWDE->jChipType == XG21) {
177 temp = XGINew_GetReg1(pVBInfo->P3d4, 0x38);
178 if (temp & 0xE0) {
179 XGINew_SetRegANDOR(pVBInfo->P3c4, 0x09, ~0x80, 0x80); /* DVO ON */
180 XGI_SetXG21FPBits(pVBInfo);
181 XGINew_SetRegAND(pVBInfo->P3d4, 0x4A, ~0x20); /* Enable write GPIOF */
182 /* XGINew_SetRegANDOR(pVBInfo->P3d4, 0x48, ~0x20, 0x20); *//* LCD Display ON */
183 }
184 XGI_XG21BLSignalVDD(0x20, 0x20, pVBInfo); /* LVDS signal on */
185 XGI_DisplayOn(pXGIHWDE, pVBInfo);
186 }
187 if (pXGIHWDE->jChipType == XG27) {
188 temp = XGINew_GetReg1(pVBInfo->P3d4, 0x38);
189 if (temp & 0xE0) {
190 XGINew_SetRegANDOR(pVBInfo->P3c4, 0x09, ~0x80, 0x80); /* DVO ON */
191 XGI_SetXG27FPBits(pVBInfo);
192 XGINew_SetRegAND(pVBInfo->P3d4, 0x4A, ~0x20); /* Enable write GPIOF */
193 /* XGINew_SetRegANDOR(pVBInfo->P3d4, 0x48, ~0x20, 0x20); *//* LCD Display ON */
194 }
195 XGI_XG27BLSignalVDD(0x20, 0x20, pVBInfo); /* LVDS signal on */
196 XGI_DisplayOn(pXGIHWDE, pVBInfo);
197 }
198 }
199 break;
200
201 case 0x00000100: /* standby */
202 if (pXGIHWDE->jChipType >= XG21)
203 XGI_DisplayOff(pXGIHWDE, pVBInfo);
204 XGINew_SetReg1(pVBInfo->P3c4, 0x1f, (unsigned char) (temp | 0x40));
205 break;
206
207 case 0x00000200: /* suspend */
208 if (pXGIHWDE->jChipType == XG21) {
209 XGI_DisplayOff(pXGIHWDE, pVBInfo);
210 XGI_XG21BLSignalVDD(0x20, 0x00, pVBInfo); /* LVDS signal off */
211 }
212 if (pXGIHWDE->jChipType == XG27) {
213 XGI_DisplayOff(pXGIHWDE, pVBInfo);
214 XGI_XG27BLSignalVDD(0x20, 0x00, pVBInfo); /* LVDS signal off */
215 }
216 XGINew_SetReg1(pVBInfo->P3c4, 0x1f, (unsigned char) (temp | 0x80));
217 break;
218
219 case 0x00000400: /* off */
220 if ((pXGIHWDE->ujVBChipID == VB_CHIP_301) || (pXGIHWDE->ujVBChipID == VB_CHIP_302)) {
221 XGINew_SetReg1(pVBInfo->P3c4, 0x1f, (unsigned char) (temp | 0xc0));
222 XGI_DisableBridge(pXGIHWDE, pVBInfo);
223 } else {
224 if (pXGIHWDE->jChipType == XG21) {
225 XGI_DisplayOff(pXGIHWDE, pVBInfo);
226
227 XGI_XG21BLSignalVDD(0x20, 0x00, pVBInfo); /* LVDS signal off */
228
229 temp = XGINew_GetReg1(pVBInfo->P3d4, 0x38);
230 if (temp & 0xE0) {
231 XGINew_SetRegAND(pVBInfo->P3c4, 0x09, ~0x80); /* DVO Off */
232 XGINew_SetRegAND(pVBInfo->P3d4, 0x4A, ~0x20); /* Enable write GPIOF */
233 /* XGINew_SetRegAND(pVBInfo->P3d4, 0x48, ~0x20); *//* LCD Display OFF */
234 }
235 }
236 if (pXGIHWDE->jChipType == XG27) {
237 XGI_DisplayOff(pXGIHWDE, pVBInfo);
238
239 XGI_XG27BLSignalVDD(0x20, 0x00, pVBInfo); /* LVDS signal off */
240
241 temp = XGINew_GetReg1(pVBInfo->P3d4, 0x38);
242 if (temp & 0xE0)
243 XGINew_SetRegAND(pVBInfo->P3c4, 0x09, ~0x80); /* DVO Off */
244 }
245 XGINew_SetRegANDOR(pVBInfo->P3c4, 0x1F, ~0xC0, 0xC0);
246 XGINew_SetRegOR(pVBInfo->P3c4, 0x01, 0x20); /* CRT Off */
247
248 if ((pXGIHWDE->jChipType == XG21) && (pVBInfo->IF_DEF_LVDS == 1)) {
249 XGI_XG21SetPanelDelay(4, pVBInfo);
250 XGI_XG21BLSignalVDD(0x01, 0x00, pVBInfo); /* LVDS VDD off */
251 XGI_XG21SetPanelDelay(5, pVBInfo);
252 }
253 if ((pXGIHWDE->jChipType == XG27) && (pVBInfo->IF_DEF_LVDS == 1)) {
254 XGI_XG21SetPanelDelay(4, pVBInfo);
255 XGI_XG27BLSignalVDD(0x01, 0x00, pVBInfo); /* LVDS VDD off */
256 XGI_XG21SetPanelDelay(5, pVBInfo);
257 }
258 }
259 break;
260
261 default:
262 break;
263 }
264 XGI_LockCRT2(pXGIHWDE, pVBInfo);
265}
266
267void XGI_GetSenseStatus(struct xgi_hw_device_info *HwDeviceExtension, struct vb_device_info *pVBInfo) 61void XGI_GetSenseStatus(struct xgi_hw_device_info *HwDeviceExtension, struct vb_device_info *pVBInfo)
268{ 62{
269 unsigned short tempax = 0, tempbx, tempcx, temp, P2reg0 = 0, SenseModeNo = 0, 63 unsigned short tempax = 0, tempbx, tempcx, temp, P2reg0 = 0, SenseModeNo = 0,
@@ -607,234 +401,3 @@ unsigned char XGINew_SenseHiTV(struct xgi_hw_device_info *HwDeviceExtension, str
607 return 0; 401 return 0;
608 } 402 }
609} 403}
610
611/* ----------------------------------------------------------------------------
612 * Description: Get Panel support
613 * O/P :
614 * BL: Panel ID=81h for no scaler LVDS
615 * BH: Panel enhanced Mode Count
616 * CX: Panel H. resolution
617 * DX: PAnel V. resolution
618 * ----------------------------------------------------------------------------
619 */
620static void XGI_XG21Fun14Sub70(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments)
621{
622 unsigned short ModeIdIndex;
623 unsigned short ModeNo;
624
625 unsigned short EModeCount;
626 unsigned short lvdstableindex;
627
628 lvdstableindex = XGI_GetLVDSOEMTableIndex(pVBInfo);
629 pBiosArguments->h.bl = 0x81;
630 pBiosArguments->x.cx = pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDSHDE;
631 pBiosArguments->x.dx = pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDSVDE;
632 EModeCount = 0;
633
634 pBiosArguments->x.ax = 0x0014;
635 for (ModeIdIndex = 0;; ModeIdIndex++) {
636 ModeNo = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeID;
637 if (pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeID == 0xFF) {
638 pBiosArguments->h.bh = (unsigned char) EModeCount;
639 return;
640 }
641 if (!XGI_XG21CheckLVDSMode(ModeNo, ModeIdIndex, pVBInfo))
642 continue;
643
644 EModeCount++;
645 }
646}
647
648/* ----------------------------------------------------------------------------
649 *
650 * Description: Get Panel mode ID for enhanced mode
651 * I/P : BH: EModeIndex ( which < Panel enhanced Mode Count )
652 * O/P :
653 * BL: Mode ID
654 * CX: H. resolution of the assigned by the index
655 * DX: V. resolution of the assigned by the index
656 *
657 * ----------------------------------------------------------------------------
658 */
659
660static void XGI_XG21Fun14Sub71(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments)
661{
662
663 unsigned short EModeCount;
664 unsigned short ModeIdIndex, resindex;
665 unsigned short ModeNo;
666 unsigned short EModeIndex = pBiosArguments->h.bh;
667
668 EModeCount = 0;
669 for (ModeIdIndex = 0;; ModeIdIndex++) {
670 ModeNo = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeID;
671 if (pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeID == 0xFF) {
672 pBiosArguments->x.ax = 0x0114;
673 return;
674 }
675 if (!XGI_XG21CheckLVDSMode(ModeNo, ModeIdIndex, pVBInfo))
676 continue;
677
678 if (EModeCount == EModeIndex) {
679 resindex = XGI_GetResInfo(ModeNo, ModeIdIndex, pVBInfo);
680 pBiosArguments->h.bl = (unsigned char) ModeNo;
681 pBiosArguments->x.cx = pVBInfo->ModeResInfo[resindex].HTotal; /* xres->ax */
682 pBiosArguments->x.dx = pVBInfo->ModeResInfo[resindex].VTotal; /* yres->bx */
683 pBiosArguments->x.ax = 0x0014;
684 }
685 EModeCount++;
686
687 }
688
689}
690
691/* ----------------------------------------------------------------------------
692 *
693 * Description: Validate Panel modes ID support
694 * I/P :
695 * BL: ModeID
696 * O/P :
697 * CX: H. resolution of the assigned by the index
698 * DX: V. resolution of the assigned by the index
699 *
700 * ----------------------------------------------------------------------------
701 */
702static void XGI_XG21Fun14Sub72(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments)
703{
704 unsigned short ModeIdIndex, resindex;
705 unsigned short ModeNo;
706
707 ModeNo = pBiosArguments->h.bl;
708 XGI_SearchModeID(ModeNo, &ModeIdIndex, pVBInfo);
709 if (!XGI_XG21CheckLVDSMode(ModeNo, ModeIdIndex, pVBInfo)) {
710 pBiosArguments->x.cx = 0;
711 pBiosArguments->x.dx = 0;
712 pBiosArguments->x.ax = 0x0114;
713 return;
714 }
715 resindex = XGI_GetResInfo(ModeNo, ModeIdIndex, pVBInfo);
716 if (ModeNo <= 0x13) {
717 pBiosArguments->x.cx = pVBInfo->StResInfo[resindex].HTotal;
718 pBiosArguments->x.dx = pVBInfo->StResInfo[resindex].VTotal;
719 } else {
720 pBiosArguments->x.cx = pVBInfo->ModeResInfo[resindex].HTotal; /* xres->ax */
721 pBiosArguments->x.dx = pVBInfo->ModeResInfo[resindex].VTotal; /* yres->bx */
722 }
723
724 pBiosArguments->x.ax = 0x0014;
725
726}
727
728/* ----------------------------------------------------------------------------
729 *
730 * Description: Get Customized Panel misc. information support
731 * I/P : Select
732 * to get panel horizontal timing
733 * to get panel vertical timing
734 * to get channel clock parameter
735 * to get panel misc information
736 *
737 * O/P :
738 * BL: for input Select = 0 ;
739 * BX: *Value1 = Horizontal total
740 * CX: *Value2 = Horizontal front porch
741 * DX: *Value2 = Horizontal sync width
742 * BL: for input Select = 1 ;
743 * BX: *Value1 = Vertical total
744 * CX: *Value2 = Vertical front porch
745 * DX: *Value2 = Vertical sync width
746 * BL: for input Select = 2 ;
747 * BX: Value1 = The first CLK parameter
748 * CX: Value2 = The second CLK parameter
749 * BL: for input Select = 4 ;
750 * BX[15]: *Value1 D[15] VESA V. Polarity
751 * BX[14]: *Value1 D[14] VESA H. Polarity
752 * BX[7]: *Value1 D[7] Panel V. Polarity
753 * BX[6]: *Value1 D[6] Panel H. Polarity
754 * ----------------------------------------------------------------------------
755 */
756static void XGI_XG21Fun14Sub73(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments)
757{
758 unsigned char Select;
759
760 unsigned short lvdstableindex;
761
762 lvdstableindex = XGI_GetLVDSOEMTableIndex(pVBInfo);
763 Select = pBiosArguments->h.bl;
764
765 switch (Select) {
766 case 0:
767 pBiosArguments->x.bx = pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDSHT;
768 pBiosArguments->x.cx = pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDSHFP;
769 pBiosArguments->x.dx = pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDSHSYNC;
770 break;
771 case 1:
772 pBiosArguments->x.bx = pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDSVT;
773 pBiosArguments->x.cx = pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDSVFP;
774 pBiosArguments->x.dx = pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDSVSYNC;
775 break;
776 case 2:
777 pBiosArguments->x.bx = pVBInfo->XG21_LVDSCapList[lvdstableindex].VCLKData1;
778 pBiosArguments->x.cx = pVBInfo->XG21_LVDSCapList[lvdstableindex].VCLKData2;
779 break;
780 case 4:
781 pBiosArguments->x.bx = pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDS_Capability;
782 break;
783 }
784
785 pBiosArguments->x.ax = 0x0014;
786}
787
788void XGI_XG21Fun14(struct xgi_hw_device_info *pXGIHWDE, PX86_REGS pBiosArguments)
789{
790 struct vb_device_info VBINF;
791 struct vb_device_info *pVBInfo = &VBINF;
792
793 pVBInfo->IF_DEF_LVDS = 0;
794 pVBInfo->IF_DEF_CH7005 = 0;
795 pVBInfo->IF_DEF_HiVision = 1;
796 pVBInfo->IF_DEF_LCDA = 1;
797 pVBInfo->IF_DEF_CH7017 = 0;
798 pVBInfo->IF_DEF_YPbPr = 1;
799 pVBInfo->IF_DEF_CRT2Monitor = 0;
800 pVBInfo->IF_DEF_VideoCapture = 0;
801 pVBInfo->IF_DEF_ScaleLCD = 0;
802 pVBInfo->IF_DEF_OEMUtil = 0;
803 pVBInfo->IF_DEF_PWD = 0;
804
805 InitTo330Pointer(pXGIHWDE->jChipType, pVBInfo);
806 ReadVBIOSTablData(pXGIHWDE->jChipType, pVBInfo);
807
808 pVBInfo->P3c4 = pVBInfo->BaseAddr + 0x14;
809 pVBInfo->P3d4 = pVBInfo->BaseAddr + 0x24;
810 pVBInfo->P3c0 = pVBInfo->BaseAddr + 0x10;
811 pVBInfo->P3ce = pVBInfo->BaseAddr + 0x1e;
812 pVBInfo->P3c2 = pVBInfo->BaseAddr + 0x12;
813 pVBInfo->P3ca = pVBInfo->BaseAddr + 0x1a;
814 pVBInfo->P3c6 = pVBInfo->BaseAddr + 0x16;
815 pVBInfo->P3c7 = pVBInfo->BaseAddr + 0x17;
816 pVBInfo->P3c8 = pVBInfo->BaseAddr + 0x18;
817 pVBInfo->P3c9 = pVBInfo->BaseAddr + 0x19;
818 pVBInfo->P3da = pVBInfo->BaseAddr + 0x2A;
819 pVBInfo->Part0Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_00;
820 pVBInfo->Part1Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_04;
821 pVBInfo->Part2Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_10;
822 pVBInfo->Part3Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_12;
823 pVBInfo->Part4Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_14;
824 pVBInfo->Part5Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_14 + 2;
825
826 switch (pBiosArguments->x.ax) {
827 case 0x1470:
828 XGI_XG21Fun14Sub70(pVBInfo, pBiosArguments);
829 break;
830 case 0x1471:
831 XGI_XG21Fun14Sub71(pVBInfo, pBiosArguments);
832 break;
833 case 0x1472:
834 XGI_XG21Fun14Sub72(pVBInfo, pBiosArguments);
835 break;
836 case 0x1473:
837 XGI_XG21Fun14Sub73(pVBInfo, pBiosArguments);
838 break;
839 }
840}
diff --git a/drivers/staging/xgifb/vb_ext.h b/drivers/staging/xgifb/vb_ext.h
index 5cc4d12c225..68245254974 100644
--- a/drivers/staging/xgifb/vb_ext.h
+++ b/drivers/staging/xgifb/vb_ext.h
@@ -21,9 +21,6 @@ typedef union _X86_REGS {
21 struct BYTEREGS h; 21 struct BYTEREGS h;
22} X86_REGS, *PX86_REGS; 22} X86_REGS, *PX86_REGS;
23 23
24extern void XGI_XG21Fun14(struct xgi_hw_device_info *pXGIHWDE, PX86_REGS pBiosArguments);
25extern void XGISetDPMS(struct xgi_hw_device_info *pXGIHWDE,
26 unsigned long VESA_POWER_STATE);
27extern void XGI_GetSenseStatus(struct xgi_hw_device_info *HwDeviceExtension, struct vb_device_info *pVBInfo); 24extern void XGI_GetSenseStatus(struct xgi_hw_device_info *HwDeviceExtension, struct vb_device_info *pVBInfo);
28extern void XGINew_SetModeScratch(struct xgi_hw_device_info *HwDeviceExtension, struct vb_device_info *pVBInfo) ; 25extern void XGINew_SetModeScratch(struct xgi_hw_device_info *HwDeviceExtension, struct vb_device_info *pVBInfo) ;
29extern void ReadVBIOSTablData(unsigned char ChipType, 26extern void ReadVBIOSTablData(unsigned char ChipType,