diff options
Diffstat (limited to 'drivers/video/sis/init301.h')
-rw-r--r-- | drivers/video/sis/init301.h | 43 |
1 files changed, 7 insertions, 36 deletions
diff --git a/drivers/video/sis/init301.h b/drivers/video/sis/init301.h index 51d99222375d..e1fd31d0fddf 100644 --- a/drivers/video/sis/init301.h +++ b/drivers/video/sis/init301.h | |||
@@ -53,15 +53,8 @@ | |||
53 | #ifndef _INIT301_H_ | 53 | #ifndef _INIT301_H_ |
54 | #define _INIT301_H_ | 54 | #define _INIT301_H_ |
55 | 55 | ||
56 | #include "osdef.h" | ||
57 | #include "initdef.h" | 56 | #include "initdef.h" |
58 | 57 | ||
59 | #ifdef SIS_XORG_XF86 | ||
60 | #include "sis.h" | ||
61 | #include "sis_regs.h" | ||
62 | #endif | ||
63 | |||
64 | #ifdef SIS_LINUX_KERNEL | ||
65 | #include "vgatypes.h" | 58 | #include "vgatypes.h" |
66 | #include "vstruct.h" | 59 | #include "vstruct.h" |
67 | #ifdef SIS_CP | 60 | #ifdef SIS_CP |
@@ -72,7 +65,6 @@ | |||
72 | #include <linux/fb.h> | 65 | #include <linux/fb.h> |
73 | #include "sis.h" | 66 | #include "sis.h" |
74 | #include <video/sisfb.h> | 67 | #include <video/sisfb.h> |
75 | #endif | ||
76 | 68 | ||
77 | static const unsigned char SiS_YPbPrTable[3][64] = { | 69 | static const unsigned char SiS_YPbPrTable[3][64] = { |
78 | { | 70 | { |
@@ -237,7 +229,7 @@ static const unsigned char SiS_Part2CLVX_6[] = { /* 1080i */ | |||
237 | 0xFF,0xFF, | 229 | 0xFF,0xFF, |
238 | }; | 230 | }; |
239 | 231 | ||
240 | #ifdef SIS315H | 232 | #ifdef CONFIG_FB_SIS_315 |
241 | /* 661 et al LCD data structure (2.03.00) */ | 233 | /* 661 et al LCD data structure (2.03.00) */ |
242 | static const unsigned char SiS_LCDStruct661[] = { | 234 | static const unsigned char SiS_LCDStruct661[] = { |
243 | /* 1024x768 */ | 235 | /* 1024x768 */ |
@@ -279,7 +271,7 @@ static const unsigned char SiS_LCDStruct661[] = { | |||
279 | }; | 271 | }; |
280 | #endif | 272 | #endif |
281 | 273 | ||
282 | #ifdef SIS300 | 274 | #ifdef CONFIG_FB_SIS_300 |
283 | static unsigned char SiS300_TrumpionData[14][80] = { | 275 | static unsigned char SiS300_TrumpionData[14][80] = { |
284 | { 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x0D,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02, | 276 | { 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x0D,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02, |
285 | 0x20,0x03,0x0B,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x10,0x00,0x00,0x04,0x23, | 277 | 0x20,0x03,0x0B,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x10,0x00,0x00,0x04,0x23, |
@@ -356,9 +348,6 @@ static unsigned char SiS300_TrumpionData[14][80] = { | |||
356 | #endif | 348 | #endif |
357 | 349 | ||
358 | void SiS_UnLockCRT2(struct SiS_Private *SiS_Pr); | 350 | void SiS_UnLockCRT2(struct SiS_Private *SiS_Pr); |
359 | #ifndef SIS_LINUX_KERNEL | ||
360 | void SiS_LockCRT2(struct SiS_Private *SiS_Pr); | ||
361 | #endif | ||
362 | void SiS_EnableCRT2(struct SiS_Private *SiS_Pr); | 351 | void SiS_EnableCRT2(struct SiS_Private *SiS_Pr); |
363 | unsigned short SiS_GetRatePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex); | 352 | unsigned short SiS_GetRatePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex); |
364 | void SiS_WaitRetrace1(struct SiS_Private *SiS_Pr); | 353 | void SiS_WaitRetrace1(struct SiS_Private *SiS_Pr); |
@@ -375,9 +364,6 @@ unsigned short SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short ModeNo | |||
375 | unsigned short RefreshRateTableIndex); | 364 | unsigned short RefreshRateTableIndex); |
376 | unsigned short SiS_GetResInfo(struct SiS_Private *SiS_Pr,unsigned short ModeNo,unsigned short ModeIdIndex); | 365 | unsigned short SiS_GetResInfo(struct SiS_Private *SiS_Pr,unsigned short ModeNo,unsigned short ModeIdIndex); |
377 | void SiS_DisableBridge(struct SiS_Private *SiS_Pr); | 366 | void SiS_DisableBridge(struct SiS_Private *SiS_Pr); |
378 | #ifndef SIS_LINUX_KERNEL | ||
379 | void SiS_EnableBridge(struct SiS_Private *SiS_Pr); | ||
380 | #endif | ||
381 | bool SiS_SetCRT2Group(struct SiS_Private *SiS_Pr, unsigned short ModeNo); | 367 | bool SiS_SetCRT2Group(struct SiS_Private *SiS_Pr, unsigned short ModeNo); |
382 | void SiS_SiS30xBLOn(struct SiS_Private *SiS_Pr); | 368 | void SiS_SiS30xBLOn(struct SiS_Private *SiS_Pr); |
383 | void SiS_SiS30xBLOff(struct SiS_Private *SiS_Pr); | 369 | void SiS_SiS30xBLOff(struct SiS_Private *SiS_Pr); |
@@ -386,13 +372,9 @@ void SiS_SetCH700x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned cha | |||
386 | unsigned short SiS_GetCH700x(struct SiS_Private *SiS_Pr, unsigned short tempax); | 372 | unsigned short SiS_GetCH700x(struct SiS_Private *SiS_Pr, unsigned short tempax); |
387 | void SiS_SetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val); | 373 | void SiS_SetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val); |
388 | unsigned short SiS_GetCH701x(struct SiS_Private *SiS_Pr, unsigned short tempax); | 374 | unsigned short SiS_GetCH701x(struct SiS_Private *SiS_Pr, unsigned short tempax); |
389 | #ifndef SIS_LINUX_KERNEL | ||
390 | void SiS_SetCH70xx(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val); | ||
391 | unsigned short SiS_GetCH70xx(struct SiS_Private *SiS_Pr, unsigned short tempax); | ||
392 | #endif | ||
393 | void SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg, | 375 | void SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg, |
394 | unsigned char orval,unsigned short andval); | 376 | unsigned char orval,unsigned short andval); |
395 | #ifdef SIS315H | 377 | #ifdef CONFIG_FB_SIS_315 |
396 | static void SiS_Chrontel701xOn(struct SiS_Private *SiS_Pr); | 378 | static void SiS_Chrontel701xOn(struct SiS_Private *SiS_Pr); |
397 | static void SiS_Chrontel701xOff(struct SiS_Private *SiS_Pr); | 379 | static void SiS_Chrontel701xOff(struct SiS_Private *SiS_Pr); |
398 | static void SiS_ChrontelInitTVVSync(struct SiS_Private *SiS_Pr); | 380 | static void SiS_ChrontelInitTVVSync(struct SiS_Private *SiS_Pr); |
@@ -401,7 +383,7 @@ void SiS_Chrontel701xBLOn(struct SiS_Private *SiS_Pr); | |||
401 | void SiS_Chrontel701xBLOff(struct SiS_Private *SiS_Pr); | 383 | void SiS_Chrontel701xBLOff(struct SiS_Private *SiS_Pr); |
402 | #endif /* 315 */ | 384 | #endif /* 315 */ |
403 | 385 | ||
404 | #ifdef SIS300 | 386 | #ifdef CONFIG_FB_SIS_300 |
405 | static bool SiS_SetTrumpionBlock(struct SiS_Private *SiS_Pr, unsigned char *dataptr); | 387 | static bool SiS_SetTrumpionBlock(struct SiS_Private *SiS_Pr, unsigned char *dataptr); |
406 | void SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo); | 388 | void SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo); |
407 | #endif | 389 | #endif |
@@ -412,21 +394,12 @@ unsigned short SiS_HandleDDC(struct SiS_Private *SiS_Pr, unsigned int VBFlags, i | |||
412 | unsigned short adaptnum, unsigned short DDCdatatype, | 394 | unsigned short adaptnum, unsigned short DDCdatatype, |
413 | unsigned char *buffer, unsigned int VBFlags2); | 395 | unsigned char *buffer, unsigned int VBFlags2); |
414 | 396 | ||
415 | #ifdef SIS_XORG_XF86 | ||
416 | unsigned short SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags, | ||
417 | int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype, | ||
418 | bool checkcr32, unsigned int VBFlags2); | ||
419 | unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr); | ||
420 | unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype, | ||
421 | unsigned char *buffer); | ||
422 | #else | ||
423 | static unsigned short SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags, | 397 | static unsigned short SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags, |
424 | int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype, | 398 | int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype, |
425 | bool checkcr32, unsigned int VBFlags2); | 399 | bool checkcr32, unsigned int VBFlags2); |
426 | static unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr); | 400 | static unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr); |
427 | static unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype, | 401 | static unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype, |
428 | unsigned char *buffer); | 402 | unsigned char *buffer); |
429 | #endif | ||
430 | static void SiS_SetSwitchDDC2(struct SiS_Private *SiS_Pr); | 403 | static void SiS_SetSwitchDDC2(struct SiS_Private *SiS_Pr); |
431 | static unsigned short SiS_SetStart(struct SiS_Private *SiS_Pr); | 404 | static unsigned short SiS_SetStart(struct SiS_Private *SiS_Pr); |
432 | static unsigned short SiS_SetStop(struct SiS_Private *SiS_Pr); | 405 | static unsigned short SiS_SetStop(struct SiS_Private *SiS_Pr); |
@@ -441,13 +414,13 @@ static unsigned short SiS_PrepareDDC(struct SiS_Private *SiS_Pr); | |||
441 | static void SiS_SendACK(struct SiS_Private *SiS_Pr, unsigned short yesno); | 414 | static void SiS_SendACK(struct SiS_Private *SiS_Pr, unsigned short yesno); |
442 | static unsigned short SiS_DoProbeDDC(struct SiS_Private *SiS_Pr); | 415 | static unsigned short SiS_DoProbeDDC(struct SiS_Private *SiS_Pr); |
443 | 416 | ||
444 | #ifdef SIS300 | 417 | #ifdef CONFIG_FB_SIS_300 |
445 | static void SiS_OEM300Setting(struct SiS_Private *SiS_Pr, | 418 | static void SiS_OEM300Setting(struct SiS_Private *SiS_Pr, |
446 | unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short RefTabindex); | 419 | unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short RefTabindex); |
447 | static void SetOEMLCDData2(struct SiS_Private *SiS_Pr, | 420 | static void SetOEMLCDData2(struct SiS_Private *SiS_Pr, |
448 | unsigned short ModeNo, unsigned short ModeIdIndex,unsigned short RefTableIndex); | 421 | unsigned short ModeNo, unsigned short ModeIdIndex,unsigned short RefTableIndex); |
449 | #endif | 422 | #endif |
450 | #ifdef SIS315H | 423 | #ifdef CONFIG_FB_SIS_315 |
451 | static void SiS_OEM310Setting(struct SiS_Private *SiS_Pr, | 424 | static void SiS_OEM310Setting(struct SiS_Private *SiS_Pr, |
452 | unsigned short ModeNo,unsigned short ModeIdIndex, unsigned short RRTI); | 425 | unsigned short ModeNo,unsigned short ModeIdIndex, unsigned short RRTI); |
453 | static void SiS_OEM661Setting(struct SiS_Private *SiS_Pr, | 426 | static void SiS_OEM661Setting(struct SiS_Private *SiS_Pr, |
@@ -482,15 +455,13 @@ extern void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short M | |||
482 | extern void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth); | 455 | extern void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth); |
483 | extern unsigned short SiS_GetRefCRTVCLK(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide); | 456 | extern unsigned short SiS_GetRefCRTVCLK(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide); |
484 | extern unsigned short SiS_GetRefCRT1CRTC(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide); | 457 | extern unsigned short SiS_GetRefCRT1CRTC(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide); |
485 | #ifdef SIS300 | 458 | #ifdef CONFIG_FB_SIS_300 |
486 | extern void SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned short *tempbx, | 459 | extern void SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned short *tempbx, |
487 | unsigned short *tempcl); | 460 | unsigned short *tempcl); |
488 | extern unsigned short SiS_GetFIFOThresholdB300(unsigned short tempbx, unsigned short tempcl); | 461 | extern unsigned short SiS_GetFIFOThresholdB300(unsigned short tempbx, unsigned short tempcl); |
489 | extern unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned short index); | 462 | extern unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned short index); |
490 | #ifdef SIS_LINUX_KERNEL | ||
491 | extern unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg); | 463 | extern unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg); |
492 | extern unsigned int sisfb_read_lpc_pci_dword(struct SiS_Private *SiS_Pr, int reg); | 464 | extern unsigned int sisfb_read_lpc_pci_dword(struct SiS_Private *SiS_Pr, int reg); |
493 | #endif | 465 | #endif |
494 | #endif | ||
495 | 466 | ||
496 | #endif | 467 | #endif |