Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205694
b: refs/heads/master
c: 82d6eb5
h: refs/heads/master
v: v3
  • Loading branch information
Bill Pemberton authored and Greg Kroah-Hartman committed Jun 22, 2010
1 parent 76e2bff commit a438477
Show file tree
Hide file tree
Showing 14 changed files with 1,061 additions and 909 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 490ce818c6ff60257b543207aa042991e32017af
refs/heads/master: 82d6eb5b2ecd4ccdd44a23115fc499ecefc77706
44 changes: 27 additions & 17 deletions trunk/drivers/staging/xgifb/XGI_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);

Expand All @@ -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;
Expand Down Expand Up @@ -879,26 +881,34 @@ 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);


/* 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);
Expand Down
34 changes: 17 additions & 17 deletions trunk/drivers/staging/xgifb/XGI_main_26.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand All @@ -951,7 +951,7 @@ static BOOLEAN XGIfb_bridgeisslave(void)
return 0;
}

static BOOLEAN XGIfbcheckvretracecrt1(void)
static unsigned char XGIfbcheckvretracecrt1(void)
{
unsigned char temp;

Expand All @@ -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)
Expand All @@ -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()) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
Loading

0 comments on commit a438477

Please sign in to comment.