Lines Matching defs:pVBInfo

55     PVB_DEVICE_INFO pVBInfo);
58 PVB_DEVICE_INFO pVBInfo);
61 PVB_DEVICE_INFO pVBInfo);
64 PVB_DEVICE_INFO pVBInfo);
79 static int XGINew_Is301B(PVB_DEVICE_INFO pVBInfo)
81 return !(XGI_GetReg((XGIIOADDRESS)pVBInfo->Part4Port, 0x01) > 0x0B0);
90 BOOLEAN XGI_Is301C( PVB_DEVICE_INFO pVBInfo )
92 if ( ( XGI_GetReg( (XGIIOADDRESS) pVBInfo->Part4Port , 0x01 ) & 0xF0 ) == 0xC0 )
95 if ( XGI_GetReg( (XGIIOADDRESS) pVBInfo->Part4Port , 0x01 ) >= 0xD0 )
97 if ( XGI_GetReg( (XGIIOADDRESS) pVBInfo->Part4Port , 0x39 ) == 0xE0 )
110 BOOLEAN XGINew_Sense(USHORT tempbx, USHORT tempcx, PVB_DEVICE_INFO pVBInfo)
116 XGI_SetReg((XGIIOADDRESS)pVBInfo->Part4Port, 0x11, (tempbx & 0x0FF));
118 XGI_SetRegANDOR((XGIIOADDRESS)pVBInfo->Part4Port, 0x10, ~0x1F,
122 XGI_WaitEndRetrace(pVBInfo->RelIO);
124 temp = XGI_GetReg((XGIIOADDRESS) pVBInfo->Part4Port, 0x03);
137 void XGI_GetSenseStatus( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo)
140 P2reg0 = 0 , SenseModeNo = 0 , OutputSelect = pVBInfo->OutputSelect,
142 pVBInfo->BaseAddr = ( ULONG )HwDeviceExtension->pjIOAddress ;
145 if ( pVBInfo->VBInfo & SetCRT2ToHiVisionTV )
147 tempax = XGI_GetReg((XGIIOADDRESS) pVBInfo->P3c4 , 0x38 ) ;
149 tempax = XGI_GetReg((XGIIOADDRESS) pVBInfo->P3c4 , 0x3A ) ;
151 XGI_SetRegANDOR((XGIIOADDRESS) pVBInfo->P3d4 , 0x32 , 0xA0 , temp ) ;
155 if ( XGI_BridgeIsOn( pVBInfo ) )
157 P2reg0 = XGI_GetReg((XGIIOADDRESS) pVBInfo->Part2Port , 0x00 ) ;
158 if ( !XGINew_BridgeIsEnable( HwDeviceExtension, pVBInfo ) )
163 /* XGI_SetReg((XGIIOADDRESS) pVBInfo->P3d4 , 0x30 , 0x41 ) ; */
164 /* XGISetModeNew(HwDeviceExtension, pVBInfo, 0x2e); // ynlai InitMode */
167 XGI_SearchModeID(pVBInfo->SModeIDTable,
168 pVBInfo->EModeIDTable, 0x11,
171 XGI_GetVBType( pVBInfo ) ;
172 pVBInfo->SetFlag = 0x00 ;
173 pVBInfo->ModeType = ModeVGA ;
174 pVBInfo->VBInfo = SetCRT2ToRAMDAC | LoadDACFlag | SetInSlaveMode ;
175 XGI_GetLCDInfo( 0x2e , ModeIdIndex, pVBInfo ) ;
176 XGI_GetTVInfo( 0x2e , ModeIdIndex, pVBInfo ) ;
177 XGI_EnableBridge( HwDeviceExtension, pVBInfo ) ;
178 XGI_SetCRT2Group301( SenseModeNo , HwDeviceExtension, pVBInfo ) ;
179 XGI_SetCRT2ModeRegs( 0x2e , HwDeviceExtension, pVBInfo ) ;
180 /* XGI_DisableBridge( HwDeviceExtension, pVBInfo ) ; */
181 XGI_SetRegANDOR((XGIIOADDRESS) pVBInfo->P3c4 , 0x01 , 0xDF , 0x20 ) ; /* Display Off 0212 */
184 XGI_WaitEndRetrace(pVBInfo->RelIO) ;
187 XGI_SetReg((XGIIOADDRESS) pVBInfo->Part2Port , 0x00 , 0x1c ) ;
189 tempbx = *pVBInfo->pRGBSenseData ;
191 if ( !( XGINew_Is301B( pVBInfo ) ) )
193 tempbx = *pVBInfo->pRGBSenseData2 ;
197 if (XGINew_Sense(tempbx, tempcx, pVBInfo)) {
198 if (XGINew_Sense(tempbx, tempcx, pVBInfo)) {
203 if ( pVBInfo->VBType & VB_XGI301C)
205 XGI_SetRegOR((XGIIOADDRESS) pVBInfo->Part4Port , 0x0d , 0x04 ) ;
208 if ( XGINew_SenseHiTV( HwDeviceExtension , pVBInfo) ) /* add by kuku for Multi-adapter sense HiTV */
211 if ( ( pVBInfo->VBType & VB_XGI301C ) )
220 tempbx = *pVBInfo->pYCSenseData ;
222 if ( !( XGINew_Is301B( pVBInfo ) ) )
224 tempbx=*pVBInfo->pYCSenseData2;
228 if (XGINew_Sense(tempbx, tempcx, pVBInfo)) {
229 if (XGINew_Sense(tempbx, tempcx, pVBInfo)) {
236 tempbx = *pVBInfo->pVideoSenseData ;
238 if ( !( XGINew_Is301B( pVBInfo ) ) )
240 tempbx = *pVBInfo->pVideoSenseData2 ;
244 if (XGINew_Sense(tempbx, tempcx, pVBInfo)) {
245 if (XGINew_Sense(tempbx, tempcx, pVBInfo)) {
254 tempbx = *pVBInfo->pVideoSenseData ;
256 if ( !( XGINew_Is301B( pVBInfo ) ) )
258 tempbx=*pVBInfo->pVideoSenseData2;
262 if (XGINew_Sense(tempbx, tempcx, pVBInfo)) {
263 if (XGINew_Sense(tempbx, tempcx, pVBInfo)) {
273 if (XGINew_GetLCDDDCInfo(HwDeviceExtension, pVBInfo)) {
279 XGINew_Sense(tempbx, tempcx, pVBInfo);
281 XGI_SetRegANDOR((XGIIOADDRESS) pVBInfo->P3d4 , 0x32 , ~0xDF , tempax ) ;
282 XGI_SetReg((XGIIOADDRESS) pVBInfo->Part2Port , 0x00 , P2reg0 ) ;
286 pVBInfo->VBInfo = DisableCRT2Display ;
287 /* XGI_SetCRT2Group301( SenseModeNo , HwDeviceExtension, pVBInfo ) ; */
291 XGI_DisableBridge( HwDeviceExtension, pVBInfo ) ; /* shampoo 0226 */
304 PVB_DEVICE_INFO pVBInfo)
341 XGI_SetRegANDOR((XGIIOADDRESS)pVBInfo->P3d4, 0x36, 0xF0, temp);
352 BOOLEAN XGINew_BridgeIsEnable( PXGI_HW_DEVICE_INFO HwDeviceExtension ,PVB_DEVICE_INFO pVBInfo)
356 if ( XGI_BridgeIsOn( pVBInfo ) == 0 )
358 flag = XGI_GetReg((XGIIOADDRESS) pVBInfo->Part1Port , 0x0 ) ;
379 BOOLEAN XGINew_SenseHiTV( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo )
386 tempbx = *pVBInfo->pYCSenseData2 ;
391 XGI_SetReg((XGIIOADDRESS) pVBInfo->Part4Port , 0x11 , temp ) ;
394 XGI_SetRegANDOR((XGIIOADDRESS) pVBInfo->Part4Port , 0x10 , ~0x1F , temp ) ;
397 XGI_WaitEndRetrace(pVBInfo->RelIO) ;
400 temp = XGI_GetReg((XGIIOADDRESS) pVBInfo->Part4Port , 0x03 ) ;
407 tempbx = *pVBInfo->pVideoSenseData2 ;
411 XGI_SetReg((XGIIOADDRESS) pVBInfo->Part4Port , 0x11 , temp ) ;
414 XGI_SetRegANDOR((XGIIOADDRESS) pVBInfo->Part4Port , 0x10 , ~0x1F , temp ) ;
417 XGI_WaitEndRetrace(pVBInfo->RelIO) ;
420 temp = XGI_GetReg((XGIIOADDRESS) pVBInfo->Part4Port , 0x03 ) ;
431 XGI_SetReg((XGIIOADDRESS) pVBInfo->Part4Port , 0x11 , temp ) ;
434 XGI_SetRegANDOR((XGIIOADDRESS) pVBInfo->Part4Port , 0x10 , ~0x1F , temp ) ;
437 XGI_WaitEndRetrace(pVBInfo->RelIO) ;
440 temp = XGI_GetReg((XGIIOADDRESS) pVBInfo->Part4Port , 0x03 ) ;
451 void XGIPowerSaving(PVB_DEVICE_INFO pVBInfo, UCHAR PowerSavingStatus)
458 /* XGI_SetRegAND((XGIIOADDRESS) pVBInfo->P3c4 , ??? , ??? ) ; */ /* ??? */
459 XGI_SetRegANDOR((XGIIOADDRESS) pVBInfo->P3c4 , 0x07 , ~0x20, 0x20 ) ; /* SR07[5] : Enable DAC1 power saving mode */
464 /* XGI_SetRegAND((XGIIOADDRESS) pVBInfo->P3c4 , ??? , ??? ) ; */
465 XGI_SetRegAND((XGIIOADDRESS) pVBInfo->P3c4 , 0x07 , ~0x20 ) ;
471 XGI_SetRegAND((XGIIOADDRESS) pVBInfo->P3c4 , 0x09 , ~0x80 ) ; /* SR09[7] : Disable FP panel output */
472 XGI_SetRegAND((XGIIOADDRESS) pVBInfo->P3d4 , 0xB4 , ~0x04 ) ; /* CRB4[2] : FP power down */
477 XGI_SetRegANDOR((XGIIOADDRESS) pVBInfo->P3c4 , 0x09 , ~0x80 , 0x80 ) ;
478 XGI_SetRegANDOR((XGIIOADDRESS) pVBInfo->P3d4 , 0xB4 , ~0x04 , 0x04 ) ;
484 XGI_SetRegAND((XGIIOADDRESS) pVBInfo->P3c4 , 0x07 , ~0x08 ) ; /* SR07[3] : Disable mirror DAC (DAC2) */
485 XGI_SetRegANDOR((XGIIOADDRESS) pVBInfo->P3c4 , 0x40 , ~0x20, 0x20 ) ; /* SR40[5] : Enable DAC2 power saving mode */
490 XGI_SetRegANDOR((XGIIOADDRESS) pVBInfo->P3c4 , 0x07 , ~0x08 , 0x08 ) ;
491 XGI_SetRegAND((XGIIOADDRESS) pVBInfo->P3c4 , 0x40 , ~0x20 ) ;
506 VOID XGISetDPMS(ScrnInfoPtr pScrn, PVB_DEVICE_INFO pVBInfo, PXGI_HW_DEVICE_INFO pXGIHWDE , ULONG VESA_POWER_STATE )
511 /* PVB_DEVICE_INFO pVBInfo = pXGI->XGI_Pr */ /* &VBINF */;
515 InitTo330Pointer( pXGIHWDE->jChipType, pVBInfo ) ;
516 ReadVBIOSTablData( pXGIHWDE->jChipType , pVBInfo) ;
518 XGIInitMiscVBInfo(pXGIHWDE, pVBInfo);
522 if ( pVBInfo->IF_DEF_CH7007 == 0 )
524 XGINew_SetModeScratch ( pXGIHWDE , pVBInfo ) ;
527 XGI_SetReg((XGIIOADDRESS) pVBInfo->P3c4 , 0x05 , 0x86 ) ; /* 1.Openkey */
528 XGI_UnLockCRT2( pXGIHWDE , pVBInfo) ;
529 ModeNo = XGI_GetReg((XGIIOADDRESS) pVBInfo->P3d4 , 0x34 ) ;
530 XGI_SearchModeID(pVBInfo->SModeIDTable, pVBInfo->EModeIDTable, 0x11, &ModeNo , &ModeIdIndex);
531 /* XGI_SearchModeID( ModeNo , &ModeIdIndex, pVBInfo ) ; */
535 if ( ( pXGIHWDE->ujVBChipID == VB_CHIP_301 ) || ( pXGIHWDE->ujVBChipID == VB_CHIP_302 ) || ( pVBInfo->IF_DEF_CH7007 == 1 ))
537 XGI_GetVBType( pVBInfo ) ;
538 XGI_GetVBInfo( ModeNo , ModeIdIndex , pXGIHWDE, pVBInfo ) ;
539 XGI_GetTVInfo( ModeNo , ModeIdIndex, pVBInfo ) ;
540 XGI_GetLCDInfo( ModeNo , ModeIdIndex, pVBInfo ) ;
544 XGINew_SetReg1( pVBInfo->Part4Port , 0x31 , ( UCHAR )( XGINew_GetReg1( pVBInfo->Part4Port , 0x31 ) & 0xFE ) ) ;
546 XGINew_SetReg1( pVBInfo->Part4Port , 0x31 , ( UCHAR )( XGINew_GetReg1( pVBInfo->Part4Port , 0x31 ) | 0x01 ) ) ;
549 temp = ( UCHAR )XGI_GetReg((XGIIOADDRESS) pVBInfo->P3c4 , 0x1f ) ;
558 XGINew_SetReg1( pVBInfo->P3c4 , 0x1f , ( UCHAR )( temp | 0x00 ) ) ;
559 XGI_EnableBridge( pXGIHWDE, pVBInfo ) ;
564 if ( pVBInfo->IF_DEF_LVDS == 1 )
568 XGI_XG21BLSignalVDD( 0x01 , 0x01, pVBInfo ) ; /* LVDS VDD on */
569 XGI_XG21SetPanelDelay( 2,pVBInfo ) ;
574 XGI_XG27BLSignalVDD( 0x01 , 0x01, pVBInfo ) ; /* LVDS VDD on */
575 XGI_XG21SetPanelDelay( 2,pVBInfo ) ;
579 XGI_SetRegANDOR( (XGIIOADDRESS) pVBInfo->P3c4 , 0x1F , ~0xC0 , 0x00 ) ; /* VESA DPMS status on */
580 XGI_SetRegAND( (XGIIOADDRESS)pVBInfo->P3c4 , 0x01 , ~0x20 ) ; /* enable memory retrieve for CRTC */
584 temp = XGI_GetReg((XGIIOADDRESS) pVBInfo->P3d4 , 0x38 ) ;
587 XGI_SetRegANDOR((XGIIOADDRESS) pVBInfo->P3c4 , 0x09 , ~0x80 , 0x80 ) ; /* DVO ON */
588 XGI_SetXG21FPBits( pVBInfo );
589 XGI_SetRegAND((XGIIOADDRESS) pVBInfo->P3d4 , 0x4A , ~0x20 ) ; /* Enable write GPIOF */
590 /*XGINew_SetRegANDOR( pVBInfo->P3d4 , 0x48 , ~0x20 , 0x20 ) ;*/ /* LCD Display ON */
593 XGI_XG21BLSignalVDD( 0x20 , 0x20, pVBInfo ) ; /* LVDS signal on */
594 XGI_DisplayOn( pXGIHWDE, pVBInfo );
599 temp = XGI_GetReg((XGIIOADDRESS) pVBInfo->P3d4 , 0x38 ) ;
602 XGI_SetRegANDOR((XGIIOADDRESS) pVBInfo->P3c4 , 0x09 , ~0x80 , 0x80 ) ; /* DVO ON */
603 XGI_SetXG27FPBits( pVBInfo );
604 XGI_SetRegAND((XGIIOADDRESS) pVBInfo->P3d4 , 0x4A , ~0x20 ) ; /* Enable write GPIOF */
605 /*XGINew_SetRegANDOR( pVBInfo->P3d4 , 0x48 , ~0x20 , 0x20 ) ;*/ /* LCD Display ON */
607 XGI_XG27BLSignalVDD( 0x20 , 0x20, pVBInfo ) ; /* LVDS signal on */
609 XGIPowerSaving(pVBInfo, g_PowerSavingStatus);
611 XGI_DisplayOn( pXGIHWDE, pVBInfo );
619 XGI_SetRegANDOR((XGIIOADDRESS) pVBInfo->P3c4 , 0x1E , ~0x40 , 0x40 ) ; /* 2D ON */
629 XGI_DisplayOff( pXGIHWDE, pVBInfo );
638 XGIPowerSaving(pVBInfo, 0x03); /* Turn off DAC1, DVO */
643 XGIPowerSaving(pVBInfo, 0x07); /* Turn off DAC1, DAC2, DVO */
646 XGI_SetReg((XGIIOADDRESS) pVBInfo->P3c4 , 0x1f , ( UCHAR )( temp | 0x40 ) ) ;
649 XGI_SetRegAND((XGIIOADDRESS) pVBInfo->P3c4 , 0x1E , ~0x40) ; /* 2D OFF */
658 XGI_DisplayOff( pXGIHWDE, pVBInfo );
659 XGI_XG21BLSignalVDD( 0x20 , 0x00, pVBInfo ) ; /* LVDS signal off */
660 XGIPowerSaving(pVBInfo, 0x03); /* Turn off DAC1, DVO */
665 XGI_DisplayOff( pXGIHWDE, pVBInfo );
666 XGI_XG27BLSignalVDD( 0x20 , 0x00, pVBInfo ) ; /* LVDS signal off */
667 XGIPowerSaving(pVBInfo, 0x07); /* Turn off DAC1, DAC2, DVO */
670 XGI_SetReg((XGIIOADDRESS) pVBInfo->P3c4 , 0x1f , ( UCHAR )( temp | 0x80 ) ) ;
673 XGI_SetRegAND((XGIIOADDRESS) pVBInfo->P3c4 , 0x1E , ~0x40) ; /* 2D OFF */
681 XGINew_SetReg1( pVBInfo->P3c4 , 0x1f , ( UCHAR )( temp | 0xc0 ) ) ;
682 XGI_DisableBridge( pXGIHWDE, pVBInfo ) ;
688 XGI_DisplayOff( pXGIHWDE, pVBInfo );
690 XGI_XG21BLSignalVDD( 0x20 , 0x00, pVBInfo ) ; /* LVDS signal off */
692 temp = XGI_GetReg((XGIIOADDRESS) pVBInfo->P3d4 , 0x38 ) ;
696 XGI_SetRegAND((XGIIOADDRESS) pVBInfo->P3c4 , 0x09 , ~0x80 ) ; /* DVO Off */
697 XGI_SetRegAND((XGIIOADDRESS) pVBInfo->P3d4 , 0x4A , ~0x20 ) ; /* Enable write GPIOF */
698 /*XGINew_SetRegAND( pVBInfo->P3d4 , 0x48 , ~0x20 ) ;*/ /* LCD Display OFF */
701 XGIPowerSaving(pVBInfo, 0x03); /* Turn off DAC1, DVO */
707 XGI_DisplayOff( pXGIHWDE, pVBInfo );
709 XGI_XG27BLSignalVDD( 0x20 , 0x00, pVBInfo ) ; /* LVDS signal off */
711 temp = XGI_GetReg((XGIIOADDRESS) pVBInfo->P3d4 , 0x38 ) ;
715 XGI_SetRegAND((XGIIOADDRESS) pVBInfo->P3c4 , 0x09 , ~0x80 ) ; /* DVO Off */
718 XGIPowerSaving(pVBInfo, 0x07); /* Turn off DAC1, DAC2, DVO */
721 XGI_SetRegANDOR((XGIIOADDRESS) pVBInfo->P3c4 , 0x1F , ~0xC0 , 0xC0 ) ;
722 XGI_SetRegOR((XGIIOADDRESS) pVBInfo->P3c4 , 0x01 , 0x20 ) ; /* CRT Off */
724 if ( ( pXGIHWDE->jChipType == XG21 ) && ( pVBInfo->IF_DEF_LVDS == 1 ) )
726 XGI_XG21SetPanelDelay( 4,pVBInfo ) ;
727 XGI_XG21BLSignalVDD( 0x01 , 0x00, pVBInfo ) ; /* LVDS VDD off */
728 XGI_XG21SetPanelDelay( 5,pVBInfo ) ;
731 if ( ( pXGIHWDE->jChipType == XG27 ) && ( pVBInfo->IF_DEF_LVDS == 1 ) )
733 XGI_XG21SetPanelDelay( 4,pVBInfo ) ;
734 XGI_XG27BLSignalVDD( 0x01 , 0x00, pVBInfo ) ; /* LVDS VDD off */
735 XGI_XG21SetPanelDelay( 5,pVBInfo ) ;
740 XGI_SetRegAND((XGIIOADDRESS) pVBInfo->P3c4 , 0x1E , ~0x40) ; /* 2D OFF */
749 XGI_LockCRT2( pXGIHWDE , pVBInfo ) ;