mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
Staging: xgifb: Remove USHORT, ULONG, BOOLEAN, and VOID typedefs
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Arnaud Patard <apatard@mandriva.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
490ce818c6
commit
82d6eb5b2e
13 changed files with 1050 additions and 898 deletions
|
@ -499,13 +499,13 @@ u8 XGIfb_mode_no = 0;
|
|||
u8 XGIfb_rate_idx = 0;
|
||||
|
||||
/* TW: CR36 evaluation */
|
||||
const USHORT XGI300paneltype[] =
|
||||
const unsigned short XGI300paneltype[] =
|
||||
{ LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024,
|
||||
LCD_1280x960, LCD_640x480, LCD_1024x600, LCD_1152x768,
|
||||
LCD_1024x768, LCD_1024x768, LCD_1024x768,
|
||||
LCD_1024x768, LCD_1024x768, LCD_1024x768, LCD_1024x768 };
|
||||
|
||||
const USHORT XGI310paneltype[] =
|
||||
const unsigned short XGI310paneltype[] =
|
||||
{ LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024,
|
||||
LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960,
|
||||
LCD_1152x768, LCD_1400x1050,LCD_1280x768, LCD_1600x1200,
|
||||
|
@ -821,7 +821,9 @@ extern int XGIfb_mode_rate_to_ddata(VB_DEVICE_INFO *XGI_Pr, PXGI_HW_DEVICE_
|
|||
unsigned int *hsync_len, unsigned int *vsync_len,
|
||||
unsigned int *sync, unsigned int *vmode);
|
||||
*/
|
||||
extern BOOLEAN XGI_SearchModeID( USHORT ModeNo,USHORT *ModeIdIndex, PVB_DEVICE_INFO );
|
||||
extern unsigned char XGI_SearchModeID(unsigned short ModeNo,
|
||||
unsigned short *ModeIdIndex,
|
||||
PVB_DEVICE_INFO);
|
||||
static int XGIfb_get_fix(struct fb_fix_screeninfo *fix, int con,
|
||||
struct fb_info *info);
|
||||
|
||||
|
@ -841,10 +843,10 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
|
|||
static void XGIfb_pre_setmode(void);
|
||||
static void XGIfb_post_setmode(void);
|
||||
|
||||
static BOOLEAN XGIfb_CheckVBRetrace(void);
|
||||
static BOOLEAN XGIfbcheckvretracecrt2(void);
|
||||
static BOOLEAN XGIfbcheckvretracecrt1(void);
|
||||
static BOOLEAN XGIfb_bridgeisslave(void);
|
||||
static unsigned char XGIfb_CheckVBRetrace(void);
|
||||
static unsigned char XGIfbcheckvretracecrt2(void);
|
||||
static unsigned char XGIfbcheckvretracecrt1(void);
|
||||
static unsigned char XGIfb_bridgeisslave(void);
|
||||
|
||||
struct XGI_memreq {
|
||||
unsigned long offset;
|
||||
|
@ -879,7 +881,7 @@ static XGI_OH *XGIfb_poh_free(unsigned long base);
|
|||
static void XGIfb_free_node(XGI_OH *poh);
|
||||
|
||||
/* Internal routines to access PCI configuration space */
|
||||
BOOLEAN XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
|
||||
unsigned char XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
|
||||
unsigned long offset, unsigned long set, unsigned long *value);
|
||||
//BOOLEAN XGIfb_query_north_bridge_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
|
||||
// unsigned long offset, unsigned long set, unsigned long *value);
|
||||
|
@ -887,18 +889,26 @@ BOOLEAN XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
|
|||
|
||||
/* Routines from init.c/init301.c */
|
||||
extern void InitTo330Pointer(UCHAR,PVB_DEVICE_INFO pVBInfo);
|
||||
extern BOOLEAN XGIInitNew(PXGI_HW_DEVICE_INFO HwDeviceExtension);
|
||||
extern BOOLEAN XGISetModeNew(PXGI_HW_DEVICE_INFO HwDeviceExtension, USHORT ModeNo);
|
||||
extern unsigned char XGIInitNew(PXGI_HW_DEVICE_INFO HwDeviceExtension);
|
||||
extern unsigned char XGISetModeNew(PXGI_HW_DEVICE_INFO HwDeviceExtension,
|
||||
unsigned short ModeNo);
|
||||
//extern void XGI_SetEnableDstn(VB_DEVICE_INFO *XGI_Pr);
|
||||
extern void XGI_LongWait(VB_DEVICE_INFO *XGI_Pr);
|
||||
extern USHORT XGI_GetRatePtrCRT2( PXGI_HW_DEVICE_INFO pXGIHWDE, USHORT ModeNo,USHORT ModeIdIndex,PVB_DEVICE_INFO pVBInfo );
|
||||
extern unsigned short XGI_GetRatePtrCRT2(PXGI_HW_DEVICE_INFO pXGIHWDE,
|
||||
unsigned short ModeNo,
|
||||
unsigned short ModeIdIndex,
|
||||
PVB_DEVICE_INFO pVBInfo);
|
||||
/* TW: Chrontel TV functions */
|
||||
extern USHORT XGI_GetCH700x(VB_DEVICE_INFO *XGI_Pr, USHORT tempbx);
|
||||
extern void XGI_SetCH700x(VB_DEVICE_INFO *XGI_Pr, USHORT tempbx);
|
||||
extern USHORT XGI_GetCH701x(VB_DEVICE_INFO *XGI_Pr, USHORT tempbx);
|
||||
extern void XGI_SetCH701x(VB_DEVICE_INFO *XGI_Pr, USHORT tempbx);
|
||||
extern void XGI_SetCH70xxANDOR(VB_DEVICE_INFO *XGI_Pr, USHORT tempax,USHORT tempbh);
|
||||
extern void XGI_DDC2Delay(VB_DEVICE_INFO *XGI_Pr, USHORT delaytime);
|
||||
extern unsigned short XGI_GetCH700x(VB_DEVICE_INFO *XGI_Pr,
|
||||
unsigned short tempbx);
|
||||
extern void XGI_SetCH700x(VB_DEVICE_INFO *XGI_Pr, unsigned short tempbx);
|
||||
extern unsigned short XGI_GetCH701x(VB_DEVICE_INFO *XGI_Pr,
|
||||
unsigned short tempbx);
|
||||
extern void XGI_SetCH701x(VB_DEVICE_INFO *XGI_Pr, unsigned short tempbx);
|
||||
extern void XGI_SetCH70xxANDOR(VB_DEVICE_INFO *XGI_Pr,
|
||||
unsigned short tempax,
|
||||
unsigned short tempbh);
|
||||
extern void XGI_DDC2Delay(VB_DEVICE_INFO *XGI_Pr, unsigned short delaytime);
|
||||
|
||||
/* TW: Sensing routines */
|
||||
void XGI_Sense30x(void);
|
||||
|
|
|
@ -165,11 +165,11 @@ int
|
|||
XGIfb_mode_rate_to_dclock(VB_DEVICE_INFO *XGI_Pr, PXGI_HW_DEVICE_INFO HwDeviceExtension,
|
||||
unsigned char modeno, unsigned char rateindex)
|
||||
{
|
||||
USHORT ModeNo = modeno;
|
||||
USHORT ModeIdIndex = 0, ClockIndex = 0;
|
||||
USHORT RefreshRateTableIndex = 0;
|
||||
unsigned short ModeNo = modeno;
|
||||
unsigned short ModeIdIndex = 0, ClockIndex = 0;
|
||||
unsigned short RefreshRateTableIndex = 0;
|
||||
|
||||
/*ULONG temp = 0;*/
|
||||
/*unsigned long temp = 0;*/
|
||||
int Clock;
|
||||
XGI_Pr->ROMAddr = HwDeviceExtension->pjVirtualRomBase;
|
||||
InitTo330Pointer( HwDeviceExtension->jChipType, XGI_Pr ) ;
|
||||
|
@ -204,9 +204,9 @@ XGIfb_mode_rate_to_ddata(VB_DEVICE_INFO *XGI_Pr, PXGI_HW_DEVICE_INFO HwDeviceExt
|
|||
u32 *hsync_len, u32 *vsync_len,
|
||||
u32 *sync, u32 *vmode)
|
||||
{
|
||||
USHORT ModeNo = modeno;
|
||||
USHORT ModeIdIndex = 0, index = 0;
|
||||
USHORT RefreshRateTableIndex = 0;
|
||||
unsigned short ModeNo = modeno;
|
||||
unsigned short ModeIdIndex = 0, index = 0;
|
||||
unsigned short RefreshRateTableIndex = 0;
|
||||
|
||||
unsigned short VRE, VBE, VRS, VBS, VDE, VT;
|
||||
unsigned short HRE, HBE, HRS, HBS, HDE, HT;
|
||||
|
@ -377,7 +377,7 @@ XGIfb_mode_rate_to_ddata(VB_DEVICE_INFO *XGI_Pr, PXGI_HW_DEVICE_INFO HwDeviceExt
|
|||
|
||||
|
||||
|
||||
void XGIRegInit(VB_DEVICE_INFO *XGI_Pr, ULONG BaseAddr)
|
||||
void XGIRegInit(VB_DEVICE_INFO *XGI_Pr, unsigned long BaseAddr)
|
||||
{
|
||||
XGI_Pr->RelIO = BaseAddr;
|
||||
XGI_Pr->P3c4 = BaseAddr + 0x14;
|
||||
|
@ -415,7 +415,7 @@ u32 XGIfb_get_reg3(u16 port)
|
|||
|
||||
/* ------------ Interface for init & mode switching code ------------- */
|
||||
|
||||
BOOLEAN
|
||||
unsigned char
|
||||
XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
|
||||
unsigned long offset, unsigned long set, unsigned long *value)
|
||||
{
|
||||
|
@ -450,7 +450,7 @@ XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
|
|||
return 1;
|
||||
}
|
||||
|
||||
/*BOOLEAN XGIfb_query_north_bridge_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
|
||||
/*unsigned char XGIfb_query_north_bridge_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
|
||||
unsigned long offset, unsigned long set, unsigned long *value)
|
||||
{
|
||||
static struct pci_dev *pdev = NULL;
|
||||
|
@ -937,7 +937,7 @@ static void XGIfb_search_tvstd(const char *name)
|
|||
}
|
||||
}
|
||||
|
||||
static BOOLEAN XGIfb_bridgeisslave(void)
|
||||
static unsigned char XGIfb_bridgeisslave(void)
|
||||
{
|
||||
unsigned char usScratchP1_00;
|
||||
|
||||
|
@ -951,7 +951,7 @@ static BOOLEAN XGIfb_bridgeisslave(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static BOOLEAN XGIfbcheckvretracecrt1(void)
|
||||
static unsigned char XGIfbcheckvretracecrt1(void)
|
||||
{
|
||||
unsigned char temp;
|
||||
|
||||
|
@ -970,7 +970,7 @@ static BOOLEAN XGIfbcheckvretracecrt1(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static BOOLEAN XGIfbcheckvretracecrt2(void)
|
||||
static unsigned char XGIfbcheckvretracecrt2(void)
|
||||
{
|
||||
unsigned char temp;
|
||||
if (xgi_video_info.hasVB == HASVB_NONE)
|
||||
|
@ -982,7 +982,7 @@ static BOOLEAN XGIfbcheckvretracecrt2(void)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static BOOLEAN XGIfb_CheckVBRetrace(void)
|
||||
static unsigned char XGIfb_CheckVBRetrace(void)
|
||||
{
|
||||
if(xgi_video_info.disp_state & DISPTYPE_DISP2) {
|
||||
if(XGIfb_bridgeisslave()) {
|
||||
|
@ -2588,7 +2588,7 @@ static void XGIfb_pre_setmode(void)
|
|||
static void XGIfb_post_setmode(void)
|
||||
{
|
||||
u8 reg;
|
||||
BOOLEAN doit = 1;
|
||||
unsigned char doit = 1;
|
||||
/* outXGIIDXREG(XGISR,IND_XGI_PASSWORD,XGI_PASSWORD);
|
||||
outXGIIDXREG(XGICR,0x13,0x00);
|
||||
setXGIIDXREG(XGISR,0x0E,0xF0,0x01);
|
||||
|
@ -2826,7 +2826,7 @@ XGIINITSTATIC int __init XGIfb_setup(char *options)
|
|||
|
||||
static unsigned char VBIOS_BUF[65535];
|
||||
|
||||
unsigned char* attempt_map_rom(struct pci_dev *dev,void *copy_address)
|
||||
unsigned char *attempt_map_rom(struct pci_dev *dev, void *copy_address)
|
||||
{
|
||||
u32 rom_size = 0;
|
||||
u32 rom_address = 0;
|
||||
|
@ -2909,7 +2909,7 @@ int __devinit xgifb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
if (pci_enable_device(pdev))
|
||||
return -EIO;
|
||||
|
||||
XGIRegInit(&XGI_Pr, (ULONG)XGIhw_ext.pjIOAddress);
|
||||
XGIRegInit(&XGI_Pr, (unsigned long)XGIhw_ext.pjIOAddress);
|
||||
|
||||
outXGIIDXREG(XGISR, IND_XGI_PASSWORD, XGI_PASSWORD);
|
||||
inXGIIDXREG(XGISR, IND_XGI_PASSWORD, reg1);
|
||||
|
|
|
@ -11,25 +11,30 @@
|
|||
#include "vb_ext.h"
|
||||
extern UCHAR XGI330_SoftSetting;
|
||||
extern UCHAR XGI330_OutputSelect;
|
||||
extern USHORT XGI330_RGBSenseData2;
|
||||
extern USHORT XGI330_YCSenseData2;
|
||||
extern USHORT XGI330_VideoSenseData2;
|
||||
extern unsigned short XGI330_RGBSenseData2;
|
||||
extern unsigned short XGI330_YCSenseData2;
|
||||
extern unsigned short XGI330_VideoSenseData2;
|
||||
void XGI_GetSenseStatus( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo );
|
||||
BOOLEAN XGINew_GetPanelID(PVB_DEVICE_INFO pVBInfo);
|
||||
USHORT XGINew_SenseLCD(PXGI_HW_DEVICE_INFO,PVB_DEVICE_INFO pVBInfo);
|
||||
BOOLEAN XGINew_GetLCDDDCInfo(PXGI_HW_DEVICE_INFO HwDeviceExtension,PVB_DEVICE_INFO pVBInfo);
|
||||
void XGISetDPMS( PXGI_HW_DEVICE_INFO pXGIHWDE , ULONG VESA_POWER_STATE ) ;
|
||||
BOOLEAN XGINew_BridgeIsEnable(PXGI_HW_DEVICE_INFO,PVB_DEVICE_INFO pVBInfo );
|
||||
BOOLEAN XGINew_Sense(USHORT tempbx,USHORT tempcx, PVB_DEVICE_INFO pVBInfo);
|
||||
BOOLEAN XGINew_SenseHiTV( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo ) ;
|
||||
unsigned char XGINew_GetPanelID(PVB_DEVICE_INFO pVBInfo);
|
||||
unsigned short XGINew_SenseLCD(PXGI_HW_DEVICE_INFO,
|
||||
PVB_DEVICE_INFO pVBInfo);
|
||||
unsigned char XGINew_GetLCDDDCInfo(PXGI_HW_DEVICE_INFO HwDeviceExtension,
|
||||
PVB_DEVICE_INFO pVBInfo);
|
||||
void XGISetDPMS(PXGI_HW_DEVICE_INFO pXGIHWDE,
|
||||
unsigned long VESA_POWER_STATE);
|
||||
unsigned char XGINew_BridgeIsEnable(PXGI_HW_DEVICE_INFO, PVB_DEVICE_INFO pVBInfo);
|
||||
unsigned char XGINew_Sense(unsigned short tempbx, unsigned short tempcx,
|
||||
PVB_DEVICE_INFO pVBInfo);
|
||||
unsigned char XGINew_SenseHiTV(PXGI_HW_DEVICE_INFO HwDeviceExtension,
|
||||
PVB_DEVICE_INFO pVBInfo);
|
||||
|
||||
/**************************************************************
|
||||
Dynamic Sense
|
||||
*************************************************************/
|
||||
|
||||
void XGI_WaitDisplay(void);
|
||||
BOOLEAN XGI_Is301C(PVB_DEVICE_INFO);
|
||||
BOOLEAN XGI_Is301LV(PVB_DEVICE_INFO);
|
||||
unsigned char XGI_Is301C(PVB_DEVICE_INFO);
|
||||
unsigned char XGI_Is301LV(PVB_DEVICE_INFO);
|
||||
|
||||
|
||||
|
||||
|
@ -39,9 +44,9 @@ BOOLEAN XGI_Is301LV(PVB_DEVICE_INFO);
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
BOOLEAN XGINew_Is301B( PVB_DEVICE_INFO pVBInfo )
|
||||
unsigned char XGINew_Is301B(PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT flag ;
|
||||
unsigned short flag ;
|
||||
|
||||
flag = XGINew_GetReg1( pVBInfo->Part4Port , 0x01 ) ;
|
||||
|
||||
|
@ -57,7 +62,7 @@ BOOLEAN XGINew_Is301B( PVB_DEVICE_INFO pVBInfo )
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
BOOLEAN XGI_Is301C( PVB_DEVICE_INFO pVBInfo )
|
||||
unsigned char XGI_Is301C(PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
if ( ( XGINew_GetReg1( pVBInfo->Part4Port , 0x01 ) & 0xF0 ) == 0xC0 )
|
||||
return( 1 ) ;
|
||||
|
@ -78,7 +83,7 @@ BOOLEAN XGI_Is301C( PVB_DEVICE_INFO pVBInfo )
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
BOOLEAN XGI_Is301LV( PVB_DEVICE_INFO pVBInfo )
|
||||
unsigned char XGI_Is301LV(PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
if ( XGINew_GetReg1( pVBInfo->Part4Port , 0x01 ) >= 0xD0 )
|
||||
{
|
||||
|
@ -97,9 +102,11 @@ BOOLEAN XGI_Is301LV( PVB_DEVICE_INFO pVBInfo )
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
BOOLEAN XGINew_Sense( USHORT tempbx , USHORT tempcx, PVB_DEVICE_INFO pVBInfo )
|
||||
unsigned char XGINew_Sense(unsigned short tempbx,
|
||||
unsigned short tempcx,
|
||||
PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT temp , i , tempch ;
|
||||
unsigned short temp, i, tempch;
|
||||
|
||||
temp = tempbx & 0xFF ;
|
||||
XGINew_SetReg1( pVBInfo->Part4Port , 0x11 , temp ) ;
|
||||
|
@ -128,13 +135,14 @@ BOOLEAN XGINew_Sense( USHORT tempbx , USHORT tempcx, PVB_DEVICE_INFO pVBInfo )
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
VOID XGISetDPMS( PXGI_HW_DEVICE_INFO pXGIHWDE , ULONG VESA_POWER_STATE )
|
||||
void XGISetDPMS(PXGI_HW_DEVICE_INFO pXGIHWDE,
|
||||
unsigned long VESA_POWER_STATE)
|
||||
{
|
||||
USHORT ModeNo, ModeIdIndex ;
|
||||
unsigned short ModeNo, ModeIdIndex;
|
||||
UCHAR temp ;
|
||||
VB_DEVICE_INFO VBINF;
|
||||
PVB_DEVICE_INFO pVBInfo = &VBINF;
|
||||
pVBInfo->BaseAddr = (ULONG)pXGIHWDE->pjIOAddress ;
|
||||
pVBInfo->BaseAddr = (unsigned long)pXGIHWDE->pjIOAddress ;
|
||||
pVBInfo->ROMAddr = pXGIHWDE->pjVirtualRomBase ;
|
||||
|
||||
|
||||
|
@ -353,10 +361,10 @@ VOID XGISetDPMS( PXGI_HW_DEVICE_INFO pXGIHWDE , ULONG VESA_POWER_STATE )
|
|||
/* --------------------------------------------------------------------- */
|
||||
void XGI_GetSenseStatus( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT tempax = 0 , tempbx , tempcx , temp ,
|
||||
unsigned short tempax = 0 , tempbx , tempcx , temp ,
|
||||
P2reg0 = 0 , SenseModeNo = 0 , OutputSelect = *pVBInfo->pOutputSelect ,
|
||||
ModeIdIndex , i ;
|
||||
pVBInfo->BaseAddr = (ULONG)HwDeviceExtension->pjIOAddress ;
|
||||
pVBInfo->BaseAddr = (unsigned long)HwDeviceExtension->pjIOAddress ;
|
||||
|
||||
if ( pVBInfo->IF_DEF_LVDS == 1 )
|
||||
{
|
||||
|
@ -550,10 +558,11 @@ void XGI_GetSenseStatus( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
USHORT XGINew_SenseLCD( PXGI_HW_DEVICE_INFO HwDeviceExtension ,PVB_DEVICE_INFO pVBInfo)
|
||||
unsigned short XGINew_SenseLCD(PXGI_HW_DEVICE_INFO HwDeviceExtension,
|
||||
PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
/* USHORT SoftSetting ; */
|
||||
USHORT temp ;
|
||||
/* unsigned short SoftSetting ; */
|
||||
unsigned short temp ;
|
||||
|
||||
if ( ( HwDeviceExtension->jChipType >= XG20 ) || ( HwDeviceExtension->jChipType >= XG40 ) )
|
||||
temp = 0 ;
|
||||
|
@ -573,9 +582,9 @@ USHORT XGINew_SenseLCD( PXGI_HW_DEVICE_INFO HwDeviceExtension ,PVB_DEVICE_INFO p
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
BOOLEAN XGINew_GetLCDDDCInfo( PXGI_HW_DEVICE_INFO HwDeviceExtension,PVB_DEVICE_INFO pVBInfo)
|
||||
unsigned char XGINew_GetLCDDDCInfo( PXGI_HW_DEVICE_INFO HwDeviceExtension,PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT temp ;
|
||||
unsigned short temp ;
|
||||
|
||||
/* add lcd sense */
|
||||
if ( HwDeviceExtension->ulCRT2LCDType == LCD_UNKNOWN )
|
||||
|
@ -584,7 +593,7 @@ BOOLEAN XGINew_GetLCDDDCInfo( PXGI_HW_DEVICE_INFO HwDeviceExtension,PVB_DEVICE_I
|
|||
}
|
||||
else
|
||||
{
|
||||
temp = ( USHORT )HwDeviceExtension->ulCRT2LCDType ;
|
||||
temp = (unsigned short)HwDeviceExtension->ulCRT2LCDType ;
|
||||
switch( HwDeviceExtension->ulCRT2LCDType )
|
||||
{
|
||||
case LCD_INVALID:
|
||||
|
@ -626,26 +635,27 @@ BOOLEAN XGINew_GetLCDDDCInfo( PXGI_HW_DEVICE_INFO HwDeviceExtension,PVB_DEVICE_I
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
BOOLEAN XGINew_GetPanelID(PVB_DEVICE_INFO pVBInfo )
|
||||
unsigned char XGINew_GetPanelID(PVB_DEVICE_INFO pVBInfo )
|
||||
{
|
||||
USHORT PanelTypeTable[ 16 ] = { SyncNN | PanelRGB18Bit | Panel800x600 | _PanelType00 ,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType01 ,
|
||||
SyncNN | PanelRGB18Bit | Panel800x600 | _PanelType02 ,
|
||||
SyncNN | PanelRGB18Bit | Panel640x480 | _PanelType03 ,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType04 ,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType05 ,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType06 ,
|
||||
SyncNN | PanelRGB24Bit | Panel1024x768 | _PanelType07 ,
|
||||
SyncNN | PanelRGB18Bit | Panel800x600 | _PanelType08 ,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType09 ,
|
||||
SyncNN | PanelRGB18Bit | Panel800x600 | _PanelType0A ,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType0B ,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType0C ,
|
||||
SyncNN | PanelRGB24Bit | Panel1024x768 | _PanelType0D ,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType0E ,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType0F } ;
|
||||
USHORT tempax , tempbx , temp ;
|
||||
/* USHORT return_flag ; */
|
||||
unsigned short PanelTypeTable[16] = {
|
||||
SyncNN | PanelRGB18Bit | Panel800x600 | _PanelType00,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType01,
|
||||
SyncNN | PanelRGB18Bit | Panel800x600 | _PanelType02,
|
||||
SyncNN | PanelRGB18Bit | Panel640x480 | _PanelType03,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType04,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType05,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType06,
|
||||
SyncNN | PanelRGB24Bit | Panel1024x768 | _PanelType07,
|
||||
SyncNN | PanelRGB18Bit | Panel800x600 | _PanelType08,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType09,
|
||||
SyncNN | PanelRGB18Bit | Panel800x600 | _PanelType0A,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType0B,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType0C,
|
||||
SyncNN | PanelRGB24Bit | Panel1024x768 | _PanelType0D,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType0E,
|
||||
SyncNN | PanelRGB18Bit | Panel1024x768 | _PanelType0F };
|
||||
unsigned short tempax , tempbx, temp;
|
||||
/* unsigned short return_flag ; */
|
||||
|
||||
tempax = XGINew_GetReg1( pVBInfo->P3c4 , 0x1A ) ;
|
||||
tempbx = tempax & 0x1E ;
|
||||
|
@ -698,9 +708,9 @@ BOOLEAN XGINew_GetPanelID(PVB_DEVICE_INFO pVBInfo )
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
BOOLEAN XGINew_BridgeIsEnable( PXGI_HW_DEVICE_INFO HwDeviceExtension ,PVB_DEVICE_INFO pVBInfo)
|
||||
unsigned char XGINew_BridgeIsEnable( PXGI_HW_DEVICE_INFO HwDeviceExtension ,PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT flag ;
|
||||
unsigned short flag ;
|
||||
|
||||
if ( XGI_BridgeIsOn( pVBInfo ) == 0 )
|
||||
{
|
||||
|
@ -725,9 +735,9 @@ BOOLEAN XGINew_BridgeIsEnable( PXGI_HW_DEVICE_INFO HwDeviceExtension ,PVB_DEVICE
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* ------------------------------------------------------ */
|
||||
BOOLEAN XGINew_SenseHiTV( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo )
|
||||
unsigned char XGINew_SenseHiTV( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo )
|
||||
{
|
||||
USHORT tempbx , tempcx , temp , i , tempch;
|
||||
unsigned short tempbx , tempcx , temp , i , tempch;
|
||||
|
||||
tempbx = *pVBInfo->pYCSenseData2 ;
|
||||
|
||||
|
@ -809,11 +819,11 @@ BOOLEAN XGINew_SenseHiTV( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INF
|
|||
void XGI_XG21Fun14Sub70( PVB_DEVICE_INFO pVBInfo , PX86_REGS pBiosArguments )
|
||||
{
|
||||
|
||||
USHORT ModeIdIndex;
|
||||
USHORT ModeNo;
|
||||
unsigned short ModeIdIndex;
|
||||
unsigned short ModeNo;
|
||||
|
||||
USHORT EModeCount;
|
||||
USHORT lvdstableindex;
|
||||
unsigned short EModeCount;
|
||||
unsigned short lvdstableindex;
|
||||
|
||||
lvdstableindex = XGI_GetLVDSOEMTableIndex( pVBInfo );
|
||||
pBiosArguments->h.bl = 0x81;
|
||||
|
@ -852,10 +862,10 @@ void XGI_XG21Fun14Sub70( PVB_DEVICE_INFO pVBInfo , PX86_REGS pBiosArguments )
|
|||
void XGI_XG21Fun14Sub71( PVB_DEVICE_INFO pVBInfo , PX86_REGS pBiosArguments )
|
||||
{
|
||||
|
||||
USHORT EModeCount;
|
||||
USHORT ModeIdIndex,resindex;
|
||||
USHORT ModeNo;
|
||||
USHORT EModeIndex = pBiosArguments->h.bh;
|
||||
unsigned short EModeCount;
|
||||
unsigned short ModeIdIndex, resindex;
|
||||
unsigned short ModeNo;
|
||||
unsigned short EModeIndex = pBiosArguments->h.bh;
|
||||
|
||||
EModeCount = 0;
|
||||
for( ModeIdIndex = 0 ; ; ModeIdIndex ++ )
|
||||
|
@ -897,8 +907,8 @@ void XGI_XG21Fun14Sub71( PVB_DEVICE_INFO pVBInfo , PX86_REGS pBiosArguments )
|
|||
*/
|
||||
void XGI_XG21Fun14Sub72( PVB_DEVICE_INFO pVBInfo , PX86_REGS pBiosArguments )
|
||||
{
|
||||
USHORT ModeIdIndex,resindex;
|
||||
USHORT ModeNo;
|
||||
unsigned short ModeIdIndex, resindex;
|
||||
unsigned short ModeNo;
|
||||
|
||||
|
||||
ModeNo = pBiosArguments->h.bl ;
|
||||
|
@ -958,7 +968,7 @@ void XGI_XG21Fun14Sub73( PVB_DEVICE_INFO pVBInfo , PX86_REGS pBiosArguments )
|
|||
{
|
||||
UCHAR Select;
|
||||
|
||||
USHORT lvdstableindex;
|
||||
unsigned short lvdstableindex;
|
||||
|
||||
lvdstableindex = XGI_GetLVDSOEMTableIndex( pVBInfo );
|
||||
Select = pBiosArguments->h.bl;
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
#define _VBEXT_
|
||||
|
||||
struct DWORDREGS {
|
||||
ULONG Eax, Ebx, Ecx, Edx, Esi, Edi, Ebp;
|
||||
unsigned long Eax, Ebx, Ecx, Edx, Esi, Edi, Ebp;
|
||||
};
|
||||
|
||||
struct WORDREGS {
|
||||
USHORT ax, hi_ax, bx, hi_bx, cx, hi_cx, dx, hi_dx, si, hi_si, di ,hi_di, bp, hi_bp;
|
||||
unsigned short ax, hi_ax, bx, hi_bx, cx, hi_cx, dx, hi_dx, si,
|
||||
hi_si, di, hi_di, bp, hi_bp;
|
||||
};
|
||||
|
||||
struct BYTEREGS {
|
||||
|
@ -20,10 +21,12 @@ typedef union _X86_REGS {
|
|||
} X86_REGS, *PX86_REGS;
|
||||
|
||||
extern void XGI_XG21Fun14( PXGI_HW_DEVICE_INFO pXGIHWDE, PX86_REGS pBiosArguments);
|
||||
extern void XGISetDPMS( PXGI_HW_DEVICE_INFO pXGIHWDE , ULONG VESA_POWER_STATE ) ;
|
||||
extern void XGISetDPMS(PXGI_HW_DEVICE_INFO pXGIHWDE,
|
||||
unsigned long VESA_POWER_STATE);
|
||||
extern void XGI_GetSenseStatus( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo );
|
||||
extern void XGINew_SetModeScratch ( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo ) ;
|
||||
extern void ReadVBIOSTablData( UCHAR ChipType , PVB_DEVICE_INFO pVBInfo);
|
||||
extern USHORT XGINew_SenseLCD(PXGI_HW_DEVICE_INFO,PVB_DEVICE_INFO pVBInfo);
|
||||
extern unsigned short XGINew_SenseLCD(PXGI_HW_DEVICE_INFO,
|
||||
PVB_DEVICE_INFO pVBInfo);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -20,71 +20,67 @@
|
|||
|
||||
UCHAR XGINew_ChannelAB,XGINew_DataBusWidth;
|
||||
|
||||
USHORT XGINew_DRAMType[17][5]={{0x0C,0x0A,0x02,0x40,0x39},{0x0D,0x0A,0x01,0x40,0x48},
|
||||
{0x0C,0x09,0x02,0x20,0x35},{0x0D,0x09,0x01,0x20,0x44},
|
||||
{0x0C,0x08,0x02,0x10,0x31},{0x0D,0x08,0x01,0x10,0x40},
|
||||
{0x0C,0x0A,0x01,0x20,0x34},{0x0C,0x09,0x01,0x08,0x32},
|
||||
{0x0B,0x08,0x02,0x08,0x21},{0x0C,0x08,0x01,0x08,0x30},
|
||||
{0x0A,0x08,0x02,0x04,0x11},{0x0B,0x0A,0x01,0x10,0x28},
|
||||
{0x09,0x08,0x02,0x02,0x01},{0x0B,0x09,0x01,0x08,0x24},
|
||||
{0x0B,0x08,0x01,0x04,0x20},{0x0A,0x08,0x01,0x02,0x10},
|
||||
{0x09,0x08,0x01,0x01,0x00}};
|
||||
unsigned short XGINew_DRAMType[17][5] = {
|
||||
{0x0C, 0x0A, 0x02, 0x40, 0x39}, {0x0D, 0x0A, 0x01, 0x40, 0x48},
|
||||
{0x0C, 0x09, 0x02, 0x20, 0x35}, {0x0D, 0x09, 0x01, 0x20, 0x44},
|
||||
{0x0C, 0x08, 0x02, 0x10, 0x31}, {0x0D, 0x08, 0x01, 0x10, 0x40},
|
||||
{0x0C, 0x0A, 0x01, 0x20, 0x34}, {0x0C, 0x09, 0x01, 0x08, 0x32},
|
||||
{0x0B, 0x08, 0x02, 0x08, 0x21}, {0x0C, 0x08, 0x01, 0x08, 0x30},
|
||||
{0x0A, 0x08, 0x02, 0x04, 0x11}, {0x0B, 0x0A, 0x01, 0x10, 0x28},
|
||||
{0x09, 0x08, 0x02, 0x02, 0x01}, {0x0B, 0x09, 0x01, 0x08, 0x24},
|
||||
{0x0B, 0x08, 0x01, 0x04, 0x20}, {0x0A, 0x08, 0x01, 0x02, 0x10},
|
||||
{0x09, 0x08, 0x01, 0x01, 0x00} };
|
||||
|
||||
USHORT XGINew_SDRDRAM_TYPE[13][5]=
|
||||
{
|
||||
{ 2,12, 9,64,0x35},
|
||||
{ 1,13, 9,64,0x44},
|
||||
{ 2,12, 8,32,0x31},
|
||||
{ 2,11, 9,32,0x25},
|
||||
{ 1,12, 9,32,0x34},
|
||||
{ 1,13, 8,32,0x40},
|
||||
{ 2,11, 8,16,0x21},
|
||||
{ 1,12, 8,16,0x30},
|
||||
{ 1,11, 9,16,0x24},
|
||||
{ 1,11, 8, 8,0x20},
|
||||
{ 2, 9, 8, 4,0x01},
|
||||
{ 1,10, 8, 4,0x10},
|
||||
{ 1, 9, 8, 2,0x00}
|
||||
};
|
||||
unsigned short XGINew_SDRDRAM_TYPE[13][5] = {
|
||||
{ 2, 12, 9, 64, 0x35},
|
||||
{ 1, 13, 9, 64, 0x44},
|
||||
{ 2, 12, 8, 32, 0x31},
|
||||
{ 2, 11, 9, 32, 0x25},
|
||||
{ 1, 12, 9, 32, 0x34},
|
||||
{ 1, 13, 8, 32, 0x40},
|
||||
{ 2, 11, 8, 16, 0x21},
|
||||
{ 1, 12, 8, 16, 0x30},
|
||||
{ 1, 11, 9, 16, 0x24},
|
||||
{ 1, 11, 8, 8, 0x20},
|
||||
{ 2, 9, 8, 4, 0x01},
|
||||
{ 1, 10, 8, 4, 0x10},
|
||||
{ 1, 9, 8, 2, 0x00} };
|
||||
|
||||
USHORT XGINew_DDRDRAM_TYPE[4][5]=
|
||||
{
|
||||
{ 2,12, 9,64,0x35},
|
||||
{ 2,12, 8,32,0x31},
|
||||
{ 2,11, 8,16,0x21},
|
||||
{ 2, 9, 8, 4,0x01}
|
||||
};
|
||||
USHORT XGINew_DDRDRAM_TYPE340[4][5]=
|
||||
{
|
||||
{ 2,13, 9,64,0x45},
|
||||
{ 2,12, 9,32,0x35},
|
||||
{ 2,12, 8,16,0x31},
|
||||
{ 2,11, 8, 8,0x21}
|
||||
};
|
||||
USHORT XGINew_DDRDRAM_TYPE20[12][5]=
|
||||
{
|
||||
{ 2,14,11,128,0x5D},
|
||||
{ 2,14,10,64,0x59},
|
||||
{ 2,13,11,64,0x4D},
|
||||
{ 2,14, 9,32,0x55},
|
||||
{ 2,13,10,32,0x49},
|
||||
{ 2,12,11,32,0x3D},
|
||||
{ 2,14, 8,16,0x51},
|
||||
{ 2,13, 9,16,0x45},
|
||||
{ 2,12,10,16,0x39},
|
||||
{ 2,13, 8, 8,0x41},
|
||||
{ 2,12, 9, 8,0x35},
|
||||
{ 2,12, 8, 4,0x31}
|
||||
};
|
||||
unsigned short XGINew_DDRDRAM_TYPE[4][5] = {
|
||||
{ 2, 12, 9, 64, 0x35},
|
||||
{ 2, 12, 8, 32, 0x31},
|
||||
{ 2, 11, 8, 16, 0x21},
|
||||
{ 2, 9, 8, 4, 0x01} };
|
||||
|
||||
unsigned short XGINew_DDRDRAM_TYPE340[4][5] = {
|
||||
{ 2, 13, 9, 64, 0x45},
|
||||
{ 2, 12, 9, 32, 0x35},
|
||||
{ 2, 12, 8, 16, 0x31},
|
||||
{ 2, 11, 8, 8, 0x21} };
|
||||
|
||||
unsigned short XGINew_DDRDRAM_TYPE20[12][5] = {
|
||||
{ 2, 14, 11, 128, 0x5D},
|
||||
{ 2, 14, 10, 64, 0x59},
|
||||
{ 2, 13, 11, 64, 0x4D},
|
||||
{ 2, 14, 9, 32, 0x55},
|
||||
{ 2, 13, 10, 32, 0x49},
|
||||
{ 2, 12, 11, 32, 0x3D},
|
||||
{ 2, 14, 8, 16, 0x51},
|
||||
{ 2, 13, 9, 16, 0x45},
|
||||
{ 2, 12, 10, 16, 0x39},
|
||||
{ 2, 13, 8, 8, 0x41},
|
||||
{ 2, 12, 9, 8, 0x35},
|
||||
{ 2, 12, 8, 4, 0x31} };
|
||||
|
||||
void XGINew_SetDRAMSize_340(PXGI_HW_DEVICE_INFO, PVB_DEVICE_INFO);
|
||||
void XGINew_SetDRAMSize_310(PXGI_HW_DEVICE_INFO, PVB_DEVICE_INFO);
|
||||
void XGINew_SetMemoryClock(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO );
|
||||
void XGINew_SetDRAMModeRegister(PVB_DEVICE_INFO );
|
||||
void XGINew_SetDRAMModeRegister340( PXGI_HW_DEVICE_INFO HwDeviceExtension );
|
||||
void XGINew_SetDRAMDefaultRegister340(PXGI_HW_DEVICE_INFO HwDeviceExtension, ULONG, PVB_DEVICE_INFO );
|
||||
void XGINew_SetDRAMDefaultRegister340(PXGI_HW_DEVICE_INFO HwDeviceExtension,
|
||||
unsigned long, PVB_DEVICE_INFO);
|
||||
UCHAR XGINew_GetXG20DRAMType( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo);
|
||||
BOOLEAN XGIInitNew( PXGI_HW_DEVICE_INFO HwDeviceExtension) ;
|
||||
unsigned char XGIInitNew( PXGI_HW_DEVICE_INFO HwDeviceExtension) ;
|
||||
|
||||
int XGINew_DDRSizing340( PXGI_HW_DEVICE_INFO, PVB_DEVICE_INFO );
|
||||
void XGINew_DisableRefresh( PXGI_HW_DEVICE_INFO ,PVB_DEVICE_INFO) ;
|
||||
|
@ -93,12 +89,13 @@ int XGINew_SDRSizing(PVB_DEVICE_INFO);
|
|||
int XGINew_DDRSizing( PVB_DEVICE_INFO );
|
||||
void XGINew_EnableRefresh( PXGI_HW_DEVICE_INFO, PVB_DEVICE_INFO);
|
||||
int XGINew_RAMType; /*int ModeIDOffset,StandTable,CRT1Table,ScreenOffset,REFIndex;*/
|
||||
ULONG UNIROM; /* UNIROM */
|
||||
BOOLEAN ChkLFB( PVB_DEVICE_INFO );
|
||||
void XGINew_Delay15us(ULONG);
|
||||
void SetPowerConsume (PXGI_HW_DEVICE_INFO HwDeviceExtension,ULONG XGI_P3d4Port);
|
||||
unsigned long UNIROM; /* UNIROM */
|
||||
unsigned char ChkLFB( PVB_DEVICE_INFO );
|
||||
void XGINew_Delay15us(unsigned long);
|
||||
void SetPowerConsume(PXGI_HW_DEVICE_INFO HwDeviceExtension,
|
||||
unsigned long XGI_P3d4Port);
|
||||
void ReadVBIOSTablData( UCHAR ChipType , PVB_DEVICE_INFO pVBInfo);
|
||||
void XGINew_DDR1x_MRS_XG20( ULONG P3c4 , PVB_DEVICE_INFO pVBInfo);
|
||||
void XGINew_DDR1x_MRS_XG20(unsigned long P3c4, PVB_DEVICE_INFO pVBInfo);
|
||||
void XGINew_SetDRAMModeRegister_XG20( PXGI_HW_DEVICE_INFO HwDeviceExtension );
|
||||
void XGINew_SetDRAMModeRegister_XG27( PXGI_HW_DEVICE_INFO HwDeviceExtension );
|
||||
void XGINew_ChkSenseStatus ( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo ) ;
|
||||
|
@ -108,7 +105,7 @@ UCHAR GetXG21FPBits(PVB_DEVICE_INFO pVBInfo);
|
|||
void XGINew_GetXG27Sense(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo) ;
|
||||
UCHAR GetXG27FPBits(PVB_DEVICE_INFO pVBInfo);
|
||||
|
||||
void DelayUS(ULONG MicroSeconds)
|
||||
void DelayUS(unsigned long MicroSeconds)
|
||||
{
|
||||
udelay(MicroSeconds);
|
||||
}
|
||||
|
@ -120,7 +117,7 @@ void DelayUS(ULONG MicroSeconds)
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
BOOLEAN XGIInitNew( PXGI_HW_DEVICE_INFO HwDeviceExtension )
|
||||
unsigned char XGIInitNew( PXGI_HW_DEVICE_INFO HwDeviceExtension )
|
||||
{
|
||||
|
||||
VB_DEVICE_INFO VBINF;
|
||||
|
@ -129,17 +126,17 @@ BOOLEAN XGIInitNew( PXGI_HW_DEVICE_INFO HwDeviceExtension )
|
|||
// VBIOSVersion[ 5 ] ;
|
||||
volatile unsigned char *pVideoMemory;
|
||||
|
||||
/* ULONG j, k ; */
|
||||
/* unsigned long j, k ; */
|
||||
|
||||
PXGI_DSReg pSR ;
|
||||
|
||||
ULONG Temp ;
|
||||
unsigned long Temp ;
|
||||
|
||||
pVBInfo->ROMAddr = HwDeviceExtension->pjVirtualRomBase ;
|
||||
|
||||
pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress ;
|
||||
|
||||
pVBInfo->BaseAddr = (ULONG)HwDeviceExtension->pjIOAddress ;
|
||||
pVBInfo->BaseAddr = (unsigned long)HwDeviceExtension->pjIOAddress ;
|
||||
|
||||
pVideoMemory = (unsigned char *)pVBInfo->ROMAddr;
|
||||
|
||||
|
@ -642,7 +639,7 @@ UCHAR XGINew_Get310DRAMType(PVB_DEVICE_INFO pVBInfo)
|
|||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
/*
|
||||
void XGINew_Delay15us(ULONG ulMicrsoSec)
|
||||
void XGINew_Delay15us(unsigned long ulMicrsoSec)
|
||||
{
|
||||
}
|
||||
*/
|
||||
|
@ -656,7 +653,7 @@ void XGINew_Delay15us(ULONG ulMicrsoSec)
|
|||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_SDR_MRS( PVB_DEVICE_INFO pVBInfo )
|
||||
{
|
||||
USHORT data ;
|
||||
unsigned short data ;
|
||||
|
||||
data = XGINew_GetReg1( pVBInfo->P3c4 , 0x16 ) ;
|
||||
data &= 0x3F ; /* SR16 D7=0,D6=0 */
|
||||
|
@ -674,7 +671,7 @@ void XGINew_SDR_MRS( PVB_DEVICE_INFO pVBInfo )
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_DDR1x_MRS_340( ULONG P3c4 , PVB_DEVICE_INFO pVBInfo)
|
||||
void XGINew_DDR1x_MRS_340(unsigned long P3c4 , PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
XGINew_SetReg1( P3c4 , 0x18 , 0x01 ) ;
|
||||
XGINew_SetReg1( P3c4 , 0x19 , 0x20 ) ;
|
||||
|
@ -712,7 +709,7 @@ void XGINew_DDR1x_MRS_340( ULONG P3c4 , PVB_DEVICE_INFO pVBInfo)
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_DDR2x_MRS_340( ULONG P3c4 , PVB_DEVICE_INFO pVBInfo)
|
||||
void XGINew_DDR2x_MRS_340(unsigned long P3c4 , PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
XGINew_SetReg1( P3c4 , 0x18 , 0x00 ) ;
|
||||
XGINew_SetReg1( P3c4 , 0x19 , 0x20 ) ;
|
||||
|
@ -741,9 +738,10 @@ void XGINew_DDR2x_MRS_340( ULONG P3c4 , PVB_DEVICE_INFO pVBInfo)
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_DDRII_Bootup_XG27( PXGI_HW_DEVICE_INFO HwDeviceExtension , ULONG P3c4 , PVB_DEVICE_INFO pVBInfo)
|
||||
void XGINew_DDRII_Bootup_XG27(PXGI_HW_DEVICE_INFO HwDeviceExtension,
|
||||
unsigned long P3c4, PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
ULONG P3d4 = P3c4 + 0x10 ;
|
||||
unsigned long P3d4 = P3c4 + 0x10 ;
|
||||
XGINew_RAMType = ( int )XGINew_GetXG20DRAMType( HwDeviceExtension , pVBInfo ) ;
|
||||
XGINew_SetMemoryClock( HwDeviceExtension , pVBInfo ) ;
|
||||
|
||||
|
@ -819,9 +817,10 @@ void XGINew_DDRII_Bootup_XG27( PXGI_HW_DEVICE_INFO HwDeviceExtension , ULONG P3
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_DDR2_MRS_XG20( PXGI_HW_DEVICE_INFO HwDeviceExtension , ULONG P3c4 , PVB_DEVICE_INFO pVBInfo)
|
||||
void XGINew_DDR2_MRS_XG20(PXGI_HW_DEVICE_INFO HwDeviceExtension,
|
||||
unsigned long P3c4, PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
ULONG P3d4 = P3c4 + 0x10 ;
|
||||
unsigned long P3d4 = P3c4 + 0x10 ;
|
||||
|
||||
XGINew_RAMType = ( int )XGINew_GetXG20DRAMType( HwDeviceExtension , pVBInfo ) ;
|
||||
XGINew_SetMemoryClock( HwDeviceExtension , pVBInfo ) ;
|
||||
|
@ -871,9 +870,10 @@ void XGINew_DDR2_MRS_XG20( PXGI_HW_DEVICE_INFO HwDeviceExtension , ULONG P3c4 ,
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_DDR2_MRS_XG27( PXGI_HW_DEVICE_INFO HwDeviceExtension , ULONG P3c4 , PVB_DEVICE_INFO pVBInfo)
|
||||
void XGINew_DDR2_MRS_XG27(PXGI_HW_DEVICE_INFO HwDeviceExtension,
|
||||
unsigned long P3c4, PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
ULONG P3d4 = P3c4 + 0x10 ;
|
||||
unsigned long P3d4 = P3c4 + 0x10 ;
|
||||
|
||||
XGINew_RAMType = ( int )XGINew_GetXG20DRAMType( HwDeviceExtension , pVBInfo ) ;
|
||||
XGINew_SetMemoryClock( HwDeviceExtension , pVBInfo ) ;
|
||||
|
@ -949,9 +949,10 @@ void XGINew_DDR2_MRS_XG27( PXGI_HW_DEVICE_INFO HwDeviceExtension , ULONG P3c4 ,
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_DDR1x_DefaultRegister( PXGI_HW_DEVICE_INFO HwDeviceExtension , ULONG Port , PVB_DEVICE_INFO pVBInfo)
|
||||
void XGINew_DDR1x_DefaultRegister(PXGI_HW_DEVICE_INFO HwDeviceExtension,
|
||||
unsigned long Port, PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
ULONG P3d4 = Port ,
|
||||
unsigned long P3d4 = Port ,
|
||||
P3c4 = Port - 0x10 ;
|
||||
|
||||
if ( HwDeviceExtension->jChipType >= XG20 )
|
||||
|
@ -1009,9 +1010,10 @@ void XGINew_DDR1x_DefaultRegister( PXGI_HW_DEVICE_INFO HwDeviceExtension , ULON
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_DDR2x_DefaultRegister( PXGI_HW_DEVICE_INFO HwDeviceExtension , ULONG Port ,PVB_DEVICE_INFO pVBInfo)
|
||||
void XGINew_DDR2x_DefaultRegister(PXGI_HW_DEVICE_INFO HwDeviceExtension,
|
||||
unsigned long Port, PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
ULONG P3d4 = Port ,
|
||||
unsigned long P3d4 = Port ,
|
||||
P3c4 = Port - 0x10 ;
|
||||
|
||||
XGINew_SetMemoryClock( HwDeviceExtension , pVBInfo ) ;
|
||||
|
@ -1060,9 +1062,10 @@ void XGINew_DDR2x_DefaultRegister( PXGI_HW_DEVICE_INFO HwDeviceExtension , ULON
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_DDR2_DefaultRegister( PXGI_HW_DEVICE_INFO HwDeviceExtension, ULONG Port , PVB_DEVICE_INFO pVBInfo)
|
||||
void XGINew_DDR2_DefaultRegister(PXGI_HW_DEVICE_INFO HwDeviceExtension,
|
||||
unsigned long Port, PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
ULONG P3d4 = Port ,
|
||||
unsigned long P3d4 = Port ,
|
||||
P3c4 = Port - 0x10 ;
|
||||
|
||||
/* keep following setting sequence, each setting in the same reg insert idle */
|
||||
|
@ -1098,12 +1101,13 @@ void XGINew_DDR2_DefaultRegister( PXGI_HW_DEVICE_INFO HwDeviceExtension, ULONG P
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_SetDRAMDefaultRegister340( PXGI_HW_DEVICE_INFO HwDeviceExtension , ULONG Port , PVB_DEVICE_INFO pVBInfo)
|
||||
void XGINew_SetDRAMDefaultRegister340(PXGI_HW_DEVICE_INFO HwDeviceExtension,
|
||||
unsigned long Port, PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
UCHAR temp , temp1 , temp2 , temp3 ,
|
||||
i , j , k ;
|
||||
|
||||
ULONG P3d4 = Port ,
|
||||
unsigned long P3d4 = Port ,
|
||||
P3c4 = Port - 0x10 ;
|
||||
|
||||
XGINew_SetReg1( P3d4 , 0x6D , pVBInfo->CR40[ 8 ][ XGINew_RAMType ] ) ;
|
||||
|
@ -1243,7 +1247,7 @@ void XGINew_SetDRAMDefaultRegister340( PXGI_HW_DEVICE_INFO HwDeviceExtension ,
|
|||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_DDR_MRS(PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT data ;
|
||||
unsigned short data ;
|
||||
|
||||
volatile unsigned char *pVideoMemory = (unsigned char *)pVBInfo->ROMAddr;
|
||||
|
||||
|
@ -1313,7 +1317,7 @@ void XGINew_VerifyMclk( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO
|
|||
{
|
||||
unsigned char *pVideoMemory = pVBInfo->FBAddr ;
|
||||
UCHAR i , j ;
|
||||
USHORT Temp , SR21 ;
|
||||
unsigned short Temp , SR21 ;
|
||||
|
||||
pVideoMemory[ 0 ] = 0xaa ; /* alan */
|
||||
pVideoMemory[ 16 ] = 0x55 ; /* note: PCI read cache is off */
|
||||
|
@ -1357,7 +1361,7 @@ void XGINew_VerifyMclk( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO
|
|||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_SetDRAMSize_340( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT data ;
|
||||
unsigned short data ;
|
||||
|
||||
pVBInfo->ROMAddr = HwDeviceExtension->pjVirtualRomBase ;
|
||||
pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress ;
|
||||
|
@ -1366,7 +1370,7 @@ void XGINew_SetDRAMSize_340( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_
|
|||
|
||||
|
||||
data = XGINew_GetReg1( pVBInfo->P3c4 , 0x21 ) ;
|
||||
XGINew_SetReg1( pVBInfo->P3c4 , 0x21 , ( USHORT )( data & 0xDF ) ) ; /* disable read cache */
|
||||
XGINew_SetReg1(pVBInfo->P3c4, 0x21, (unsigned short)(data & 0xDF)); /* disable read cache */
|
||||
XGI_DisplayOff( HwDeviceExtension, pVBInfo );
|
||||
|
||||
/*data = XGINew_GetReg1( pVBInfo->P3c4 , 0x1 ) ;*/
|
||||
|
@ -1374,8 +1378,7 @@ void XGINew_SetDRAMSize_340( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_
|
|||
/*XGINew_SetReg1( pVBInfo->P3c4 , 0x01 , data ) ;*/ /* Turn OFF Display */
|
||||
XGINew_DDRSizing340( HwDeviceExtension, pVBInfo ) ;
|
||||
data=XGINew_GetReg1( pVBInfo->P3c4 , 0x21 ) ;
|
||||
XGINew_SetReg1( pVBInfo->P3c4 , 0x21 , ( USHORT )( data | 0x20 ) ) ; /* enable read cache */
|
||||
|
||||
XGINew_SetReg1(pVBInfo->P3c4, 0x21, (unsigned short)(data | 0x20)); /* enable read cache */
|
||||
}
|
||||
|
||||
|
||||
|
@ -1387,7 +1390,7 @@ void XGINew_SetDRAMSize_340( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_
|
|||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_SetDRAMSize_310( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT data ;
|
||||
unsigned short data ;
|
||||
pVBInfo->ROMAddr = HwDeviceExtension->pjVirtualRomBase ,
|
||||
pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress ;
|
||||
#ifdef XGI301
|
||||
|
@ -1403,7 +1406,7 @@ void XGINew_SetDRAMSize_310( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_
|
|||
XGISetModeNew( HwDeviceExtension , 0x2e ) ;
|
||||
|
||||
data = XGINew_GetReg1( pVBInfo->P3c4 , 0x21 ) ;
|
||||
XGINew_SetReg1( pVBInfo->P3c4 , 0x21 , ( USHORT )( data & 0xDF ) ) ; /* disable read cache */
|
||||
XGINew_SetReg1(pVBInfo->P3c4, 0x21, (unsigned short)(data & 0xDF)); /* disable read cache */
|
||||
|
||||
data = XGINew_GetReg1( pVBInfo->P3c4 , 0x1 ) ;
|
||||
data |= 0x20 ;
|
||||
|
@ -1412,7 +1415,7 @@ void XGINew_SetDRAMSize_310( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_
|
|||
data = XGINew_GetReg1( pVBInfo->P3c4 , 0x16 ) ;
|
||||
|
||||
|
||||
XGINew_SetReg1( pVBInfo->P3c4 , 0x16 , ( USHORT )( data | 0x0F ) ) ; /* assume lowest speed DRAM */
|
||||
XGINew_SetReg1(pVBInfo->P3c4, 0x16, (unsigned short)(data | 0x0F)); /* assume lowest speed DRAM */
|
||||
|
||||
XGINew_SetDRAMModeRegister( pVBInfo ) ;
|
||||
XGINew_DisableRefresh( HwDeviceExtension, pVBInfo ) ;
|
||||
|
@ -1433,11 +1436,11 @@ void XGINew_SetDRAMSize_310( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_
|
|||
|
||||
|
||||
|
||||
XGINew_SetReg1( pVBInfo->P3c4 , 0x16 , pVBInfo->SR15[ 1 ][ XGINew_RAMType ] ) ; /* restore SR16 */
|
||||
XGINew_SetReg1(pVBInfo->P3c4, 0x16, pVBInfo->SR15[1][XGINew_RAMType]); /* restore SR16 */
|
||||
|
||||
XGINew_EnableRefresh( HwDeviceExtension, pVBInfo ) ;
|
||||
data=XGINew_GetReg1( pVBInfo->P3c4 ,0x21 ) ;
|
||||
XGINew_SetReg1( pVBInfo->P3c4 , 0x21 , ( USHORT )( data | 0x20 ) ) ; /* enable read cache */
|
||||
XGINew_SetReg1(pVBInfo->P3c4, 0x21, (unsigned short)(data | 0x20)); /* enable read cache */
|
||||
}
|
||||
|
||||
|
||||
|
@ -1456,7 +1459,7 @@ void XGINew_SetDRAMModeRegister340( PXGI_HW_DEVICE_INFO HwDeviceExtension )
|
|||
PVB_DEVICE_INFO pVBInfo = &VBINF;
|
||||
pVBInfo->ROMAddr = HwDeviceExtension->pjVirtualRomBase ;
|
||||
pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress ;
|
||||
pVBInfo->BaseAddr = (ULONG)HwDeviceExtension->pjIOAddress ;
|
||||
pVBInfo->BaseAddr = (unsigned long)HwDeviceExtension->pjIOAddress ;
|
||||
pVBInfo->ISXPDOS = 0 ;
|
||||
|
||||
pVBInfo->P3c4 = pVBInfo->BaseAddr + 0x14 ;
|
||||
|
@ -1525,7 +1528,7 @@ void XGINew_SetDRAMModeRegister( PVB_DEVICE_INFO pVBInfo)
|
|||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_DisableRefresh( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT data ;
|
||||
unsigned short data ;
|
||||
|
||||
|
||||
data = XGINew_GetReg1( pVBInfo->P3c4 , 0x1B ) ;
|
||||
|
@ -1556,9 +1559,11 @@ void XGINew_EnableRefresh( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_IN
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_DisableChannelInterleaving( int index , USHORT XGINew_DDRDRAM_TYPE[][ 5 ] , PVB_DEVICE_INFO pVBInfo)
|
||||
void XGINew_DisableChannelInterleaving(int index,
|
||||
unsigned short XGINew_DDRDRAM_TYPE[][5],
|
||||
PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT data ;
|
||||
unsigned short data ;
|
||||
|
||||
data = XGINew_GetReg1( pVBInfo->P3c4 , 0x15 ) ;
|
||||
data &= 0x1F ;
|
||||
|
@ -1590,9 +1595,11 @@ void XGINew_DisableChannelInterleaving( int index , USHORT XGINew_DDRDRAM_TYPE[]
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_SetDRAMSizingType( int index , USHORT DRAMTYPE_TABLE[][ 5 ] ,PVB_DEVICE_INFO pVBInfo)
|
||||
void XGINew_SetDRAMSizingType(int index,
|
||||
unsigned short DRAMTYPE_TABLE[][5],
|
||||
PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT data ;
|
||||
unsigned short data;
|
||||
|
||||
data = DRAMTYPE_TABLE[ index ][ 4 ] ;
|
||||
XGINew_SetRegANDOR( pVBInfo->P3c4 , 0x13 , 0x80 , data ) ;
|
||||
|
@ -1609,7 +1616,7 @@ void XGINew_SetDRAMSizingType( int index , USHORT DRAMTYPE_TABLE[][ 5 ] ,PVB_DEV
|
|||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_CheckBusWidth_310( PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT data ;
|
||||
unsigned short data ;
|
||||
volatile unsigned long *pVideoMemory ;
|
||||
|
||||
pVideoMemory = (unsigned long *) pVBInfo->FBAddr;
|
||||
|
@ -1638,7 +1645,7 @@ void XGINew_CheckBusWidth_310( PVB_DEVICE_INFO pVBInfo)
|
|||
XGINew_DataBusWidth = 64 ;
|
||||
XGINew_ChannelAB = 0 ;
|
||||
data=XGINew_GetReg1( pVBInfo->P3c4 , 0x14 ) ;
|
||||
XGINew_SetReg1( pVBInfo->P3c4 , 0x14 , ( USHORT )( data & 0xFD ) ) ;
|
||||
XGINew_SetReg1(pVBInfo->P3c4, 0x14, (unsigned short)(data & 0xFD));
|
||||
}
|
||||
|
||||
if ( ( pVideoMemory[ 1 ] != 0x456789ABL ) || ( pVideoMemory[ 0 ] != 0x01234567L ) )
|
||||
|
@ -1647,7 +1654,8 @@ void XGINew_CheckBusWidth_310( PVB_DEVICE_INFO pVBInfo)
|
|||
XGINew_DataBusWidth = 64 ;
|
||||
XGINew_ChannelAB = 1 ;
|
||||
data=XGINew_GetReg1( pVBInfo->P3c4 , 0x14 ) ;
|
||||
XGINew_SetReg1( pVBInfo->P3c4 , 0x14 , ( USHORT )( ( data & 0xFD ) | 0x01 ) ) ;
|
||||
XGINew_SetReg1(pVBInfo->P3c4, 0x14,
|
||||
(unsigned short)((data & 0xFD) | 0x01));
|
||||
}
|
||||
|
||||
return ;
|
||||
|
@ -1740,9 +1748,13 @@ void XGINew_CheckBusWidth_310( PVB_DEVICE_INFO pVBInfo)
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
int XGINew_SetRank( int index , UCHAR RankNo , UCHAR XGINew_ChannelAB , USHORT DRAMTYPE_TABLE[][ 5 ] , PVB_DEVICE_INFO pVBInfo)
|
||||
int XGINew_SetRank(int index,
|
||||
UCHAR RankNo,
|
||||
UCHAR XGINew_ChannelAB,
|
||||
unsigned short DRAMTYPE_TABLE[][5],
|
||||
PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT data ;
|
||||
unsigned short data;
|
||||
int RankSize ;
|
||||
|
||||
if ( ( RankNo == 2 ) && ( DRAMTYPE_TABLE[ index ][ 0 ] == 2 ) )
|
||||
|
@ -1777,9 +1789,13 @@ int XGINew_SetRank( int index , UCHAR RankNo , UCHAR XGINew_ChannelAB , USHORT D
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
int XGINew_SetDDRChannel( int index , UCHAR ChannelNo , UCHAR XGINew_ChannelAB , USHORT DRAMTYPE_TABLE[][ 5 ] , PVB_DEVICE_INFO pVBInfo)
|
||||
int XGINew_SetDDRChannel(int index,
|
||||
UCHAR ChannelNo,
|
||||
UCHAR XGINew_ChannelAB,
|
||||
unsigned short DRAMTYPE_TABLE[][5],
|
||||
PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT data ;
|
||||
unsigned short data;
|
||||
int RankSize ;
|
||||
|
||||
RankSize = DRAMTYPE_TABLE[index][3]/2 * XGINew_DataBusWidth/32;
|
||||
|
@ -1813,10 +1829,12 @@ int XGINew_SetDDRChannel( int index , UCHAR ChannelNo , UCHAR XGINew_ChannelAB ,
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
int XGINew_CheckColumn( int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB_DEVICE_INFO pVBInfo)
|
||||
int XGINew_CheckColumn(int index,
|
||||
unsigned short DRAMTYPE_TABLE[][5],
|
||||
PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
int i ;
|
||||
ULONG Increment , Position ;
|
||||
unsigned long Increment , Position ;
|
||||
|
||||
/* Increment = 1 << ( DRAMTYPE_TABLE[ index ][ 2 ] + XGINew_DataBusWidth / 64 + 1 ) ; */
|
||||
Increment = 1 << ( 10 + XGINew_DataBusWidth / 64 ) ;
|
||||
|
@ -1845,10 +1863,12 @@ int XGINew_CheckColumn( int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB_DEVICE_INF
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
int XGINew_CheckBanks( int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB_DEVICE_INFO pVBInfo)
|
||||
int XGINew_CheckBanks(int index,
|
||||
unsigned short DRAMTYPE_TABLE[][5],
|
||||
PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
int i ;
|
||||
ULONG Increment , Position ;
|
||||
unsigned long Increment , Position ;
|
||||
|
||||
Increment = 1 << ( DRAMTYPE_TABLE[ index ][ 2 ] + XGINew_DataBusWidth / 64 + 2 ) ;
|
||||
|
||||
|
@ -1876,10 +1896,12 @@ int XGINew_CheckBanks( int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB_DEVICE_INFO
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
int XGINew_CheckRank( int RankNo , int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB_DEVICE_INFO pVBInfo)
|
||||
int XGINew_CheckRank(int RankNo, int index,
|
||||
unsigned short DRAMTYPE_TABLE[][5],
|
||||
PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
int i ;
|
||||
ULONG Increment , Position ;
|
||||
unsigned long Increment , Position ;
|
||||
|
||||
Increment = 1 << ( DRAMTYPE_TABLE[ index ][ 2 ] + DRAMTYPE_TABLE[ index ][ 1 ] +
|
||||
DRAMTYPE_TABLE[ index ][ 0 ] + XGINew_DataBusWidth / 64 + RankNo ) ;
|
||||
|
@ -1910,10 +1932,12 @@ int XGINew_CheckRank( int RankNo , int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
int XGINew_CheckDDRRank( int RankNo , int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB_DEVICE_INFO pVBInfo)
|
||||
int XGINew_CheckDDRRank(int RankNo, int index,
|
||||
unsigned short DRAMTYPE_TABLE[][5],
|
||||
PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
ULONG Increment , Position ;
|
||||
USHORT data ;
|
||||
unsigned long Increment , Position ;
|
||||
unsigned short data ;
|
||||
|
||||
Increment = 1 << ( DRAMTYPE_TABLE[ index ][ 2 ] + DRAMTYPE_TABLE[ index ][ 1 ] +
|
||||
DRAMTYPE_TABLE[ index ][ 0 ] + XGINew_DataBusWidth / 64 + RankNo ) ;
|
||||
|
@ -1952,7 +1976,9 @@ int XGINew_CheckDDRRank( int RankNo , int index , USHORT DRAMTYPE_TABLE[][ 5 ],
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
int XGINew_CheckRanks( int RankNo , int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB_DEVICE_INFO pVBInfo)
|
||||
int XGINew_CheckRanks(int RankNo, int index,
|
||||
unsigned short DRAMTYPE_TABLE[][5],
|
||||
PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
int r ;
|
||||
|
||||
|
@ -1978,7 +2004,9 @@ int XGINew_CheckRanks( int RankNo , int index , USHORT DRAMTYPE_TABLE[][ 5 ], PV
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
int XGINew_CheckDDRRanks( int RankNo , int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB_DEVICE_INFO pVBInfo)
|
||||
int XGINew_CheckDDRRanks(int RankNo, int index,
|
||||
unsigned short DRAMTYPE_TABLE[][5],
|
||||
PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
int r ;
|
||||
|
||||
|
@ -2034,9 +2062,11 @@ int XGINew_SDRSizing(PVB_DEVICE_INFO pVBInfo)
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
USHORT XGINew_SetDRAMSizeReg( int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB_DEVICE_INFO pVBInfo)
|
||||
unsigned short XGINew_SetDRAMSizeReg(int index,
|
||||
unsigned short DRAMTYPE_TABLE[][5],
|
||||
PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT data = 0 , memsize = 0 ;
|
||||
unsigned short data = 0 , memsize = 0;
|
||||
int RankSize ;
|
||||
UCHAR ChannelNo ;
|
||||
|
||||
|
@ -2083,9 +2113,11 @@ USHORT XGINew_SetDRAMSizeReg( int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB_DEVI
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
USHORT XGINew_SetDRAMSize20Reg( int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB_DEVICE_INFO pVBInfo)
|
||||
unsigned short XGINew_SetDRAMSize20Reg(int index,
|
||||
unsigned short DRAMTYPE_TABLE[][5],
|
||||
PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT data = 0 , memsize = 0 ;
|
||||
unsigned short data = 0 , memsize = 0;
|
||||
int RankSize ;
|
||||
UCHAR ChannelNo ;
|
||||
|
||||
|
@ -2133,10 +2165,11 @@ USHORT XGINew_SetDRAMSize20Reg( int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB_DE
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
int XGINew_ReadWriteRest( USHORT StopAddr , USHORT StartAddr, PVB_DEVICE_INFO pVBInfo)
|
||||
int XGINew_ReadWriteRest(unsigned short StopAddr, unsigned short StartAddr,
|
||||
PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
int i ;
|
||||
ULONG Position = 0 ;
|
||||
unsigned long Position = 0 ;
|
||||
|
||||
*((unsigned long *)(pVBInfo->FBAddr + Position)) = Position;
|
||||
|
||||
|
@ -2476,7 +2509,7 @@ void XGINew_CheckChannel( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO
|
|||
int XGINew_DDRSizing340( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
int i ;
|
||||
USHORT memsize , addr ;
|
||||
unsigned short memsize , addr ;
|
||||
|
||||
XGINew_SetReg1( pVBInfo->P3c4 , 0x15 , 0x00 ) ; /* noninterleaving */
|
||||
XGINew_SetReg1( pVBInfo->P3c4 , 0x1C , 0x00 ) ; /* nontiling */
|
||||
|
@ -2493,7 +2526,7 @@ int XGINew_DDRSizing340( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO
|
|||
continue ;
|
||||
|
||||
addr = memsize + ( XGINew_ChannelAB - 2 ) + 20 ;
|
||||
if ( ( HwDeviceExtension->ulVideoMemorySize - 1 ) < ( ULONG )( 1 << addr ) )
|
||||
if ((HwDeviceExtension->ulVideoMemorySize - 1) < (unsigned long)(1 << addr))
|
||||
continue ;
|
||||
|
||||
if ( XGINew_ReadWriteRest( addr , 5, pVBInfo ) == 1 )
|
||||
|
@ -2511,7 +2544,7 @@ int XGINew_DDRSizing340( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO
|
|||
continue ;
|
||||
|
||||
addr = memsize + ( XGINew_ChannelAB - 2 ) + 20 ;
|
||||
if ( ( HwDeviceExtension->ulVideoMemorySize - 1 ) < ( ULONG )( 1 << addr ) )
|
||||
if ((HwDeviceExtension->ulVideoMemorySize - 1) < (unsigned long)(1 << addr))
|
||||
continue ;
|
||||
|
||||
if ( XGINew_ReadWriteRest( addr , 9, pVBInfo ) == 1 )
|
||||
|
@ -2592,7 +2625,7 @@ void XGINew_SetMemoryClock( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_IN
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
BOOLEAN ChkLFB( PVB_DEVICE_INFO pVBInfo )
|
||||
unsigned char ChkLFB( PVB_DEVICE_INFO pVBInfo )
|
||||
{
|
||||
if (LFBDRAMTrap & XGINew_GetReg1(pVBInfo->P3d4 , 0x78))
|
||||
return 1;
|
||||
|
@ -2609,9 +2642,10 @@ BOOLEAN ChkLFB( PVB_DEVICE_INFO pVBInfo )
|
|||
/* in second chip, assume CR A1 D[6]="1" in this case */
|
||||
/* output : none */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void SetPowerConsume ( PXGI_HW_DEVICE_INFO HwDeviceExtension , ULONG XGI_P3d4Port )
|
||||
void SetPowerConsume(PXGI_HW_DEVICE_INFO HwDeviceExtension,
|
||||
unsigned long XGI_P3d4Port)
|
||||
{
|
||||
ULONG lTemp ;
|
||||
unsigned long lTemp ;
|
||||
UCHAR bTemp;
|
||||
|
||||
HwDeviceExtension->pQueryVGAConfigSpace( HwDeviceExtension , 0x08 , 0 , &lTemp ) ; /* Get */
|
||||
|
@ -2640,10 +2674,10 @@ void SetPowerConsume ( PXGI_HW_DEVICE_INFO HwDeviceExtension , ULONG XGI_P3d4Por
|
|||
void XGINew_InitVBIOSData(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
|
||||
/* ULONG ROMAddr = (ULONG)HwDeviceExtension->pjVirtualRomBase; */
|
||||
/* unsigned long ROMAddr = (unsigned long)HwDeviceExtension->pjVirtualRomBase; */
|
||||
pVBInfo->ROMAddr = HwDeviceExtension->pjVirtualRomBase ;
|
||||
pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress ;
|
||||
pVBInfo->BaseAddr = (ULONG)HwDeviceExtension->pjIOAddress ;
|
||||
pVBInfo->BaseAddr = (unsigned long)HwDeviceExtension->pjIOAddress ;
|
||||
pVBInfo->ISXPDOS = 0 ;
|
||||
|
||||
pVBInfo->P3c4 = pVBInfo->BaseAddr + 0x14 ;
|
||||
|
@ -2689,7 +2723,7 @@ void XGINew_InitVBIOSData(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO
|
|||
void ReadVBIOSTablData( UCHAR ChipType , PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
volatile unsigned char *pVideoMemory = (unsigned char *)pVBInfo->ROMAddr;
|
||||
ULONG i ;
|
||||
unsigned long i ;
|
||||
UCHAR j , k ;
|
||||
/* Volari customize data area end */
|
||||
|
||||
|
@ -2756,7 +2790,7 @@ void ReadVBIOSTablData( UCHAR ChipType , PVB_DEVICE_INFO pVBInfo)
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_DDR1x_MRS_XG20( ULONG P3c4 , PVB_DEVICE_INFO pVBInfo)
|
||||
void XGINew_DDR1x_MRS_XG20(unsigned long P3c4, PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
|
||||
XGINew_SetReg1( P3c4 , 0x18 , 0x01 ) ;
|
||||
|
@ -2798,7 +2832,7 @@ void XGINew_SetDRAMModeRegister_XG20( PXGI_HW_DEVICE_INFO HwDeviceExtension )
|
|||
PVB_DEVICE_INFO pVBInfo = &VBINF;
|
||||
pVBInfo->ROMAddr = HwDeviceExtension->pjVirtualRomBase ;
|
||||
pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress ;
|
||||
pVBInfo->BaseAddr = (ULONG)HwDeviceExtension->pjIOAddress ;
|
||||
pVBInfo->BaseAddr = (unsigned long)HwDeviceExtension->pjIOAddress ;
|
||||
pVBInfo->ISXPDOS = 0 ;
|
||||
|
||||
pVBInfo->P3c4 = pVBInfo->BaseAddr + 0x14 ;
|
||||
|
@ -2837,7 +2871,7 @@ void XGINew_SetDRAMModeRegister_XG27( PXGI_HW_DEVICE_INFO HwDeviceExtension )
|
|||
PVB_DEVICE_INFO pVBInfo = &VBINF;
|
||||
pVBInfo->ROMAddr = HwDeviceExtension->pjVirtualRomBase ;
|
||||
pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress ;
|
||||
pVBInfo->BaseAddr = (ULONG)HwDeviceExtension->pjIOAddress ;
|
||||
pVBInfo->BaseAddr = (unsigned long)HwDeviceExtension->pjIOAddress ;
|
||||
pVBInfo->ISXPDOS = 0 ;
|
||||
|
||||
pVBInfo->P3c4 = pVBInfo->BaseAddr + 0x14 ;
|
||||
|
@ -2922,7 +2956,7 @@ void XGINew_SetDRAMModeRegister_XG27( PXGI_HW_DEVICE_INFO HwDeviceExtension )
|
|||
/* -------------------------------------------------------- */
|
||||
void XGINew_ChkSenseStatus ( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT tempbx=0 , temp , tempcx , CR3CData;
|
||||
unsigned short tempbx = 0, temp, tempcx, CR3CData;
|
||||
|
||||
temp = XGINew_GetReg1( pVBInfo->P3d4 , 0x32 ) ;
|
||||
|
||||
|
@ -2983,7 +3017,7 @@ void XGINew_ChkSenseStatus ( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_
|
|||
/* -------------------------------------------------------- */
|
||||
void XGINew_SetModeScratch ( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo )
|
||||
{
|
||||
USHORT temp , tempcl = 0 , tempch = 0 , CR31Data , CR38Data;
|
||||
unsigned short temp , tempcl = 0 , tempch = 0 , CR31Data , CR38Data;
|
||||
|
||||
temp = XGINew_GetReg1( pVBInfo->P3d4 , 0x3d ) ;
|
||||
temp |= XGINew_GetReg1( pVBInfo->P3d4 , 0x3e ) << 8 ;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef _VBINIT_
|
||||
#define _VBINIT_
|
||||
extern BOOLEAN XGIInitNew( PXGI_HW_DEVICE_INFO HwDeviceExtension ) ;
|
||||
extern unsigned char XGIInitNew( PXGI_HW_DEVICE_INFO HwDeviceExtension ) ;
|
||||
extern XGI21_LVDSCapStruct XGI21_LCDCapList[13];
|
||||
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -5,7 +5,7 @@ extern void InitTo330Pointer(UCHAR,PVB_DEVICE_INFO);
|
|||
extern void XGI_UnLockCRT2(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO );
|
||||
extern void XGI_LockCRT2(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO );
|
||||
extern void XGI_LongWait( PVB_DEVICE_INFO );
|
||||
extern void XGI_SetCRT2ModeRegs(USHORT ModeNo,PXGI_HW_DEVICE_INFO, PVB_DEVICE_INFO );
|
||||
extern void XGI_SetCRT2ModeRegs(unsigned short ModeNo,PXGI_HW_DEVICE_INFO, PVB_DEVICE_INFO );
|
||||
extern void XGI_DisableBridge(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO );
|
||||
extern void XGI_EnableBridge(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO );
|
||||
extern void XGI_DisplayOff( PXGI_HW_DEVICE_INFO, PVB_DEVICE_INFO );
|
||||
|
@ -13,28 +13,28 @@ extern void XGI_DisplayOn( PXGI_HW_DEVICE_INFO, PVB_DEVICE_INFO );
|
|||
extern void XGI_GetVBType(PVB_DEVICE_INFO);
|
||||
extern void XGI_SenseCRT1(PVB_DEVICE_INFO );
|
||||
extern void XGI_GetVGAType(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO );
|
||||
extern void XGI_GetVBInfo(USHORT ModeNo,USHORT ModeIdIndex,PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO );
|
||||
extern void XGI_GetTVInfo(USHORT ModeNo,USHORT ModeIdIndex, PVB_DEVICE_INFO );
|
||||
extern void XGI_SetCRT1Offset(USHORT ModeNo,USHORT ModeIdIndex,USHORT RefreshRateTableIndex,PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO );
|
||||
extern void XGI_SetLCDAGroup(USHORT ModeNo,USHORT ModeIdIndex,PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO );
|
||||
extern void XGI_GetVBInfo(unsigned short ModeNo,unsigned short ModeIdIndex,PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO );
|
||||
extern void XGI_GetTVInfo(unsigned short ModeNo,unsigned short ModeIdIndex, PVB_DEVICE_INFO );
|
||||
extern void XGI_SetCRT1Offset(unsigned short ModeNo,unsigned short ModeIdIndex,unsigned short RefreshRateTableIndex,PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO );
|
||||
extern void XGI_SetLCDAGroup(unsigned short ModeNo,unsigned short ModeIdIndex,PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO );
|
||||
extern void XGI_WaitDisply( PVB_DEVICE_INFO );
|
||||
extern USHORT XGI_GetResInfo(USHORT ModeNo,USHORT ModeIdIndex, PVB_DEVICE_INFO pVBInfo);
|
||||
extern unsigned short XGI_GetResInfo(unsigned short ModeNo,unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo);
|
||||
|
||||
extern BOOLEAN XGISetModeNew( PXGI_HW_DEVICE_INFO HwDeviceExtension , USHORT ModeNo ) ;
|
||||
extern unsigned char XGISetModeNew( PXGI_HW_DEVICE_INFO HwDeviceExtension , unsigned short ModeNo ) ;
|
||||
|
||||
extern BOOLEAN XGI_SearchModeID( USHORT ModeNo,USHORT *ModeIdIndex, PVB_DEVICE_INFO );
|
||||
extern BOOLEAN XGI_GetLCDInfo(USHORT ModeNo,USHORT ModeIdIndex,PVB_DEVICE_INFO );
|
||||
extern BOOLEAN XGI_BridgeIsOn( PVB_DEVICE_INFO );
|
||||
extern BOOLEAN XGI_SetCRT2Group301(USHORT ModeNo, PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO);
|
||||
extern USHORT XGI_GetRatePtrCRT2( PXGI_HW_DEVICE_INFO pXGIHWDE, USHORT ModeNo,USHORT ModeIdIndex, PVB_DEVICE_INFO );
|
||||
extern unsigned char XGI_SearchModeID( unsigned short ModeNo,unsigned short *ModeIdIndex, PVB_DEVICE_INFO );
|
||||
extern unsigned char XGI_GetLCDInfo(unsigned short ModeNo,unsigned short ModeIdIndex,PVB_DEVICE_INFO );
|
||||
extern unsigned char XGI_BridgeIsOn( PVB_DEVICE_INFO );
|
||||
extern unsigned char XGI_SetCRT2Group301(unsigned short ModeNo, PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO);
|
||||
extern unsigned short XGI_GetRatePtrCRT2( PXGI_HW_DEVICE_INFO pXGIHWDE, unsigned short ModeNo,unsigned short ModeIdIndex, PVB_DEVICE_INFO );
|
||||
|
||||
extern void XGI_SetXG21FPBits(PVB_DEVICE_INFO pVBInfo);
|
||||
extern void XGI_SetXG27FPBits(PVB_DEVICE_INFO pVBInfo);
|
||||
extern void XGI_XG21BLSignalVDD(USHORT tempbh,USHORT tempbl, PVB_DEVICE_INFO pVBInfo);
|
||||
extern void XGI_XG27BLSignalVDD(USHORT tempbh,USHORT tempbl, PVB_DEVICE_INFO pVBInfo);
|
||||
extern void XGI_XG21SetPanelDelay(USHORT tempbl, PVB_DEVICE_INFO pVBInfo);
|
||||
extern BOOLEAN XGI_XG21CheckLVDSMode(USHORT ModeNo,USHORT ModeIdIndex, PVB_DEVICE_INFO pVBInfo );
|
||||
extern void XGI_SetXG21LVDSPara(USHORT ModeNo,USHORT ModeIdIndex, PVB_DEVICE_INFO pVBInfo );
|
||||
extern USHORT XGI_GetLVDSOEMTableIndex(PVB_DEVICE_INFO pVBInfo);
|
||||
extern void XGI_XG21BLSignalVDD(unsigned short tempbh,unsigned short tempbl, PVB_DEVICE_INFO pVBInfo);
|
||||
extern void XGI_XG27BLSignalVDD(unsigned short tempbh,unsigned short tempbl, PVB_DEVICE_INFO pVBInfo);
|
||||
extern void XGI_XG21SetPanelDelay(unsigned short tempbl, PVB_DEVICE_INFO pVBInfo);
|
||||
extern unsigned char XGI_XG21CheckLVDSMode(unsigned short ModeNo,unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo );
|
||||
extern void XGI_SetXG21LVDSPara(unsigned short ModeNo,unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo );
|
||||
extern unsigned short XGI_GetLVDSOEMTableIndex(PVB_DEVICE_INFO pVBInfo);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -17,12 +17,12 @@ typedef struct _XGI_PanelDelayTblStruct
|
|||
|
||||
typedef struct _XGI_LCDDataStruct
|
||||
{
|
||||
USHORT RVBHCMAX;
|
||||
USHORT RVBHCFACT;
|
||||
USHORT VGAHT;
|
||||
USHORT VGAVT;
|
||||
USHORT LCDHT;
|
||||
USHORT LCDVT;
|
||||
unsigned short RVBHCMAX;
|
||||
unsigned short RVBHCFACT;
|
||||
unsigned short VGAHT;
|
||||
unsigned short VGAVT;
|
||||
unsigned short LCDHT;
|
||||
unsigned short LCDVT;
|
||||
} XGI_LCDDataStruct;
|
||||
|
||||
|
||||
|
@ -38,15 +38,15 @@ typedef struct _XGI_LVDSCRT1VDataStruct
|
|||
|
||||
typedef struct _XGI_TVDataStruct
|
||||
{
|
||||
USHORT RVBHCMAX;
|
||||
USHORT RVBHCFACT;
|
||||
USHORT VGAHT;
|
||||
USHORT VGAVT;
|
||||
USHORT TVHDE;
|
||||
USHORT TVVDE;
|
||||
USHORT RVBHRS;
|
||||
unsigned short RVBHCMAX;
|
||||
unsigned short RVBHCFACT;
|
||||
unsigned short VGAHT;
|
||||
unsigned short VGAVT;
|
||||
unsigned short TVHDE;
|
||||
unsigned short TVVDE;
|
||||
unsigned short RVBHRS;
|
||||
UCHAR FlickerMode;
|
||||
USHORT HALFRVBHRS;
|
||||
unsigned short HALFRVBHRS;
|
||||
UCHAR RY1COE;
|
||||
UCHAR RY2COE;
|
||||
UCHAR RY3COE;
|
||||
|
@ -55,16 +55,16 @@ typedef struct _XGI_TVDataStruct
|
|||
|
||||
typedef struct _XGI_LVDSDataStruct
|
||||
{
|
||||
USHORT VGAHT;
|
||||
USHORT VGAVT;
|
||||
USHORT LCDHT;
|
||||
USHORT LCDVT;
|
||||
unsigned short VGAHT;
|
||||
unsigned short VGAVT;
|
||||
unsigned short LCDHT;
|
||||
unsigned short LCDVT;
|
||||
} XGI_LVDSDataStruct;
|
||||
|
||||
typedef struct _XGI_LVDSDesStruct
|
||||
{
|
||||
USHORT LCDHDES;
|
||||
USHORT LCDVDES;
|
||||
unsigned short LCDHDES;
|
||||
unsigned short LCDVDES;
|
||||
} XGI_LVDSDesStruct;
|
||||
|
||||
typedef struct _XGI_LVDSCRT1DataStruct
|
||||
|
@ -78,7 +78,7 @@ typedef struct _XGI_LVDSCRT1DataStruct
|
|||
typedef struct _XGI_StStruct
|
||||
{
|
||||
UCHAR St_ModeID;
|
||||
USHORT St_ModeFlag;
|
||||
unsigned short St_ModeFlag;
|
||||
UCHAR St_StTableIndex;
|
||||
UCHAR St_CRT2CRTC;
|
||||
UCHAR St_CRT2CRTC2;
|
||||
|
@ -93,7 +93,7 @@ typedef struct _XGI_StandTableStruct
|
|||
UCHAR CRT_COLS;
|
||||
UCHAR ROWS;
|
||||
UCHAR CHAR_HEIGHT;
|
||||
USHORT CRT_LEN;
|
||||
unsigned short CRT_LEN;
|
||||
UCHAR SR[4];
|
||||
UCHAR MISC;
|
||||
UCHAR CRTC[0x19];
|
||||
|
@ -104,10 +104,10 @@ typedef struct _XGI_StandTableStruct
|
|||
typedef struct _XGI_ExtStruct
|
||||
{
|
||||
UCHAR Ext_ModeID;
|
||||
USHORT Ext_ModeFlag;
|
||||
USHORT Ext_ModeInfo;
|
||||
USHORT Ext_Point;
|
||||
USHORT Ext_VESAID;
|
||||
unsigned short Ext_ModeFlag;
|
||||
unsigned short Ext_ModeInfo;
|
||||
unsigned short Ext_Point;
|
||||
unsigned short Ext_VESAID;
|
||||
UCHAR Ext_VESAMEMSize;
|
||||
UCHAR Ext_RESINFO;
|
||||
UCHAR VB_ExtTVFlickerIndex;
|
||||
|
@ -118,52 +118,52 @@ typedef struct _XGI_ExtStruct
|
|||
|
||||
typedef struct _XGI_Ext2Struct
|
||||
{
|
||||
USHORT Ext_InfoFlag;
|
||||
unsigned short Ext_InfoFlag;
|
||||
UCHAR Ext_CRT1CRTC;
|
||||
UCHAR Ext_CRTVCLK;
|
||||
UCHAR Ext_CRT2CRTC;
|
||||
UCHAR Ext_CRT2CRTC2;
|
||||
UCHAR ModeID;
|
||||
USHORT XRes;
|
||||
USHORT YRes;
|
||||
/* USHORT ROM_OFFSET; */
|
||||
unsigned short XRes;
|
||||
unsigned short YRes;
|
||||
/* unsigned short ROM_OFFSET; */
|
||||
} XGI_Ext2Struct;
|
||||
|
||||
|
||||
typedef struct _XGI_MCLKDataStruct
|
||||
{
|
||||
UCHAR SR28,SR29,SR2A;
|
||||
USHORT CLOCK;
|
||||
unsigned short CLOCK;
|
||||
} XGI_MCLKDataStruct;
|
||||
|
||||
typedef struct _XGI_ECLKDataStruct
|
||||
{
|
||||
UCHAR SR2E,SR2F,SR30;
|
||||
USHORT CLOCK;
|
||||
unsigned short CLOCK;
|
||||
} XGI_ECLKDataStruct;
|
||||
|
||||
typedef struct _XGI_VCLKDataStruct
|
||||
{
|
||||
UCHAR SR2B,SR2C;
|
||||
USHORT CLOCK;
|
||||
unsigned short CLOCK;
|
||||
} XGI_VCLKDataStruct;
|
||||
|
||||
typedef struct _XGI_VBVCLKDataStruct
|
||||
{
|
||||
UCHAR Part4_A,Part4_B;
|
||||
USHORT CLOCK;
|
||||
unsigned short CLOCK;
|
||||
} XGI_VBVCLKDataStruct;
|
||||
|
||||
typedef struct _XGI_StResInfoStruct
|
||||
{
|
||||
USHORT HTotal;
|
||||
USHORT VTotal;
|
||||
unsigned short HTotal;
|
||||
unsigned short VTotal;
|
||||
} XGI_StResInfoStruct;
|
||||
|
||||
typedef struct _XGI_ModeResInfoStruct
|
||||
{
|
||||
USHORT HTotal;
|
||||
USHORT VTotal;
|
||||
unsigned short HTotal;
|
||||
unsigned short VTotal;
|
||||
UCHAR XChar;
|
||||
UCHAR YChar;
|
||||
} XGI_ModeResInfoStruct;
|
||||
|
@ -175,100 +175,100 @@ typedef struct _XGI_LCDNBDesStruct
|
|||
/*add for new UNIVGABIOS*/
|
||||
typedef struct _XGI_LCDDesStruct
|
||||
{
|
||||
USHORT LCDHDES;
|
||||
USHORT LCDHRS;
|
||||
USHORT LCDVDES;
|
||||
USHORT LCDVRS;
|
||||
unsigned short LCDHDES;
|
||||
unsigned short LCDHRS;
|
||||
unsigned short LCDVDES;
|
||||
unsigned short LCDVRS;
|
||||
} XGI_LCDDesStruct;
|
||||
|
||||
typedef struct _XGI_LCDDataTablStruct
|
||||
{
|
||||
UCHAR PANELID;
|
||||
USHORT MASK;
|
||||
USHORT CAP;
|
||||
USHORT DATAPTR;
|
||||
unsigned short MASK;
|
||||
unsigned short CAP;
|
||||
unsigned short DATAPTR;
|
||||
} XGI_LCDDataTablStruct;
|
||||
|
||||
typedef struct _XGI_TVTablDataStruct
|
||||
{
|
||||
USHORT MASK;
|
||||
USHORT CAP;
|
||||
USHORT DATAPTR;
|
||||
unsigned short MASK;
|
||||
unsigned short CAP;
|
||||
unsigned short DATAPTR;
|
||||
} XGI_TVDataTablStruct;
|
||||
|
||||
typedef struct _XGI330_LCDDesDataStruct
|
||||
{
|
||||
USHORT LCDHDES;
|
||||
USHORT LCDHRS;
|
||||
USHORT LCDVDES;
|
||||
USHORT LCDVRS;
|
||||
unsigned short LCDHDES;
|
||||
unsigned short LCDHRS;
|
||||
unsigned short LCDVDES;
|
||||
unsigned short LCDVRS;
|
||||
} XGI330_LCDDataDesStruct;
|
||||
|
||||
|
||||
typedef struct _XGI330_LVDSDataStruct
|
||||
{
|
||||
USHORT VGAHT;
|
||||
USHORT VGAVT;
|
||||
USHORT LCDHT;
|
||||
USHORT LCDVT;
|
||||
unsigned short VGAHT;
|
||||
unsigned short VGAVT;
|
||||
unsigned short LCDHT;
|
||||
unsigned short LCDVT;
|
||||
} XGI330_LVDSDataStruct;
|
||||
|
||||
typedef struct _XGI330_LCDDesDataStruct2
|
||||
{
|
||||
USHORT LCDHDES;
|
||||
USHORT LCDHRS;
|
||||
USHORT LCDVDES;
|
||||
USHORT LCDVRS;
|
||||
USHORT LCDHSync;
|
||||
USHORT LCDVSync;
|
||||
unsigned short LCDHDES;
|
||||
unsigned short LCDHRS;
|
||||
unsigned short LCDVDES;
|
||||
unsigned short LCDVRS;
|
||||
unsigned short LCDHSync;
|
||||
unsigned short LCDVSync;
|
||||
} XGI330_LCDDataDesStruct2;
|
||||
|
||||
typedef struct _XGI330_LCDDataStruct
|
||||
{
|
||||
USHORT RVBHCMAX;
|
||||
USHORT RVBHCFACT;
|
||||
USHORT VGAHT;
|
||||
USHORT VGAVT;
|
||||
USHORT LCDHT;
|
||||
USHORT LCDVT;
|
||||
unsigned short RVBHCMAX;
|
||||
unsigned short RVBHCFACT;
|
||||
unsigned short VGAHT;
|
||||
unsigned short VGAVT;
|
||||
unsigned short LCDHT;
|
||||
unsigned short LCDVT;
|
||||
} XGI330_LCDDataStruct;
|
||||
|
||||
|
||||
typedef struct _XGI330_TVDataStruct
|
||||
{
|
||||
USHORT RVBHCMAX;
|
||||
USHORT RVBHCFACT;
|
||||
USHORT VGAHT;
|
||||
USHORT VGAVT;
|
||||
USHORT TVHDE;
|
||||
USHORT TVVDE;
|
||||
USHORT RVBHRS;
|
||||
unsigned short RVBHCMAX;
|
||||
unsigned short RVBHCFACT;
|
||||
unsigned short VGAHT;
|
||||
unsigned short VGAVT;
|
||||
unsigned short TVHDE;
|
||||
unsigned short TVVDE;
|
||||
unsigned short RVBHRS;
|
||||
UCHAR FlickerMode;
|
||||
USHORT HALFRVBHRS;
|
||||
unsigned short HALFRVBHRS;
|
||||
} XGI330_TVDataStruct;
|
||||
|
||||
typedef struct _XGI330_LCDDataTablStruct
|
||||
{
|
||||
UCHAR PANELID;
|
||||
USHORT MASK;
|
||||
USHORT CAP;
|
||||
USHORT DATAPTR;
|
||||
unsigned short MASK;
|
||||
unsigned short CAP;
|
||||
unsigned short DATAPTR;
|
||||
} XGI330_LCDDataTablStruct;
|
||||
|
||||
typedef struct _XGI330_TVDataTablStruct
|
||||
{
|
||||
USHORT MASK;
|
||||
USHORT CAP;
|
||||
USHORT DATAPTR;
|
||||
unsigned short MASK;
|
||||
unsigned short CAP;
|
||||
unsigned short DATAPTR;
|
||||
} XGI330_TVDataTablStruct;
|
||||
|
||||
|
||||
typedef struct _XGI330_CHTVDataStruct
|
||||
{
|
||||
USHORT VGAHT;
|
||||
USHORT VGAVT;
|
||||
USHORT LCDHT;
|
||||
USHORT LCDVT;
|
||||
unsigned short VGAHT;
|
||||
unsigned short VGAVT;
|
||||
unsigned short LCDHT;
|
||||
unsigned short LCDVT;
|
||||
} XGI330_CHTVDataStruct;
|
||||
|
||||
typedef struct _XGI_TimingHStruct
|
||||
|
@ -304,7 +304,7 @@ typedef struct _XGI330_CHTVRegDataStruct
|
|||
typedef struct _XGI330_LCDCapStruct
|
||||
{
|
||||
UCHAR LCD_ID;
|
||||
USHORT LCD_Capability;
|
||||
unsigned short LCD_Capability;
|
||||
UCHAR LCD_SetFlag;
|
||||
UCHAR LCD_DelayCompensation;
|
||||
UCHAR LCD_HSyncWidth;
|
||||
|
@ -332,15 +332,15 @@ typedef struct _XGI330_LCDCapStruct
|
|||
|
||||
typedef struct _XGI21_LVDSCapStruct
|
||||
{
|
||||
USHORT LVDS_Capability;
|
||||
USHORT LVDSHT;
|
||||
USHORT LVDSVT;
|
||||
USHORT LVDSHDE;
|
||||
USHORT LVDSVDE;
|
||||
USHORT LVDSHFP;
|
||||
USHORT LVDSVFP;
|
||||
USHORT LVDSHSYNC;
|
||||
USHORT LVDSVSYNC;
|
||||
unsigned short LVDS_Capability;
|
||||
unsigned short LVDSHT;
|
||||
unsigned short LVDSVT;
|
||||
unsigned short LVDSHDE;
|
||||
unsigned short LVDSVDE;
|
||||
unsigned short LVDSHFP;
|
||||
unsigned short LVDSVFP;
|
||||
unsigned short LVDSHSYNC;
|
||||
unsigned short LVDSVSYNC;
|
||||
UCHAR VCLKData1;
|
||||
UCHAR VCLKData2;
|
||||
UCHAR PSC_S1;
|
||||
|
@ -359,12 +359,12 @@ typedef struct _XGI_CRT1TableStruct
|
|||
typedef struct _XGI330_VCLKDataStruct
|
||||
{
|
||||
UCHAR SR2B,SR2C;
|
||||
USHORT CLOCK;
|
||||
unsigned short CLOCK;
|
||||
} XGI330_VCLKDataStruct;
|
||||
|
||||
typedef struct _XGI301C_Tap4TimingStruct
|
||||
{
|
||||
USHORT DE;
|
||||
unsigned short DE;
|
||||
UCHAR Reg[64]; /* C0-FF */
|
||||
} XGI301C_Tap4TimingStruct;
|
||||
|
||||
|
@ -373,7 +373,7 @@ typedef struct _XGI_New_StandTableStruct
|
|||
UCHAR CRT_COLS;
|
||||
UCHAR ROWS;
|
||||
UCHAR CHAR_HEIGHT;
|
||||
USHORT CRT_LEN;
|
||||
unsigned short CRT_LEN;
|
||||
UCHAR SR[4];
|
||||
UCHAR MISC;
|
||||
UCHAR CRTC[0x19];
|
||||
|
@ -391,34 +391,34 @@ typedef VB_DEVICE_INFO * PVB_DEVICE_INFO;
|
|||
|
||||
struct _VB_DEVICE_INFO
|
||||
{
|
||||
BOOLEAN ISXPDOS;
|
||||
ULONG P3c4,P3d4,P3c0,P3ce,P3c2,P3cc;
|
||||
ULONG P3ca,P3c6,P3c7,P3c8,P3c9,P3da;
|
||||
ULONG Part0Port,Part1Port,Part2Port;
|
||||
ULONG Part3Port,Part4Port,Part5Port;
|
||||
USHORT RVBHCFACT,RVBHCMAX,RVBHRS;
|
||||
USHORT VGAVT,VGAHT,VGAVDE,VGAHDE;
|
||||
USHORT VT,HT,VDE,HDE;
|
||||
USHORT LCDHRS,LCDVRS,LCDHDES,LCDVDES;
|
||||
unsigned char ISXPDOS;
|
||||
unsigned long P3c4,P3d4,P3c0,P3ce,P3c2,P3cc;
|
||||
unsigned long P3ca,P3c6,P3c7,P3c8,P3c9,P3da;
|
||||
unsigned long Part0Port,Part1Port,Part2Port;
|
||||
unsigned long Part3Port,Part4Port,Part5Port;
|
||||
unsigned short RVBHCFACT,RVBHCMAX,RVBHRS;
|
||||
unsigned short VGAVT,VGAHT,VGAVDE,VGAHDE;
|
||||
unsigned short VT,HT,VDE,HDE;
|
||||
unsigned short LCDHRS,LCDVRS,LCDHDES,LCDVDES;
|
||||
|
||||
USHORT ModeType;
|
||||
USHORT IF_DEF_LVDS,IF_DEF_TRUMPION,IF_DEF_DSTN;/* ,IF_DEF_FSTN; add for dstn */
|
||||
USHORT IF_DEF_CRT2Monitor,IF_DEF_VideoCapture;
|
||||
USHORT IF_DEF_LCDA,IF_DEF_CH7017,IF_DEF_YPbPr,IF_DEF_ScaleLCD,IF_DEF_OEMUtil,IF_DEF_PWD;
|
||||
USHORT IF_DEF_ExpLink;
|
||||
USHORT IF_DEF_CH7005,IF_DEF_HiVision;
|
||||
USHORT IF_DEF_CH7007; /* Billy 2007/05/03 */
|
||||
USHORT LCDResInfo,LCDTypeInfo, VBType;/*301b*/
|
||||
USHORT VBInfo,TVInfo,LCDInfo, Set_VGAType;
|
||||
USHORT VBExtInfo;/*301lv*/
|
||||
USHORT SetFlag;
|
||||
USHORT NewFlickerMode;
|
||||
USHORT SelectCRT2Rate;
|
||||
unsigned short ModeType;
|
||||
unsigned short IF_DEF_LVDS,IF_DEF_TRUMPION,IF_DEF_DSTN;/* ,IF_DEF_FSTN; add for dstn */
|
||||
unsigned short IF_DEF_CRT2Monitor,IF_DEF_VideoCapture;
|
||||
unsigned short IF_DEF_LCDA,IF_DEF_CH7017,IF_DEF_YPbPr,IF_DEF_ScaleLCD,IF_DEF_OEMUtil,IF_DEF_PWD;
|
||||
unsigned short IF_DEF_ExpLink;
|
||||
unsigned short IF_DEF_CH7005,IF_DEF_HiVision;
|
||||
unsigned short IF_DEF_CH7007; /* Billy 2007/05/03 */
|
||||
unsigned short LCDResInfo,LCDTypeInfo, VBType;/*301b*/
|
||||
unsigned short VBInfo,TVInfo,LCDInfo, Set_VGAType;
|
||||
unsigned short VBExtInfo;/*301lv*/
|
||||
unsigned short SetFlag;
|
||||
unsigned short NewFlickerMode;
|
||||
unsigned short SelectCRT2Rate;
|
||||
|
||||
unsigned char *ROMAddr;
|
||||
unsigned char *FBAddr;
|
||||
ULONG BaseAddr;
|
||||
ULONG RelIO;
|
||||
unsigned long BaseAddr;
|
||||
unsigned long RelIO;
|
||||
|
||||
DRAM4Type *CR6B;
|
||||
DRAM4Type *CR6E;
|
||||
|
@ -430,12 +430,12 @@ struct _VB_DEVICE_INFO
|
|||
UCHAR *pSoftSetting;
|
||||
UCHAR *pOutputSelect;
|
||||
|
||||
USHORT *pRGBSenseData;
|
||||
USHORT *pRGBSenseData2; /*301b*/
|
||||
USHORT *pVideoSenseData;
|
||||
USHORT *pVideoSenseData2;
|
||||
USHORT *pYCSenseData;
|
||||
USHORT *pYCSenseData2;
|
||||
unsigned short *pRGBSenseData;
|
||||
unsigned short *pRGBSenseData2; /*301b*/
|
||||
unsigned short *pVideoSenseData;
|
||||
unsigned short *pVideoSenseData2;
|
||||
unsigned short *pYCSenseData;
|
||||
unsigned short *pYCSenseData2;
|
||||
|
||||
UCHAR *pSR07;
|
||||
UCHAR *CR49;
|
||||
|
@ -516,18 +516,18 @@ struct _VB_DEVICE_INFO
|
|||
|
||||
typedef struct
|
||||
{
|
||||
USHORT Horizontal_ACTIVE;
|
||||
USHORT Horizontal_FP;
|
||||
USHORT Horizontal_SYNC;
|
||||
USHORT Horizontal_BP;
|
||||
USHORT Vertical_ACTIVE;
|
||||
USHORT Vertical_FP;
|
||||
USHORT Vertical_SYNC;
|
||||
USHORT Vertical_BP;
|
||||
unsigned short Horizontal_ACTIVE;
|
||||
unsigned short Horizontal_FP;
|
||||
unsigned short Horizontal_SYNC;
|
||||
unsigned short Horizontal_BP;
|
||||
unsigned short Vertical_ACTIVE;
|
||||
unsigned short Vertical_FP;
|
||||
unsigned short Vertical_SYNC;
|
||||
unsigned short Vertical_BP;
|
||||
double DCLK;
|
||||
UCHAR FrameRate;
|
||||
UCHAR Interlace;
|
||||
USHORT Margin;
|
||||
unsigned short Margin;
|
||||
} TimingInfo;
|
||||
|
||||
#define _VB_STRUCT_
|
||||
|
|
|
@ -2938,7 +2938,7 @@ XGI330_TVDataTablStruct XGI_TVDataTable[]=
|
|||
{0xffff,0x0000,12} /* END */
|
||||
};
|
||||
|
||||
USHORT TVLenList[]=
|
||||
unsigned short TVLenList[] =
|
||||
{
|
||||
LVDSCRT1Len_H,
|
||||
LVDSCRT1Len_V,
|
||||
|
@ -2980,7 +2980,7 @@ XGI330_TVDataTablStruct XGI_EPLCHTVRegPtr[]=
|
|||
{0xFFFF,0x0000,4}
|
||||
};
|
||||
|
||||
USHORT LCDLenList[]=
|
||||
unsigned short LCDLenList[] =
|
||||
{
|
||||
LVDSCRT1Len_H,
|
||||
LVDSCRT1Len_V,
|
||||
|
@ -3471,12 +3471,12 @@ UCHAR XGI330_CRT2Data_1_2 = 0x0;
|
|||
UCHAR XGI330_CRT2Data_4_D = 0x0;
|
||||
UCHAR XGI330_CRT2Data_4_E = 0x0;
|
||||
UCHAR XGI330_CRT2Data_4_10 = 0x80;
|
||||
USHORT XGI330_RGBSenseData = 0xd1;
|
||||
USHORT XGI330_VideoSenseData = 0xb9;
|
||||
USHORT XGI330_YCSenseData = 0xb3;
|
||||
USHORT XGI330_RGBSenseData2 = 0x0190; /*301b*/
|
||||
USHORT XGI330_VideoSenseData2 = 0x0110;
|
||||
USHORT XGI330_YCSenseData2 = 0x016B;
|
||||
unsigned short XGI330_RGBSenseData = 0xd1;
|
||||
unsigned short XGI330_VideoSenseData = 0xb9;
|
||||
unsigned short XGI330_YCSenseData = 0xb3;
|
||||
unsigned short XGI330_RGBSenseData2 = 0x0190; /*301b*/
|
||||
unsigned short XGI330_VideoSenseData2 = 0x0110;
|
||||
unsigned short XGI330_YCSenseData2 = 0x016B;
|
||||
UCHAR XGI330_NTSCPhase[] = {0x21,0xed,0x8a,0x8};
|
||||
UCHAR XGI330_PALPhase[] = {0x2a,0x5,0xd3,0x0};
|
||||
UCHAR XGI330_NTSCPhase2[] = {0x21,0xF0,0x7B,0xD6};/*301b*/
|
||||
|
@ -4045,7 +4045,7 @@ UCHAR TVEdgeList[]=
|
|||
0x00 /* ; 1 HiTV */
|
||||
};
|
||||
|
||||
ULONG TVPhaseList[]=
|
||||
unsigned long TVPhaseList[]=
|
||||
{ 0x08BAED21, /* ; 0 NTSC phase */
|
||||
0x00E3052A, /* ; 1 PAL phase */
|
||||
0x9B2EE421, /* ; 2 PAL-M phase */
|
||||
|
|
|
@ -6,17 +6,20 @@
|
|||
#include <asm/io.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
void XGINew_SetReg1( ULONG , USHORT , USHORT ) ;
|
||||
void XGINew_SetReg2( ULONG , USHORT , USHORT ) ;
|
||||
void XGINew_SetReg3( ULONG , USHORT ) ;
|
||||
void XGINew_SetReg4( ULONG , ULONG ) ;
|
||||
UCHAR XGINew_GetReg1( ULONG , USHORT) ;
|
||||
UCHAR XGINew_GetReg2( ULONG ) ;
|
||||
ULONG XGINew_GetReg3( ULONG ) ;
|
||||
void XGINew_ClearDAC(unsigned char *) ;
|
||||
void XGINew_SetRegANDOR(ULONG Port,USHORT Index,USHORT DataAND,USHORT DataOR);
|
||||
void XGINew_SetRegOR(ULONG Port,USHORT Index,USHORT DataOR);
|
||||
void XGINew_SetRegAND(ULONG Port,USHORT Index,USHORT DataAND);
|
||||
void XGINew_SetReg1(unsigned long,unsigned short,unsigned short);
|
||||
void XGINew_SetReg2(unsigned long,unsigned short,unsigned short);
|
||||
void XGINew_SetReg3(unsigned long,unsigned short);
|
||||
void XGINew_SetReg4(unsigned long,unsigned long);
|
||||
UCHAR XGINew_GetReg1(unsigned long,unsigned short);
|
||||
UCHAR XGINew_GetReg2(unsigned long);
|
||||
unsigned long XGINew_GetReg3(unsigned long);
|
||||
void XGINew_ClearDAC(unsigned char *);
|
||||
void XGINew_SetRegANDOR(unsigned long Port,unsigned short Index,
|
||||
unsigned short DataAND,unsigned short DataOR);
|
||||
void XGINew_SetRegOR(unsigned long Port,unsigned short Index,
|
||||
unsigned short DataOR);
|
||||
void XGINew_SetRegAND(unsigned long Port,unsigned short Index,
|
||||
unsigned short DataAND);
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
@ -25,7 +28,7 @@ void XGINew_SetRegAND(ULONG Port,USHORT Index,USHORT DataAND);
|
|||
/* Output : */
|
||||
/* Description : SR CRTC GR */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_SetReg1( ULONG port , USHORT index , USHORT data )
|
||||
void XGINew_SetReg1( unsigned long port , unsigned short index , unsigned short data )
|
||||
{
|
||||
outb(index, port);
|
||||
outb(data, port + 1);
|
||||
|
@ -38,7 +41,7 @@ void XGINew_SetReg1( ULONG port , USHORT index , USHORT data )
|
|||
/* Output : */
|
||||
/* Description : AR( 3C0 ) */
|
||||
/* --------------------------------------------------------------------- */
|
||||
/*void XGINew_SetReg2( ULONG port , USHORT index , USHORT data )
|
||||
/*void XGINew_SetReg2( unsigned long port , unsigned short index , unsigned short data )
|
||||
{
|
||||
InPortByte( ( PUCHAR )port + 0x3da - 0x3c0 ) ;
|
||||
OutPortByte( XGINew_P3c0 , index ) ;
|
||||
|
@ -53,7 +56,7 @@ void XGINew_SetReg1( ULONG port , USHORT index , USHORT data )
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_SetReg3( ULONG port , USHORT data )
|
||||
void XGINew_SetReg3( unsigned long port , unsigned short data )
|
||||
{
|
||||
outb(data, port);
|
||||
}
|
||||
|
@ -65,7 +68,7 @@ void XGINew_SetReg3( ULONG port , USHORT data )
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_SetReg4( ULONG port , ULONG data )
|
||||
void XGINew_SetReg4( unsigned long port , unsigned long data )
|
||||
{
|
||||
outl(data, port);
|
||||
}
|
||||
|
@ -77,7 +80,7 @@ void XGINew_SetReg4( ULONG port , ULONG data )
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
UCHAR XGINew_GetReg1( ULONG port , USHORT index )
|
||||
UCHAR XGINew_GetReg1( unsigned long port , unsigned short index )
|
||||
{
|
||||
UCHAR data ;
|
||||
|
||||
|
@ -93,7 +96,7 @@ UCHAR XGINew_GetReg1( ULONG port , USHORT index )
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
UCHAR XGINew_GetReg2( ULONG port )
|
||||
UCHAR XGINew_GetReg2( unsigned long port )
|
||||
{
|
||||
UCHAR data ;
|
||||
|
||||
|
@ -109,9 +112,9 @@ UCHAR XGINew_GetReg2( ULONG port )
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
ULONG XGINew_GetReg3( ULONG port )
|
||||
unsigned long XGINew_GetReg3( unsigned long port )
|
||||
{
|
||||
ULONG data ;
|
||||
unsigned long data ;
|
||||
|
||||
data = inl(port) ;
|
||||
|
||||
|
@ -126,9 +129,9 @@ ULONG XGINew_GetReg3( ULONG port )
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_SetRegANDOR( ULONG Port , USHORT Index , USHORT DataAND , USHORT DataOR )
|
||||
void XGINew_SetRegANDOR( unsigned long Port , unsigned short Index , unsigned short DataAND , unsigned short DataOR )
|
||||
{
|
||||
USHORT temp ;
|
||||
unsigned short temp ;
|
||||
|
||||
temp = XGINew_GetReg1( Port , Index ) ; /* XGINew_Part1Port index 02 */
|
||||
temp = ( temp & ( DataAND ) ) | DataOR ;
|
||||
|
@ -142,9 +145,9 @@ void XGINew_SetRegANDOR( ULONG Port , USHORT Index , USHORT DataAND , USHORT Dat
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_SetRegAND(ULONG Port,USHORT Index,USHORT DataAND)
|
||||
void XGINew_SetRegAND(unsigned long Port,unsigned short Index,unsigned short DataAND)
|
||||
{
|
||||
USHORT temp ;
|
||||
unsigned short temp ;
|
||||
|
||||
temp = XGINew_GetReg1( Port , Index ) ; /* XGINew_Part1Port index 02 */
|
||||
temp &= DataAND ;
|
||||
|
@ -158,9 +161,9 @@ void XGINew_SetRegAND(ULONG Port,USHORT Index,USHORT DataAND)
|
|||
/* Output : */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
void XGINew_SetRegOR( ULONG Port , USHORT Index , USHORT DataOR )
|
||||
void XGINew_SetRegOR( unsigned long Port , unsigned short Index , unsigned short DataOR )
|
||||
{
|
||||
USHORT temp ;
|
||||
unsigned short temp ;
|
||||
|
||||
temp = XGINew_GetReg1( Port , Index ) ; /* XGINew_Part1Port index 02 */
|
||||
temp |= DataOR ;
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
#define _VBUTIL_
|
||||
extern void NewDelaySeconds( int );
|
||||
extern void Newdebugcode( UCHAR );
|
||||
extern void XGINew_SetReg1(ULONG, USHORT, USHORT);
|
||||
extern void XGINew_SetReg3(ULONG, USHORT);
|
||||
extern UCHAR XGINew_GetReg1(ULONG, USHORT);
|
||||
extern UCHAR XGINew_GetReg2(ULONG);
|
||||
extern void XGINew_SetReg4(ULONG, ULONG);
|
||||
extern ULONG XGINew_GetReg3(ULONG);
|
||||
extern void XGINew_SetRegOR(ULONG Port,USHORT Index,USHORT DataOR);
|
||||
extern void XGINew_SetRegAND(ULONG Port,USHORT Index,USHORT DataAND);
|
||||
extern void XGINew_SetRegANDOR(ULONG Port,USHORT Index,USHORT DataAND,USHORT DataOR);
|
||||
extern void XGINew_SetReg1(unsigned long, unsigned short, unsigned short);
|
||||
extern void XGINew_SetReg3(unsigned long, unsigned short);
|
||||
extern UCHAR XGINew_GetReg1(unsigned long, unsigned short);
|
||||
extern UCHAR XGINew_GetReg2(unsigned long);
|
||||
extern void XGINew_SetReg4(unsigned long, unsigned long);
|
||||
extern unsigned long XGINew_GetReg3(unsigned long);
|
||||
extern void XGINew_SetRegOR(unsigned long Port,unsigned short Index,unsigned short DataOR);
|
||||
extern void XGINew_SetRegAND(unsigned long Port,unsigned short Index,unsigned short DataAND);
|
||||
extern void XGINew_SetRegANDOR(unsigned long Port,unsigned short Index,unsigned short DataAND,unsigned short DataOR);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -20,26 +20,6 @@ typedef long LONG;
|
|||
typedef unsigned char UCHAR;
|
||||
#endif
|
||||
|
||||
#ifndef USHORT
|
||||
typedef unsigned short USHORT;
|
||||
#endif
|
||||
|
||||
#ifndef ULONG
|
||||
typedef unsigned long ULONG;
|
||||
#endif
|
||||
|
||||
#ifndef VOID
|
||||
typedef void VOID;
|
||||
#endif
|
||||
|
||||
#ifndef BOOLEAN
|
||||
typedef UCHAR BOOLEAN;
|
||||
#endif
|
||||
/*
|
||||
#ifndef bool
|
||||
typedef UCHAR bool;
|
||||
#endif
|
||||
*/
|
||||
typedef unsigned long XGIIOADDRESS;
|
||||
|
||||
|
||||
|
@ -103,30 +83,30 @@ typedef struct _XGI_DSReg
|
|||
|
||||
typedef struct _XGI_HW_DEVICE_INFO XGI_HW_DEVICE_INFO, *PXGI_HW_DEVICE_INFO;
|
||||
|
||||
typedef BOOLEAN (*PXGI_QUERYSPACE) (PXGI_HW_DEVICE_INFO, ULONG, ULONG, ULONG *);
|
||||
typedef unsigned char (*PXGI_QUERYSPACE) (PXGI_HW_DEVICE_INFO, unsigned long, unsigned long, unsigned long *);
|
||||
|
||||
struct _XGI_HW_DEVICE_INFO
|
||||
{
|
||||
ULONG ulExternalChip; /* NO VB or other video bridge*/
|
||||
unsigned long ulExternalChip; /* NO VB or other video bridge*/
|
||||
/* if ujVBChipID = VB_CHIP_UNKNOWN, */
|
||||
|
||||
unsigned char *pjVirtualRomBase; /* ROM image */
|
||||
|
||||
BOOLEAN UseROM; /* Use the ROM image if provided */
|
||||
unsigned char UseROM; /* Use the ROM image if provided */
|
||||
|
||||
void *pDevice;
|
||||
|
||||
unsigned char *pjVideoMemoryAddress;/* base virtual memory address */
|
||||
/* of Linear VGA memory */
|
||||
|
||||
ULONG ulVideoMemorySize; /* size, in bytes, of the memory on the board */
|
||||
unsigned long ulVideoMemorySize; /* size, in bytes, of the memory on the board */
|
||||
|
||||
unsigned char *pjIOAddress; /* base I/O address of VGA ports (0x3B0) */
|
||||
|
||||
unsigned char *pjCustomizedROMImage;
|
||||
|
||||
unsigned char *pj2ndVideoMemoryAddress;
|
||||
ULONG ul2ndVideoMemorySize;
|
||||
unsigned long ul2ndVideoMemorySize;
|
||||
|
||||
unsigned char *pj2ndIOAddress;
|
||||
UCHAR jChipType; /* Used to Identify Graphics Chip */
|
||||
|
@ -139,20 +119,20 @@ struct _XGI_HW_DEVICE_INFO
|
|||
/* defined in the data structure type */
|
||||
/* "XGI_VB_CHIP_TYPE" */
|
||||
|
||||
BOOLEAN bNewScratch;
|
||||
unsigned char bNewScratch;
|
||||
|
||||
ULONG ulCRT2LCDType; /* defined in the data structure type */
|
||||
unsigned long ulCRT2LCDType; /* defined in the data structure type */
|
||||
|
||||
ULONG usExternalChip; /* NO VB or other video bridge (other than */
|
||||
unsigned long usExternalChip; /* NO VB or other video bridge (other than */
|
||||
/* video bridge) */
|
||||
|
||||
BOOLEAN bIntegratedMMEnabled;/* supporting integration MM enable */
|
||||
unsigned char bIntegratedMMEnabled;/* supporting integration MM enable */
|
||||
|
||||
BOOLEAN bSkipDramSizing; /* True: Skip video memory sizing. */
|
||||
unsigned char bSkipDramSizing; /* True: Skip video memory sizing. */
|
||||
|
||||
BOOLEAN bSkipSense;
|
||||
unsigned char bSkipSense;
|
||||
|
||||
BOOLEAN bIsPowerSaving; /* True: XGIInit() is invoked by power management,
|
||||
unsigned char bIsPowerSaving; /* True: XGIInit() is invoked by power management,
|
||||
otherwise by 2nd adapter's initialzation */
|
||||
|
||||
PXGI_DSReg pSR; /* restore SR registers in initial function. */
|
||||
|
|
Loading…
Reference in a new issue