diff options
Diffstat (limited to 'drivers/video/sis/init.h')
-rw-r--r-- | drivers/video/sis/init.h | 63 |
1 files changed, 4 insertions, 59 deletions
diff --git a/drivers/video/sis/init.h b/drivers/video/sis/init.h index b96005c39c67..ee8ed3c203da 100644 --- a/drivers/video/sis/init.h +++ b/drivers/video/sis/init.h | |||
@@ -53,21 +53,8 @@ | |||
53 | #ifndef _INIT_H_ | 53 | #ifndef _INIT_H_ |
54 | #define _INIT_H_ | 54 | #define _INIT_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 | #define SIS_NEED_inSISREG | ||
62 | #define SIS_NEED_inSISREGW | ||
63 | #define SIS_NEED_inSISREGL | ||
64 | #define SIS_NEED_outSISREG | ||
65 | #define SIS_NEED_outSISREGW | ||
66 | #define SIS_NEED_outSISREGL | ||
67 | #include "sis_regs.h" | ||
68 | #endif | ||
69 | |||
70 | #ifdef SIS_LINUX_KERNEL | ||
71 | #include "vgatypes.h" | 58 | #include "vgatypes.h" |
72 | #include "vstruct.h" | 59 | #include "vstruct.h" |
73 | #ifdef SIS_CP | 60 | #ifdef SIS_CP |
@@ -78,7 +65,6 @@ | |||
78 | #include <linux/fb.h> | 65 | #include <linux/fb.h> |
79 | #include "sis.h" | 66 | #include "sis.h" |
80 | #include <video/sisfb.h> | 67 | #include <video/sisfb.h> |
81 | #endif | ||
82 | 68 | ||
83 | /* Mode numbers */ | 69 | /* Mode numbers */ |
84 | static const unsigned short ModeIndex_320x200[] = {0x59, 0x41, 0x00, 0x4f}; | 70 | static const unsigned short ModeIndex_320x200[] = {0x59, 0x41, 0x00, 0x4f}; |
@@ -286,7 +272,7 @@ static const struct SiS_ModeResInfo_S SiS_ModeResInfo[] = | |||
286 | { 1280, 854, 8,16} /* 0x22 */ | 272 | { 1280, 854, 8,16} /* 0x22 */ |
287 | }; | 273 | }; |
288 | 274 | ||
289 | #if defined(SIS300) || defined(SIS315H) | 275 | #if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315) |
290 | static const struct SiS_StandTable_S SiS_StandTable[]= | 276 | static const struct SiS_StandTable_S SiS_StandTable[]= |
291 | { | 277 | { |
292 | /* 0x00: MD_0_200 */ | 278 | /* 0x00: MD_0_200 */ |
@@ -1521,10 +1507,6 @@ static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1640x480_1_H[] = | |||
1521 | }; | 1507 | }; |
1522 | 1508 | ||
1523 | bool SiSInitPtr(struct SiS_Private *SiS_Pr); | 1509 | bool SiSInitPtr(struct SiS_Private *SiS_Pr); |
1524 | #ifdef SIS_XORG_XF86 | ||
1525 | unsigned short SiS_GetModeID(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay, | ||
1526 | int Depth, bool FSTN, int LCDwith, int LCDheight); | ||
1527 | #endif | ||
1528 | unsigned short SiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay, | 1510 | unsigned short SiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay, |
1529 | int VDisplay, int Depth, bool FSTN, | 1511 | int VDisplay, int Depth, bool FSTN, |
1530 | unsigned short CustomT, int LCDwith, int LCDheight, | 1512 | unsigned short CustomT, int LCDwith, int LCDheight, |
@@ -1550,17 +1532,11 @@ void SiS_SetRegOR(SISIOADDRESS Port,unsigned short Index, unsigned short DataOR | |||
1550 | void SiS_DisplayOn(struct SiS_Private *SiS_Pr); | 1532 | void SiS_DisplayOn(struct SiS_Private *SiS_Pr); |
1551 | void SiS_DisplayOff(struct SiS_Private *SiS_Pr); | 1533 | void SiS_DisplayOff(struct SiS_Private *SiS_Pr); |
1552 | void SiSRegInit(struct SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr); | 1534 | void SiSRegInit(struct SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr); |
1553 | #ifndef SIS_LINUX_KERNEL | ||
1554 | void SiSSetLVDSetc(struct SiS_Private *SiS_Pr); | ||
1555 | #endif | ||
1556 | void SiS_SetEnableDstn(struct SiS_Private *SiS_Pr, int enable); | 1535 | void SiS_SetEnableDstn(struct SiS_Private *SiS_Pr, int enable); |
1557 | void SiS_SetEnableFstn(struct SiS_Private *SiS_Pr, int enable); | 1536 | void SiS_SetEnableFstn(struct SiS_Private *SiS_Pr, int enable); |
1558 | unsigned short SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo, | 1537 | unsigned short SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo, |
1559 | unsigned short ModeIdIndex); | 1538 | unsigned short ModeIdIndex); |
1560 | bool SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr); | 1539 | bool SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr); |
1561 | #ifndef SIS_LINUX_KERNEL | ||
1562 | void SiS_GetVBType(struct SiS_Private *SiS_Pr); | ||
1563 | #endif | ||
1564 | 1540 | ||
1565 | bool SiS_SearchModeID(struct SiS_Private *SiS_Pr, unsigned short *ModeNo, | 1541 | bool SiS_SearchModeID(struct SiS_Private *SiS_Pr, unsigned short *ModeNo, |
1566 | unsigned short *ModeIdIndex); | 1542 | unsigned short *ModeIdIndex); |
@@ -1572,37 +1548,19 @@ unsigned short SiS_GetColorDepth(struct SiS_Private *SiS_Pr, unsigned short Mode | |||
1572 | unsigned short ModeIdIndex); | 1548 | unsigned short ModeIdIndex); |
1573 | unsigned short SiS_GetOffset(struct SiS_Private *SiS_Pr,unsigned short ModeNo, | 1549 | unsigned short SiS_GetOffset(struct SiS_Private *SiS_Pr,unsigned short ModeNo, |
1574 | unsigned short ModeIdIndex, unsigned short RRTI); | 1550 | unsigned short ModeIdIndex, unsigned short RRTI); |
1575 | #ifdef SIS300 | 1551 | #ifdef CONFIG_FB_SIS_300 |
1576 | void SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned short *idx1, | 1552 | void SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned short *idx1, |
1577 | unsigned short *idx2); | 1553 | unsigned short *idx2); |
1578 | unsigned short SiS_GetFIFOThresholdB300(unsigned short idx1, unsigned short idx2); | 1554 | unsigned short SiS_GetFIFOThresholdB300(unsigned short idx1, unsigned short idx2); |
1579 | unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned short index); | 1555 | unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned short index); |
1580 | #endif | 1556 | #endif |
1581 | void SiS_LoadDAC(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex); | 1557 | void SiS_LoadDAC(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex); |
1582 | #ifdef SIS_XORG_XF86 | ||
1583 | bool SiSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, unsigned short ModeNo, | ||
1584 | bool dosetpitch); | ||
1585 | bool SiSBIOSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, | ||
1586 | DisplayModePtr mode, bool IsCustom); | ||
1587 | bool SiSBIOSSetModeCRT2(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, | ||
1588 | DisplayModePtr mode, bool IsCustom); | ||
1589 | bool SiSBIOSSetModeCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, | ||
1590 | DisplayModePtr mode, bool IsCustom); | ||
1591 | #endif | ||
1592 | #ifdef SIS_LINUX_KERNEL | ||
1593 | bool SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo); | 1558 | bool SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo); |
1594 | #endif | ||
1595 | void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth); | 1559 | void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth); |
1596 | void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo, | 1560 | void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo, |
1597 | unsigned short ModeIdIndex); | 1561 | unsigned short ModeIdIndex); |
1598 | #ifdef SIS_XORG_XF86 | ||
1599 | void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres, | ||
1600 | int yres, DisplayModePtr current); | ||
1601 | #endif | ||
1602 | #ifdef SIS_LINUX_KERNEL | ||
1603 | void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres, | 1562 | void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres, |
1604 | int yres, struct fb_var_screeninfo *var, bool writeres); | 1563 | int yres, struct fb_var_screeninfo *var, bool writeres); |
1605 | #endif | ||
1606 | 1564 | ||
1607 | /* From init301.c: */ | 1565 | /* From init301.c: */ |
1608 | extern void SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo, | 1566 | extern void SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo, |
@@ -1626,29 +1584,16 @@ extern unsigned short SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short | |||
1626 | extern bool SiS_IsVAMode(struct SiS_Private *); | 1584 | extern bool SiS_IsVAMode(struct SiS_Private *); |
1627 | extern bool SiS_IsDualEdge(struct SiS_Private *); | 1585 | extern bool SiS_IsDualEdge(struct SiS_Private *); |
1628 | 1586 | ||
1629 | #ifdef SIS_XORG_XF86 | 1587 | #ifdef CONFIG_FB_SIS_300 |
1630 | /* From other modules: */ | ||
1631 | extern unsigned short SiS_CheckBuildCustomMode(ScrnInfoPtr pScrn, DisplayModePtr mode, | ||
1632 | unsigned int VBFlags); | ||
1633 | extern unsigned char SiS_GetSetBIOSScratch(ScrnInfoPtr pScrn, unsigned short offset, | ||
1634 | unsigned char value); | ||
1635 | extern unsigned char SiS_GetSetModeID(ScrnInfoPtr pScrn, unsigned char id); | ||
1636 | extern unsigned short SiS_GetModeNumber(ScrnInfoPtr pScrn, DisplayModePtr mode, | ||
1637 | unsigned int VBFlags); | ||
1638 | #endif | ||
1639 | |||
1640 | #ifdef SIS_LINUX_KERNEL | ||
1641 | #ifdef SIS300 | ||
1642 | extern unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg); | 1588 | extern unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg); |
1643 | extern void sisfb_write_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg, | 1589 | extern void sisfb_write_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg, |
1644 | unsigned int val); | 1590 | unsigned int val); |
1645 | #endif | 1591 | #endif |
1646 | #ifdef SIS315H | 1592 | #ifdef CONFIG_FB_SIS_315 |
1647 | extern void sisfb_write_nbridge_pci_byte(struct SiS_Private *SiS_Pr, int reg, | 1593 | extern void sisfb_write_nbridge_pci_byte(struct SiS_Private *SiS_Pr, int reg, |
1648 | unsigned char val); | 1594 | unsigned char val); |
1649 | extern unsigned int sisfb_read_mio_pci_word(struct SiS_Private *SiS_Pr, int reg); | 1595 | extern unsigned int sisfb_read_mio_pci_word(struct SiS_Private *SiS_Pr, int reg); |
1650 | #endif | 1596 | #endif |
1651 | #endif | ||
1652 | 1597 | ||
1653 | #endif | 1598 | #endif |
1654 | 1599 | ||