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
69void SiS_UnLockCRT2(struct SiS_Private *SiS_Pr);
70void SiS_EnableCRT2(struct SiS_Private *SiS_Pr);
71unsigned short SiS_GetRatePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
72void SiS_WaitRetrace1(struct SiS_Private *SiS_Pr);
73bool SiS_IsDualEdge(struct SiS_Private *SiS_Pr);
74bool SiS_IsVAMode(struct SiS_Private *SiS_Pr);
75void SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
76 unsigned short ModeIdIndex, int checkcrt2mode);
77void SiS_SetYPbPr(struct SiS_Private *SiS_Pr);
78void SiS_SetTVMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
79 unsigned short ModeIdIndex);
80void SiS_GetLCDResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
81 unsigned short ModeIdIndex);
82unsigned short SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex,
83 unsigned short RefreshRateTableIndex);
84unsigned short SiS_GetResInfo(struct SiS_Private *SiS_Pr,unsigned short ModeNo,unsigned short ModeIdIndex);
85void SiS_DisableBridge(struct SiS_Private *SiS_Pr);
86bool SiS_SetCRT2Group(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
87void SiS_SiS30xBLOn(struct SiS_Private *SiS_Pr);
88void SiS_SiS30xBLOff(struct SiS_Private *SiS_Pr);
89
90void SiS_SetCH700x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
91unsigned short SiS_GetCH700x(struct SiS_Private *SiS_Pr, unsigned short tempax);
92void SiS_SetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
93unsigned short SiS_GetCH701x(struct SiS_Private *SiS_Pr, unsigned short tempax);
94void SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg,
95 unsigned char orval,unsigned short andval);
96#ifdef CONFIG_FB_SIS_315
97void SiS_Chrontel701xBLOn(struct SiS_Private *SiS_Pr);
98void SiS_Chrontel701xBLOff(struct SiS_Private *SiS_Pr);
99#endif
100
101#ifdef CONFIG_FB_SIS_300
102void SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo);
103#endif
104
105void SiS_DDC2Delay(struct SiS_Private *SiS_Pr, unsigned int delaytime);
106unsigned short SiS_ReadDDC1Bit(struct SiS_Private *SiS_Pr);
107unsigned 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
111extern void SiS_DisplayOff(struct SiS_Private *SiS_Pr);
112extern void SiS_DisplayOn(struct SiS_Private *SiS_Pr);
113extern bool SiS_SearchModeID(struct SiS_Private *, unsigned short *, unsigned short *);
114extern unsigned short SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
115 unsigned short ModeIdIndex);
116extern unsigned short SiS_GetModePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
117extern unsigned short SiS_GetColorDepth(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
118extern unsigned short SiS_GetOffset(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex,
119 unsigned short RefreshRateTableIndex);
120extern void SiS_LoadDAC(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
121 unsigned short ModeIdIndex);
122extern void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
123 unsigned short ModeIdIndex);
124extern void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth);
125extern unsigned short SiS_GetRefCRTVCLK(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide);
126extern unsigned short SiS_GetRefCRT1CRTC(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide);
127#ifdef CONFIG_FB_SIS_300
128extern void SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned short *tempbx,
129 unsigned short *tempcl);
130extern unsigned short SiS_GetFIFOThresholdB300(unsigned short tempbx, unsigned short tempcl);
131extern unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned short index);
132extern unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg);
133extern unsigned int sisfb_read_lpc_pci_dword(struct SiS_Private *SiS_Pr, int reg);
134#endif
135
136#endif
137