1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 #ifndef _INIT301_H_
54 #define _INIT301_H_
55
56 #include "initdef.h"
57
58 #include "vgatypes.h"
59 #include "vstruct.h"
60 #ifdef SIS_CP
61 #undef SIS_CP
62 #endif
63 #include <linux/types.h>
64 #include <asm/io.h>
65 #include <linux/fb.h>
66 #include "sis.h"
67 #include <video/sisfb.h>
68
69 void SiS_UnLockCRT2(struct SiS_Private *SiS_Pr);
70 void SiS_EnableCRT2(struct SiS_Private *SiS_Pr);
71 unsigned short SiS_GetRatePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
72 void SiS_WaitRetrace1(struct SiS_Private *SiS_Pr);
73 bool SiS_IsDualEdge(struct SiS_Private *SiS_Pr);
74 bool SiS_IsVAMode(struct SiS_Private *SiS_Pr);
75 void SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
76 unsigned short ModeIdIndex, int checkcrt2mode);
77 void SiS_SetYPbPr(struct SiS_Private *SiS_Pr);
78 void SiS_SetTVMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
79 unsigned short ModeIdIndex);
80 void SiS_GetLCDResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
81 unsigned short ModeIdIndex);
82 unsigned short SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex,
83 unsigned short RefreshRateTableIndex);
84 unsigned short SiS_GetResInfo(struct SiS_Private *SiS_Pr,unsigned short ModeNo,unsigned short ModeIdIndex);
85 void SiS_DisableBridge(struct SiS_Private *SiS_Pr);
86 bool SiS_SetCRT2Group(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
87 void SiS_SiS30xBLOn(struct SiS_Private *SiS_Pr);
88 void SiS_SiS30xBLOff(struct SiS_Private *SiS_Pr);
89
90 void SiS_SetCH700x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
91 unsigned short SiS_GetCH700x(struct SiS_Private *SiS_Pr, unsigned short tempax);
92 void SiS_SetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
93 unsigned short SiS_GetCH701x(struct SiS_Private *SiS_Pr, unsigned short tempax);
94 void SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg,
95 unsigned char orval,unsigned short andval);
96 #ifdef CONFIG_FB_SIS_315
97 void SiS_Chrontel701xBLOn(struct SiS_Private *SiS_Pr);
98 void SiS_Chrontel701xBLOff(struct SiS_Private *SiS_Pr);
99 #endif
100
101 #ifdef CONFIG_FB_SIS_300
102 void SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo);
103 #endif
104
105 void SiS_DDC2Delay(struct SiS_Private *SiS_Pr, unsigned int delaytime);
106 unsigned short SiS_ReadDDC1Bit(struct SiS_Private *SiS_Pr);
107 unsigned short SiS_HandleDDC(struct SiS_Private *SiS_Pr, unsigned int VBFlags, int VGAEngine,
108 unsigned short adaptnum, unsigned short DDCdatatype,
109 unsigned char *buffer, unsigned int VBFlags2);
110
111 extern void SiS_DisplayOff(struct SiS_Private *SiS_Pr);
112 extern void SiS_DisplayOn(struct SiS_Private *SiS_Pr);
113 extern bool SiS_SearchModeID(struct SiS_Private *, unsigned short *, unsigned short *);
114 extern unsigned short SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
115 unsigned short ModeIdIndex);
116 extern unsigned short SiS_GetModePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
117 extern unsigned short SiS_GetColorDepth(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
118 extern unsigned short SiS_GetOffset(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex,
119 unsigned short RefreshRateTableIndex);
120 extern void SiS_LoadDAC(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
121 unsigned short ModeIdIndex);
122 extern void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
123 unsigned short ModeIdIndex);
124 extern void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth);
125 extern unsigned short SiS_GetRefCRTVCLK(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide);
126 extern unsigned short SiS_GetRefCRT1CRTC(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide);
127 #ifdef CONFIG_FB_SIS_300
128 extern void SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned short *tempbx,
129 unsigned short *tempcl);
130 extern unsigned short SiS_GetFIFOThresholdB300(unsigned short tempbx, unsigned short tempcl);
131 extern unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned short index);
132 extern unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg);
133 extern unsigned int sisfb_read_lpc_pci_dword(struct SiS_Private *SiS_Pr, int reg);
134 #endif
135
136 #endif